Esempio n. 1
0
    public ProprietaryNodeInfoPanel(NodeInfo pNodeInfo) {
      nodeInfo = pNodeInfo;
      tabTitle = "Sensor Value"; // this will be the title of the tab
      // {{INIT_CONTROLS
      setLayout(null);
      //			Insets ins = getInsets();
      setSize(307, 168);
      JLabel3.setToolTipText("This text will appear with mouse hover over this component");
      JLabel3.setText("Node Number:");
      add(JLabel3);
      JLabel3.setBounds(12, 36, 108, 24);
      JLabel4.setToolTipText("This is the value of NodeNumber");
      JLabel4.setText("text");
      add(JLabel4);
      JLabel4.setBounds(12, 60, 108, 24);
      JLabel5.setToolTipText("This text will appear with mouse hover over this component");
      JLabel5.setText("Sensor Reading:");
      add(JLabel5);
      JLabel5.setBounds(12, 84, 108, 24);
      JLabel6.setToolTipText("This is the value of Sensor Reading");
      JLabel6.setText("text");
      add(JLabel6);
      JLabel6.setBounds(12, 108, 108, 24);
      // }}

      // {{REGISTER_LISTENERS
      // }}
    }
Esempio n. 2
0
    public DisplayPropertiesPanel(SensorAnalyzer pAnalyzer) {
      analyzer = pAnalyzer;
      tabTitle = "Light"; // this will be the title of the tab
      // {{INIT_CONTROLS
      setLayout(null);
      //			Insets ins = getInsets();
      setSize(307, 168);
      JLabel3.setToolTipText("This text will appear with mouse hover over this component");
      JLabel3.setText("Variable Name:");
      add(JLabel3);
      JLabel3.setBounds(12, 36, 108, 24);
      JLabel4.setToolTipText("This is the value of Variable Name");
      JLabel4.setText("text");
      add(JLabel4);
      JLabel4.setBounds(12, 60, 108, 24);
      // }}

      // {{REGISTER_LISTENERS
      // }}
    }
Esempio n. 3
0
  void jbInit() throws Exception {
    getContentPane().setLayout(new BorderLayout(0, 0));
    setSize(457, 294);
    setVisible(false);
    buttonPanel.setBorder(etchedBorder1);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
    getContentPane().add(buttonPanel, "South");
    okButton.setText("OK");
    okButton.setActionCommand("OK");
    buttonPanel.add(okButton);
    applyButton.setText("Apply");
    applyButton.setActionCommand("Apply");
    buttonPanel.add(applyButton);
    cancelButton.setText("Cancel");
    cancelButton.setActionCommand("Cancel");
    buttonPanel.add(cancelButton);
    // $$ etchedBorder1.move(0,324);
    mainPanel.setLayout(new GridBagLayout());
    getContentPane().add(mainPanel, "Center");
    positionPanel.setBorder(positionBorder);
    positionPanel.setLayout(new GridBagLayout());
    mainPanel.add(
        positionPanel,
        new GridBagConstraints(
            0,
            0,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 0, 5, 0),
            20,
            15));
    JLabel1.setText("X Position:");
    positionPanel.add(
        JLabel1,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    xPosTextField.setColumns(20);
    positionPanel.add(
        xPosTextField,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    JLabel2.setText("Y Position:");
    positionPanel.add(
        JLabel2,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    yPosTextField.setColumns(20);
    positionPanel.add(
        yPosTextField,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    alignPanel.setBorder(alignBorder);
    alignPanel.setLayout(new GridBagLayout());
    mainPanel.add(
        alignPanel,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.VERTICAL,
            new Insets(5, 0, 5, 0),
            20,
            15));
    JLabel3.setText("Horizontal:");
    alignPanel.add(
        JLabel3,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    horizComboBox.setModel(horizCBModel);
    alignPanel.add(
        horizComboBox,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 5, 5, 5),
            0,
            0));
    JLabel4.setText("Vertical:");
    alignPanel.add(
        JLabel4,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    vertComboBox.setModel(vertCBModel);
    alignPanel.add(
        vertComboBox,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 5, 5, 5),
            0,
            0));
    optionPanel.setBorder(optionBorder);
    optionPanel.setLayout(new GridBagLayout());
    mainPanel.add(
        optionPanel,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.VERTICAL,
            new Insets(5, 10, 5, 0),
            20,
            15));
    JLabel7.setText("Visible:");
    optionPanel.add(
        JLabel7,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    labelVisibleCheckBox.setSelected(true);
    optionPanel.add(
        labelVisibleCheckBox,
        new GridBagConstraints(
            1,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    JLabel6.setText("Selectable:");
    optionPanel.add(
        JLabel6,
        new GridBagConstraints(
            0,
            5,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    labelSelectableCheckBox.setSelected(true);
    optionPanel.add(
        labelSelectableCheckBox,
        new GridBagConstraints(
            1,
            5,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    {
      String[] tempString = new String[3];
      tempString[0] = "LEFT";
      tempString[1] = "CENTER";
      tempString[2] = "RIGHT";
      for (int i = 0; i < tempString.length; i++) {
        horizCBModel.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[3];
      tempString[0] = "TOP";
      tempString[1] = "MIDDLE";
      tempString[2] = "BOTTOM";
      for (int i = 0; i < tempString.length; i++) {
        vertCBModel.addElement(tempString[i]);
      }
    }
    vertComboBox.setSelectedIndex(2);
    horizComboBox.setSelectedIndex(0);
    setTitle("SGLabel");

    SymWindow aSymWindow = new SymWindow();
    this.addWindowListener(aSymWindow);
    SymAction lSymAction = new SymAction();
    cancelButton.addActionListener(lSymAction);
    okButton.addActionListener(lSymAction);
    applyButton.addActionListener(lSymAction);
  }