コード例 #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
      // }}
    }
コード例 #2
0
  void jbInit() throws Exception {
    //
    pmIcon_ = new PlotMarkIcon(1);
    {
      String[] tempString = new String[3];
      tempString[0] = "NO_HEAD";
      tempString[1] = "HEAD";
      tempString[2] = "SCALED_HEAD";
      for (int i = 0; i < tempString.length; i++) {
        vectorStyleCBM.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[2];
      tempString[0] = "NO_MARK";
      tempString[1] = "MARK";
      for (int i = 0; i < tempString.length; i++) {
        originStyleCBM.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[3];
      tempString[0] = "BUTT";
      tempString[1] = "ROUND";
      tempString[2] = "SQUARE";
      for (int i = 0; i < tempString.length; i++) {
        capStyleCBM.addElement(tempString[i]);
      }
    }
    {
      String[] tempString = new String[3];
      tempString[0] = "MITER";
      tempString[1] = "ROUND";
      tempString[2] = "BEVEL";
      for (int i = 0; i < tempString.length; i++) {
        miterStyleCBM.addElement(tempString[i]);
      }
    }
    getContentPane().setLayout(new BorderLayout(0, 0));
    setSize(500, 490);
    setVisible(false);
    buttonPanel.setBorder(etchedBorder1);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
    vectorMaxSizeTextField.setColumns(8);
    vectorScaleTextField.setColumns(8);
    JLabel5.setText("Style:");
    colorPanel.setBorder(etchedBorder1);
    colorPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
    JLabel1.setText("Color:");
    offsetAngleTextField.setColumns(8);
    vectorStyleComboBox.setModel(vectorStyleCBM);
    vectorStyleComboBox.addActionListener(
        new VectorAttributeDialog_vectorStyleComboBox_actionAdapter(this));
    jLabel7.setText("Offset Angle:");
    jLabel6.setText("Max Size:");
    jLabel5.setText("Scale:");
    vectorPanel.setLayout(gridBagLayout2);
    jLabel11.setText("Fixed Size:");
    jLabel10.setText("Max Size:");
    headMinSizeTextField.setColumns(8);
    jLabel9.setText("Min Size:");
    jLabel8.setText("Scale:");
    headScaleTextField.setColumns(8);
    headMaxSizeTextField.setColumns(8);
    headFixedSizeTextField.setColumns(8);
    headPanel.setLayout(gridBagLayout4);
    markHeightTextField.setColumns(8);
    originStyleComboBox.setModel(originStyleCBM);
    JLabel12.setText("Color:");
    JLabel7.setText("Mark Height:");
    JLabel6.setText("Mark:");
    markPanel.setLayout(new GridBagLayout());
    markEditor.addActionListener(new VectorAttributeDialog_markEditor_actionAdapter(this));
    markEditor.setActionCommand("...");
    //    markEditor.setMargin(new Insets(0, 0, 0, 0));
    markColorPanel.setBorder(etchedBorder1);
    Mark.setLayout(gridBagLayout3);
    jLabel4.setText("Style:");
    plotMarkIconLabel.setForeground(java.awt.Color.black);
    plotMarkIconLabel.setIcon(pmIcon_);
    miterLimitTextField.setColumns(8);
    JLabel10.setText(" Width:");
    strokePanel.setLayout(gridBagLayout1);
    miterStyleComboBox.setModel(miterStyleCBM);
    jLabel3.setText("Miter Limit:");
    jLabel2.setText("Miter Style:");
    jLabel1.setText("Cap Style:");
    capStyleComboBox.setModel(capStyleCBM);
    widthTextField.setColumns(8);
    getContentPane().add(buttonPanel, "South");
    buttonPanel.setBounds(0, 263, 430, 39);
    okButton.setText("OK");
    okButton.setActionCommand("OK");
    buttonPanel.add(okButton);
    okButton.setBounds(115, 7, 51, 25);
    applyButton.setText("Apply");
    applyButton.setActionCommand("Apply");
    buttonPanel.add(applyButton);
    applyButton.setBounds(171, 7, 65, 25);
    cancelButton.setText("Cancel");
    cancelButton.setActionCommand("Cancel");
    buttonPanel.add(cancelButton);
    cancelButton.setBounds(241, 7, 73, 25);
    // $$ etchedBorder1.move(0,300);
    this.getContentPane().add(jTabbedPane1, BorderLayout.CENTER);
    jTabbedPane1.add(vectorPanel, "Vector");
    vectorPanel.add(
        vectorStyleComboBox,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(15, 5, 5, 5),
            0,
            0));
    vectorPanel.add(
        colorPanel,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 15),
            0,
            0));
    vectorPanel.add(
        JLabel1,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    vectorPanel.add(
        jLabel5,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 6, 0, 6),
            0,
            0));
    vectorPanel.add(
        jLabel6,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    vectorPanel.add(
        jLabel7,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 15, 10, 5),
            0,
            0));
    vectorPanel.add(
        vectorScaleTextField,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    vectorPanel.add(
        vectorMaxSizeTextField,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    vectorPanel.add(
        offsetAngleTextField,
        new GridBagConstraints(
            1,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 15, 5),
            0,
            0));
    vectorPanel.add(
        JLabel5,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(10, 5, 0, 5),
            0,
            0));
    jTabbedPane1.add(headPanel, "Head");
    headPanel.add(
        jLabel8,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        headScaleTextField,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    headPanel.add(
        jLabel9,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        jLabel10,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        headMinSizeTextField,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    headPanel.add(
        headMaxSizeTextField,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    headPanel.add(
        jLabel11,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    headPanel.add(
        headFixedSizeTextField,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    jTabbedPane1.add(Mark, "Mark");
    Mark.add(
        markPanel,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 5),
            0,
            0));
    markPanel.add(
        plotMarkIconLabel,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 5),
            0,
            0));
    markPanel.add(
        markEditor,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            1.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.VERTICAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    Mark.add(
        JLabel6,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    Mark.add(
        JLabel7,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 15, 10, 5),
            0,
            0));
    Mark.add(
        markHeightTextField,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 15, 5),
            0,
            0));
    Mark.add(
        markColorPanel,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(5, 5, 5, 15),
            0,
            0));
    Mark.add(
        JLabel12,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    Mark.add(
        jLabel4,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(10, 5, 0, 5),
            0,
            0));
    Mark.add(
        originStyleComboBox,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(15, 5, 5, 5),
            0,
            0));
    jTabbedPane1.add(strokePanel, "Line Style");
    strokePanel.add(
        JLabel10,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        widthTextField,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    strokePanel.add(
        jLabel1,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        jLabel2,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        capStyleComboBox,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    strokePanel.add(
        miterStyleComboBox,
        new GridBagConstraints(
            1,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    strokePanel.add(
        jLabel3,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.EAST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 0, 5),
            0,
            0));
    strokePanel.add(
        miterLimitTextField,
        new GridBagConstraints(
            1,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 5, 5, 5),
            0,
            0));
    // $$ stringComboBoxModel1.move(24,300);
    setTitle("VectorAttribute Properties");

    SymWindow aSymWindow = new SymWindow();
    this.addWindowListener(aSymWindow);
    SymAction lSymAction = new SymAction();
    cancelButton.addActionListener(lSymAction);
    okButton.addActionListener(lSymAction);
    applyButton.addActionListener(lSymAction);
  }
コード例 #3
0
ファイル: LogoDialog.java プロジェクト: saiyanprince/pyimager
  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);
  }