Package nu.lazy8.util.help

Examples of nu.lazy8.util.help.HelpedLabel


   *
   * @param  jp        Description of the Parameter
   * @param  helpFile  Description of the Parameter
   */
  public void AddDateComponents(JPanel jp, String helpFile) {
    jp.add(new HelpedLabel(Translator.getTranslation("Start date"), "StartDate", helpfile, view));
    jTextField1 = new DateField("StartDate", helpfile, view);
    jTextField2 = new DateField("StopDate", helpfile, view);
    jp.add(jTextField1);
    jp.add(new HelpedLabel(Translator.getTranslation("Stop date"), "StopDate", helpfile, view));
    jp.add(jTextField2);
  }//}}}
View Full Code Here


    bIsFastEntry = false;
    //...Create the GUI and put it in the window...
    bFastEntry = bIsFastEntry;
    JPanel jPanel4 = new javax.swing.JPanel();

    label1 = new HelpedLabel(Translator.getTranslation("RegDate"), "RegDate", "transaction", view);
    labelTodaysDate = new HelpedLabel("", "RegDate", "transaction", view);
    label2 = new HelpedLabel(Translator.getTranslation("InvDate"), "InvDate", "transaction", view);
    invoiceDateField =
      new DateField("InvDate", "transaction", view) {
        //{{{ +gotEnter() : void
        public void gotEnter() {
          try {
            //invoice date
            invoiceDateField.getDate();
          } catch (Exception e) {
            JOptionPane.showMessageDialog(TransactionTableForm.this,
                Translator.getTranslation("Date must be in the following format") +
                " : " +
                DateField.getTodaysDateString(),
                Translator.getTranslation("Update not entered"),
                JOptionPane.PLAIN_MESSAGE);
            return;
          }
          try {
            if (invoiceDateField.getDate().compareTo((Date) cc.comboBoxPeriod.getSelectedItemsKey()) < 0 ||
                invoiceDateField.getDate().compareTo((Date) cc.comboBoxPeriod.getSelectedItemsSecondaryKey()) > 0) {
              JOptionPane.showMessageDialog(TransactionTableForm.this,
                  Translator.getTranslation("Date is not within the specified time period.") +
                  "  " +
                  (String) cc.comboBoxPeriod.getSelectedItem(),
                  Translator.getTranslation("Update not entered"),
                  JOptionPane.PLAIN_MESSAGE);
              return;
            }
          } catch (Exception e) {
          }
          commentsTextField.requestFocus();
        }//}}}
      };

    label3 = new HelpedLabel(Translator.getTranslation("Commentary"), "Commentary", "transaction", view);
    commentsTextField =
      new HelpedTextField("Commentary", "transaction", view) {
        //{{{ +gotEnter() : void
        public void gotEnter() {
          SetSelectionFirstNoEdit();
          tableView.requestFocus();
          tableView.editCellAt(0, COL_ACCOUNTNUM);
        }//}}}
      };

    label4 = new HelpedLabel(Translator.getTranslation("Fileing information"), "FileInfo", "transaction", view);
    fileInfoTextField =
      new HelpedTextField("FileInfo", "transaction", view) {
        //{{{ +gotEnter() : void
        public void gotEnter() {
          invoiceDateField.getEditor().requestFocus();
          invoiceDateField.getEditor().setEditable(true);
          SwingUtilities.invokeLater(
            new Runnable() {
              //{{{ +run() : void
              public void run() {
                invoiceDateField.getEditor().setCaretPosition(invoiceDateField.getEditor().getText().length());
              }//}}}
            });
        }//}}}
      };

    label6 = new HelpedLabel(Translator.getTranslation("Act_id"), "ActId", "transaction", view);
    lableTransaction = new HelpedLabel("", "ActId", "transaction", view);

    JPanel jPanel6 = new javax.swing.JPanel();
    JPanel jPanel7 = new javax.swing.JPanel();

    transactionAccess = new TransactionAccess(view);

    setLayout(new BorderLayout());

    jPanel4.setLayout(new GridLayout(4, 4));

    cc = new CompanyComponents(jPanel4, Translator.getTranslation("Company"),
        false, "transaction", view);
    cc.AddPeriod(jPanel4, Translator.getTranslation("Period"), false);
    if (bIsFastEntry) {
      cc.comboBox.setEnabled(false);
    }
    cc.comboBox.addItemListener(this);
    //      jPanel4.add(new JLabel(""));
    //      jPanel4.add(new JLabel(""));

    jPanel4.add(label1);

    JPanel panelDate = new JPanel();
    panelDate.setLayout(new GridLayout(1, 1));
    labelTodaysDate.setEnabled(false);
    panelDate.setBorder(LineBorder.createGrayLineBorder());
    JPanel panelDate2 = new JPanel();
    panelDate2.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
    panelDate2.add(labelTodaysDate);
    panelDate2.setLayout(new GridLayout(1, 1));
    panelDate.add(panelDate2);
    jPanel4.add(panelDate);

    jPanel4.add(label4);
    jPanel4.add(fileInfoTextField);

    jPanel4.add(label2);
    jPanel4.add(invoiceDateField);

    jPanel4.add(new JLabel());
    jPanel4.add(new JLabel());

    jPanel4.add(label3);
    jPanel4.add(commentsTextField);

    jPanel4.add(label6);

    JPanel panelTransaction = new JPanel();
    panelTransaction.setLayout(new GridLayout(1, 1));
    lableTransaction.setEnabled(false);
    panelTransaction.setBorder(LineBorder.createGrayLineBorder());
    JPanel panelTransaction2 = new JPanel();
    panelTransaction2.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
    panelTransaction2.add(lableTransaction);
    panelTransaction2.setLayout(new GridLayout(1, 1));
    panelTransaction.add(panelTransaction2);
    jPanel4.add(panelTransaction);

    JPanel jPanel10 = new JPanel();

    dataMovementPane = new DataMovementPane(
        (JdbcTable) transactionAccess, this, view);
    jPanel10.setLayout(new BoxLayout(jPanel10,BoxLayout.X_AXIS));
    jPanel10.add(dataMovementPane);
    jPanel10.add(Box.createHorizontalGlue());
    JPanel JLabelTotal = new JPanel();
    JLabelTotal.setLayout(new BorderLayout());

    HelpedLabel hl = new HelpedLabel(Translator.getTranslation("Total"), "DebitTotal", "transaction", view);
    Dimension ddm2 = dataMovementPane.getPreferredSize();
    Dimension ddm3 = hl.getPreferredSize();
    ddm2.height = ddm3.height;
    JLabelTotal.setPreferredSize(ddm3);
    JLabelTotal.setMaximumSize(ddm3);
    JLabelTotal.add(hl, BorderLayout.NORTH);
    jPanel10.add(JLabelTotal);
View Full Code Here

        Translator.getTranslation("Company"), false, "periodform", view);

    //    JLabel emptySpace=new JLabel();
    //    jPanel1.add(emptySpace);

    label1 = new HelpedLabel(Translator.getTranslation("Start period"),
        "From", "periodform", view);
    textField1 = new DateField("From", "periodform", view);
    label2 = new HelpedLabel(Translator.getTranslation("End Period"),
        "To", "periodform", view);
    textField2 = new DateField("To", "periodform", view);

    jPanel1.add(label1);
    jPanel1.add(textField1);
View Full Code Here

     */
    this.bIsAddOnly = bIsAddOnly;
    wasWriteOk = false;
    jPanel1 = new JPanel();

    label1 = new HelpedLabel(Translator.getTranslation("CustId"),
        "Number", "customer", view);
    textField1 = new IntegerField("Number", "customer", view);
    textField1.setText(sAccountNum);
    label2 = new HelpedLabel(Translator.getTranslation("Customer name"),
        "Name", "customer", view);
    textField2 = new HelpedTextField("Name", "customer", view);
    label3 = new HelpedLabel(Translator.getTranslation("Customer description"),
        "Description", "customer", view);
    textField3 = new HelpedTextField("Description", "customer", view);
    JPanel jPanel22 = new JPanel();
    jPanel22.setLayout(new BoxLayout(jPanel22, BoxLayout.Y_AXIS));

    jPanel1.setLayout(new GridLayout(5, 2));

    cc = new CompanyComponents(jPanel1, Translator.getTranslation("Company"),
        false, "customer", view);

    jPanel22.add(jPanel1);

    jPanel1.add(label1);
    jPanel1.add(textField1);

    jPanel1.add(label2);
    jPanel1.add(textField2);

    jPanel1.add(label3);
    jPanel1.add(textField3);

    jPanel1.add(new HelpedLabel(Translator.getTranslation("Default account"),
        "DefaultAccount", "customer", view));
    accountCombo = new DataComboBox(new JdbcTable("APP.Account", 2, view), true, "Account", "transaction", view);
    accountCombo.loadComboBox("AccDesc", "Account", (Integer) cc.comboBox.getSelectedItemsKey());
    accountCombo.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
    accountCombo.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));
View Full Code Here

    periodStartPanel.addMouseListener(l1);
    JLabel[] periodStartLabels = new JLabel[5];
    periodStartDates = new DateField[5];
    for (int i = 0; i < periodStartLabels.length; i++) {
      if (i == 0) {
        periodStartLabels[i] = new HelpedLabel(Translator.getTranslation("Start date"),
            "startdates", "graphics", view);
      } else {
        periodStartLabels[i] = new HelpedLabel(Translator.getTranslation("Comparison start date") + " " + i,
            "startdates", "graphics", view);
      }
      periodStartDates[i] = new DateField("startdates", "graphics", view);
      periodStartPanel.add(periodStartLabels[i]);
      periodStartPanel.add(periodStartDates[i]);
View Full Code Here

    for (int i = 0; i < periods.length; i++) {
      radioPeriods[i] = new HelpedRadioButton(Translator.getTranslation(periods[i]), "timeinterval", "graphics", view);
      groupPeriods.add(radioPeriods[i]);
      radioPanel.add(radioPeriods[i]);
    }
    radioPanel.add(new HelpedLabel(Translator.getTranslation("Number of time intervals to show"),
        "numberoftimeintervals", "graphics", view));
    Integer value = new Integer(1);
    Integer min = new Integer(1);
    Integer max = new Integer(100);
    Integer step = new Integer(1);
View Full Code Here

    jp5.setLayout(new GridLayout(1, 2));
    jp5.add(companyPanel);

    JPanel jptitles = new JPanel();
    jptitles.setLayout(new GridLayout(4, 2));
    jptitles.add(new HelpedLabel(Translator.getTranslation("Diagram title"),
        "title", "graphics", view));
    jtextTitle = new HelpedTextField("title", "graphics", view);
    jptitles.add(jtextTitle);

    jptitles.add(new HelpedLabel(Translator.getTranslation("X axis title"),
        "titlex", "graphics", view));
    jtextTitleX = new HelpedTextField("titlex", "graphics", view);
    jptitles.add(jtextTitleX);

    jptitles.add(new HelpedLabel(Translator.getTranslation("Y axis title"),
        "titley", "graphics", view));
    jtextTitleY = new HelpedTextField("titley", "graphics", view);
    jptitles.add(jtextTitleY);

    JButton butsearch = new HelpedButton(Translator.getTranslation("Find background image"),
View Full Code Here

   *
   * @param  jPanel1  Description of the Parameter
   */
  public void getSpecialGuiPane(JPanel jPanel1) {
    AddDateComponents(jPanel1, "allreports");
    JLabel label1 = new HelpedLabel(Translator.getTranslation("Account"),
        "Account", "allreports", view);
    jPanel1.add(label1);
    accountComboBox = new DataComboBox(new JdbcTable("APP.Account", 2, view), true,
        "Account", "allreports", view);
    accountComboBox.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
    accountComboBox.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));
    jPanel1.add(accountComboBox);

    JLabel label2 = new HelpedLabel(Translator.getTranslation("Customer"),
        "Customer", "allreports", view);
    jPanel1.add(label2);
    customerComboBox = new DataComboBox(new JdbcTable(
        "SELECT CompId,CustId,CustName FROM Customer2 WHERE CompId=? ORDER BY CustName"
        , view, new int[]{Types.INTEGER}), true, "Customer", "allreports", view);
View Full Code Here

    toDateTextField.setText("");
    if (showDates) {
      dateLabelAndFieldPanel.setLayout(new GridLayout(2, 2));
      //fromDateTextField.setText("");
      //toDateTextField.setText("");
      dateLabelAndFieldPanel.add(new HelpedLabel(Translator.getTranslation("Start date"), "StartDate", "exportoptions", view));
      dateLabelAndFieldPanel.add(fromDateTextField);
      dateLabelAndFieldPanel.add(new HelpedLabel(Translator.getTranslation("Stop date"), "StopDate", "exportoptions", view));
      dateLabelAndFieldPanel.add(toDateTextField);
    }
    add(dateLabelAndFieldPanel);
  }//}}}
View Full Code Here


      JPanel topPanel = new JPanel();
      topPanel.setLayout(new GridLayout(1,1));
      getContentPane().add(topPanel, BorderLayout.NORTH);
      topPanel.add(new HelpedLabel(fileDialog.getSelectedFile().getAbsolutePath(), "company", helpFile, view));


      JPanel centerPanel = new JPanel();
      centerPanel.setLayout(new GridLayout(2,1));
     
      getContentPane().add(centerPanel, BorderLayout.CENTER);
 
      HelpedLabel label1 = new HelpedLabel(Translator.getTranslation("Company"), "company", helpFile, view);
      centerPanel.add(label1);
 
      comboBox = new DataComboBox(new JdbcTable("Company", 1, view), false, "company", helpFile, view);
      comboBox.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
      comboBox.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));
      centerPanel.add(comboBox);
 
      comboBox.loadComboBox("Name", "CompId", new Integer(0));
      comboBox.addItem("--- " + Translator.getTranslation("All") + " ---");
      //select the default company
      JdbcTable aa = new JdbcTable("Company", 1, view);
      try {
        aa.setObject(new Integer(
            SetupInfo.getProperty(SetupInfo.DEFAULT_COMPANY)),
            "CompId");
        if (aa.GetFirstRecord()) {
          comboBox.setSelectedItemFromKey((Integer)
              aa.getObject("CompId", null));
        }
      } catch (Exception ex) {
        comboBox.setSelectedItem("");
        /*
         *  just clear the dialog
         */
      }
      comboBox.setEnabled(true);
      label1.setEnabled(true);
     
      JPanel bottomPanel = new JPanel();
      bottomPanel.setLayout(new GridLayout(1,2));
      getContentPane().add(bottomPanel, BorderLayout.SOUTH);
     
View Full Code Here

TOP

Related Classes of nu.lazy8.util.help.HelpedLabel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.