Пример #1
0
  public DepositFrame(MainFrame parent, IFinCo model, IAccount account, int rowIndex) {
    super(parent);
    this.model = model;
    this.account = account;
    this.rowIndex = rowIndex;
    // This code is automatically generated by Visual Cafe when you add
    // components to the visual environment. It instantiates and initializes
    // the components. To modify the code, only use code syntax that matches
    // what Visual Cafe can generate, or Visual Cafe may be unable to back
    // parse your Java file into its visual environment.
    // {{INIT_CONTROLS
    setTitle("Deposit");
    setModal(true);
    getContentPane().setLayout(null);
    setSize(268, 126);
    setVisible(false);
    JLabel1.setText("Acc Nr");
    getContentPane().add(JLabel1);
    JLabel1.setForeground(java.awt.Color.black);
    JLabel1.setBounds(12, 12, 48, 24);
    JLabel2.setText("Amount");
    getContentPane().add(JLabel2);
    JLabel2.setForeground(java.awt.Color.black);
    JLabel2.setBounds(12, 48, 48, 24);
    JTextField_NAME.setEditable(false);
    getContentPane().add(JTextField_NAME);
    JTextField_NAME.setBounds(84, 12, 144, 24);
    JButton_OK.setText("OK");
    JButton_OK.setActionCommand("OK");
    getContentPane().add(JButton_OK);
    JButton_OK.setBounds(36, 84, 84, 24);
    JButton_Cancel.setText("Cancel");
    JButton_Cancel.setActionCommand("Cancel");
    getContentPane().add(JButton_Cancel);
    JButton_Cancel.setBounds(156, 84, 84, 24);
    getContentPane().add(JTextField_Deposit);
    JTextField_Deposit.setBounds(84, 48, 144, 24);
    // }}
    JTextField_NAME.setText(account.getAccNumber().toString());

    // {{REGISTER_LISTENERS
    SymAction lSymAction = new SymAction();
    JButton_OK.addActionListener(lSymAction);
    JButton_Cancel.addActionListener(lSymAction);
    // }}
  }
Пример #2
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);
  }