Exemplo n.º 1
0
  public void setTitle(String title) {
    titlePanel.setTitle(title);

    super.setTitle(title);
  }
Exemplo n.º 2
0
  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  private void initComponents() {
    JPanel contentPane = new JPanel(new MigLayout("fillx", "", ""));

    TitlePanel titlePanel = new TitlePanel();
    titlePanel.setTitle("Insert miscellaneous item");
    contentPane.add(titlePanel, "grow, span");

    JLabel lblName = new JLabel("Item name");
    contentPane.add(lblName, "newline,alignx trailing");

    tfItemName = new FixedLengthTextField(120);
    contentPane.add(tfItemName, "grow, span, h 40");

    JLabel lblPrice = new JLabel("Item price");
    contentPane.add(lblPrice, "newline,alignx trailing");

    tfItemPrice = new DoubleTextField();
    contentPane.add(tfItemPrice, "grow, w 120, h 40");

    contentPane.add(new JLabel("Tax"), "alignx trailing");

    PosComboRenderer comboRenderer = new PosComboRenderer();
    comboRenderer.setEnableDefaultValueShowing(false);

    cbTax = new JComboBox();
    cbTax.setRenderer(comboRenderer);
    contentPane.add(cbTax, "w 200!, h 40");

    contentPane.add(new JLabel("Printer group"), "alignx trailing");

    cbPrinterGroup = new JComboBox();
    cbPrinterGroup.setRenderer(comboRenderer);
    contentPane.add(cbPrinterGroup, "w 200!, h 40");

    QwertyKeyPad keyPad = new QwertyKeyPad();
    contentPane.add(keyPad, "newline, grow, span, h 300!, gaptop 10");

    contentPane.add(new JSeparator(JSeparator.HORIZONTAL), "newline, grow, span, gaptop 10px");

    btnOk = new com.floreantpos.swing.PosButton();
    btnOk.setText(com.floreantpos.POSConstants.OK.toUpperCase());
    btnOk.setPreferredSize(new java.awt.Dimension(120, 50));
    btnOk.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            doFinish(evt);
          }
        });

    btnCancel = new com.floreantpos.swing.PosButton();
    btnCancel.setText(com.floreantpos.POSConstants.CANCEL.toUpperCase());
    btnCancel.setPreferredSize(new java.awt.Dimension(120, 50));
    btnCancel.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            doCancel(evt);
          }
        });

    JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    buttonPanel.add(btnOk);
    buttonPanel.add(btnCancel);

    contentPane.add(buttonPanel, "newline, grow, span");

    getContentPane().add(contentPane);

    initData();
  } // </editor-fold>//GEN-END:initComponents