コード例 #1
0
  private JComponent createConnectionConfigPanel(String environment) {
    JPanel panel = new JPanel(new GridBagLayout());

    gbc =
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            2,
            2,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 4),
            1,
            1);

    refreshContents(environment);

    for (int index = 0; index < _fields.length; index++) {
      //    		_fields[index].setEditable(false);
      _fields[index].setFont(MDFUtil.fontArialPlain12);
      _fields[index].setBackground(bgColorField);
      _fields[index].setForeground(Color.black);
    }

    int row = 0;
    addGridComponent(0, row, 4, 4, panel, createLabel("TCP Info : "));
    addGridComponent(1, row, 8, 8, panel, textTcpAddress);
    addGridComponent(2, row, 4, 4, panel, createLabel("UserName : "******"Password : "******"Network Interface : "));
          addGridComponent(1, row, 8, 8, panel, textMulticastNetworkInterface);
          addGridComponent(2, row, 4, 4, panel, createLabel("SeqProblem Action : "));
          addGridComponent(3, row, 8, 8, panel, textSequenceProblemAction);
          addGridComponent(4, row, 4, 4, panel, createLabel("InactivityThreshold : "));
          addGridComponent(5, row, 8, 8, panel, textMulticastInactivityThreshold);
          */

    JPanel masterPanel = new JPanel(new BorderLayout());
    masterPanel.add(panel, BorderLayout.CENTER);
    masterPanel.add(new JLabel(" "), BorderLayout.SOUTH);
    masterPanel.setBorder(
        new TitledBorder(
            BorderFactory.createLineBorder(Color.blue, 1),
            "TCP/Parameters",
            TitledBorder.LEADING,
            TitledBorder.TOP,
            new Font("Arial", Font.BOLD, 12)));

    panel.setBackground(bgColorPanel);
    masterPanel.setBackground(bgColorPanel);

    return (new JScrollPane(masterPanel));
  }
コード例 #2
0
  public void triggerModelUpdate(String environment, MulticastChannelContext context) {
    if (environment == null || context == null) {
      System.err.println("Environment or Context is null while trying to refresh the model.");
      return;
    }

    refreshContents(environment);

    this.multicastGroupConfigModel.refresh(environment, context);
    this.multicastGroupConfigTable.autoSelectFirstRow();
    return;
  }