⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 101e7250e9b7001a1c27ace50896501e

📁 这是一个用java和xml编写的流媒体服务器管理软件
💻
📖 第 1 页 / 共 3 页
字号:
        	break;
        }
        case DVR:
        {
        	//set buttons
            //newButton.setEnabled(false);
        	//tree.setEnabled(false);
            setCurrentScreen(dvrScreen);
            //currentScreen.activateNew();
            break;
        }
        case ENV:
        {
            //setCurrentScreen(envScreen);
            //currentScreen.activate();

            break;
        }
        
        case PDP_GROUP:

        case DVR_GROUP:
      	  
        case ENV_GROUP:
        {
        	//set buttons
            //newButton.setEnabled(true);
            //okButton.setEnabled(true);          
        	//setCurrentScreen(blankScreen);
        	//currentScreen.activate();
          break;
        }
        default:
          break;
      }
    }

  });
}
//OISP授权
	private JPanel Oisp_Features() 
	{	
		JPanel temp = new JPanel();
		temp.setLayout(new BoxLayout(temp, BoxLayout.Y_AXIS)); 
		//temp.setBorder(new TitledBorder("OISP")); 
		
		try 
		{
			
		  String[] featureTypes= psInterfaceacc.getFeatureTypes();		

	      for (int i = 0; i < featureTypes.length; i++)
	      {
	        if (featureTypes[i].equals("ForwardAllCalls")
	            || featureTypes[i].equals("ForwardNoAnswerBusy")
	            || featureTypes[i].equals("CallBlocking")
	            || featureTypes[i].equals("CallScreening")
	            || featureTypes[i].equals("CallReturn")
	            || featureTypes[i].equals("CallerIdBlocking"))
	        {
	          String[] groupNames = psInterfaceacc.getFeatureGroups(featureTypes[i]);
	          FeatureAccr panel = FeatureAccr.createFeature(featureTypes[i], groupNames,
	        		  psInterfaceacc);
	          panel.setShowAdmin(true);
	          panel.setShowUser(false);
	          if (FeatureAccrCallReturn.class.isInstance(panel))
	          {
	            //callReturn = (FeatureAccrCallReturn) panel;
	            temp.add((FeatureAccrCallReturn) panel);
	          }
	          else
	          {
	        	  temp.add(panel);	            
	          }
	        }
	      }
		} catch (VPPNoSuchFileException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	      if (callReturn != null)
	      {	    	  
	    	  //temp.add(callReturn);
	      }

	    	   
	    return temp;
	}
	
	//DEVS授权
	private JSplitPane Devs_Accredit()
	{	
	    //DEVS	    
		
	    //JSplitPane sp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,null,null);
	    //sp.setLocation(100,300);
	   
	    
	    //	  DEVS	    
	    JPanel tmp_devs = new JPanel();
	    tmp_devs.setLayout(new BorderLayout()); 
	    
	    tmp_devs.setBorder(new TitledBorder("DEVS"));	 
	    //dvrScreen = new DVRClientScreen(this);
	    blankScreen = new BlankScreen();
	    groupScreen = new GroupScreen(this);
	    dvrScreen = new DVRClientScreen(this);
	    //envScreen = new EnvScreen(this);
	    setTreeListener();
	    tmp_devs.add(tree);
	    //tmp_devs.add(devsptree);
	    //setTreeListener();
	    //temp.add(tmp_devs);
	    
	    //JPanel tmp_devs_screen = new JPanel();
	    
	    tmp_devs_screen.setLayout(new BorderLayout());
	    tmp_devs_screen.add(dvrScreen);
	    JSplitPane sp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,tmp_devs,tmp_devs_screen);
	    sp.setLocation(100,300);
	    //tmp_center.add(sp);
	    
	    return sp;
	   
	}	
  
	
	
  private boolean isAllDataValid()
  {
    Component[] components = AccreditAdd.this.getComponents();

    for (int i = 0; i < components.length; i++)
    {
      if (DataEditor.class.isInstance(components[i]))
      {
        if (!((DataEditor) components[i]).isDataValid())
        {
          return false;
        }
      }
    }

    return true;
  }



  public void clear()
  {

    // clear all the data fields in all the dataEditors
    Component[] components = AccreditAdd.this.getComponents();

    for (int i = 0; i < components.length; i++)
    {
      if (DataEditor.class.isInstance(components[i]))
      {
        ((DataEditor) components[i]).clear();
      }
    }
  }

  public void setMode(int newMode)
  {
    Component[] components = AccreditAdd.this.getComponents();

    for (int i = 0; i < components.length; i++)
    {
      if (DataEditor.class.isInstance(components[i]))
      {
        ((DataEditor) components[i]).setMode(newMode);
      }
    }

    if (newMode == ADD_NEW_MODE)
    {
      ok.setText("Add");
    }
    else if (newMode == EDIT_EXISTING_MODE)
    {
      ok.setText("Ok");
    }

    mode = newMode;
  }

  private void showSelectedComponents()
  {
    remove(groupInfo);
    //remove(marshal);

    if (callReturn != null)
    {
      remove(callReturn);
    }

    //remove(aliases);

    Component[] components = getComponents();

    if (showAdmin)
    {
      add(groupInfo, 0);
      //add(marshal, 1);

      if (callReturn != null)
      {
        add(callReturn);
      }

      components = getComponents();

      if (callReturn != null)
      {
        add(callReturn, components.length - 2);
      }
    }

    if (showUser)
    {
      if (showAdmin)
      {
        //add(aliases, 2);
      }
      else
      {
        //add(aliases, 0);
      }
    }
  }

  public void removeAliasPanel()
  {
    remove(aliases);
  }

  public void setShowAdmin(boolean show)
  {
    Component[] components = getComponents();

    showAdmin = show;

    showSelectedComponents();

    components = getComponents();

    for (int i = 0; i < components.length; i++)
    {
      if (Feature.class.isInstance(components[i]))
      {
        ((Feature) components[i]).setShowAdmin(show);
      }
    }
  }

  public void setShowUser(boolean show)
  {
    showUser = show;

    showSelectedComponents();

    Component[] components = getComponents();

    for (int i = 0; i < components.length; i++)
    {
      if (Feature.class.isInstance(components[i]))
      {
        ((Feature) components[i]).setShowUser(show);
      }
    }
  }

  public void setGroupData(Vector group)
  {
    groupName = (String) group.elementAt(AccreditGroupModel.GROUP_NAME);

    // get all the components in this panel
    Component[] components = AccreditAdd.this.getComponents();

    components = AccreditAdd.this.getComponents();

    for (int id = 0; id <= AccreditGroupModel.MAX_COLUMN_ID; id++)
    {
      for (int i = 0; i < components.length; i++)
      {

        // if this component was responsible for editing user data
        if (DataEditor.class.isInstance(components[i]))
        {
          DataEditor editor = (DataEditor) components[i];
          String dataValue = (String) group.elementAt(id);

          if (editor.setData(id, dataValue))
          {
            break;
          }
        }       // end if this is a dataEditor
      }         // end for each component
    }           // end for each data id
  }


  public int getLastButtonClicked()
  {
    return lastButtonClicked;
  }


  public Vector getGroupData()
  {
	System.out.println("get group data!");
    Vector data = new Vector();

    for (int i = 0; i <= AccreditGroupModel.MAX_COLUMN_ID; i++)
    {
      data.addElement(null);
    }

    // get all the components in this panel
    Component[] components = getComponents();

    // find out which components are the ones which can edit user data
    for (int i = 0; i < components.length; i++)
    {

      // if this component was responsible for editing user data
      if (DataEditor.class.isInstance(components[i]))
      {

        // ask it for a data value for each of the columns. If the component
        // is responsible for editing that data value (and it was changed)
        // it will return a string. Otherwise it will return null
        for (int id = 0; id <= AccreditGroupModel.MAX_COLUMN_ID; id++)
        {
          String dataElement = null;
          
          dataElement = ((DataEditor) components[i]).getData(id);          

          if (dataElement != null)
          {
            data.setElementAt(dataElement, id);
          }
        }

        ((DataEditor) components[i]).clear();
      }
    }

    return data;
  }

  // -----------------implementation of the Windowlistener interface-------------
  public void windowOpened(WindowEvent e)
  {

    // nothing to do
  }

  public void windowIconified(WindowEvent e)
  {

    // nothing to do
  }

  public void windowDeiconified(WindowEvent e)
  {

    // nothing to do
  }

  public void windowDeactivated(WindowEvent e)
  {

    // nothing to do
  }

  /**
   * This should be called when the user presses the "close window" icon it the
   * title bar of the dialog displaing this panel.
   * That action should be equivalent to pressing cancel so we clear the editor
   * and let the last button pressed to cancel.
   */
  public void windowClosing(WindowEvent e)
  {
    lastButtonClicked = UserPanel.BUTTON_CANCEL;

    clear();
  }

  public void windowClosed(WindowEvent e)
  {

    // nothing to do
  }

  public void windowActivated(WindowEvent e)
  {

    // nothing to do
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -