Search in sources :

Example 1 with JTextFieldEx

use of jgnash.ui.components.JTextFieldEx in project jgnash by ccavanaugh.

the class AmortizeDialog method initComponents.

private void initComponents() {
    dateField = new DatePanel();
    interestField = new JFloatField(0, 3, 2);
    loanAmountField = new JFloatField();
    loanTermField = new JIntegerField();
    payPeriodsField = new JIntegerField();
    intPeriodsField = new JIntegerField();
    feesField = new JFloatField();
    interestAccButton = new JButton(rb.getString("Word.None"));
    bankAccButton = new JButton(rb.getString("Word.None"));
    feesAccButton = new JButton(rb.getString("Word.None"));
    payeeField = new JTextFieldEx();
    memoField = new JTextFieldEx();
    useDaysButton = new JCheckBox(rb.getString("Button.UseDailyRate"));
    daysField = new JFloatField();
    cancelButton = new JButton(rb.getString("Button.Cancel"));
    okButton = new JButton(rb.getString("Button.Ok"));
}
Also used : JIntegerField(jgnash.ui.components.JIntegerField) JCheckBox(javax.swing.JCheckBox) JFloatField(jgnash.ui.components.JFloatField) DatePanel(jgnash.ui.components.DatePanel) JButton(javax.swing.JButton) JTextFieldEx(jgnash.ui.components.JTextFieldEx)

Example 2 with JTextFieldEx

use of jgnash.ui.components.JTextFieldEx in project jgnash by ccavanaugh.

the class CheckDesignDialog method initComponents.

private void initComponents() {
    toolBar = new JToolBar();
    toolBar.setRollover(true);
    openButton = new RollOverButton(rb.getString("Menu.Open.Name").replace("_", ""), IconUtils.getIcon("/jgnash/resource/document-open.png"));
    saveButton = new RollOverButton(rb.getString("Menu.Save.Name").replace("_", ""), IconUtils.getIcon("/jgnash/resource/document-save.png"));
    toolBar.add(openButton);
    toolBar.add(saveButton);
    checkLayout = new CheckLayout();
    layout = new PrintableCheckLayout(checkLayout);
    countField = getIntegerField();
    xPosField = getFloatField();
    yPosField = getFloatField();
    heightField = getFloatField();
    previewPanel = new PrintPreviewPanel(layout, layout.getPageFormat());
    objectList = new JList<>();
    //objectList.setPrototypeCellValue("Some dummy text");
    setupButton = new JButton(rb.getString("Button.PageSetup"));
    addButton = new JButton(rb.getString("Button.Add"));
    removeButton = new JButton(rb.getString("Button.Remove"));
    clearButton = new JButton(rb.getString("Button.Clear"));
    applyButton = new JButton(rb.getString("Button.Apply"));
    printButton = new JButton(rb.getString("Button.PrintSample"));
    closeButton = new JButton(rb.getString("Button.Close"));
    nameField = new JTextFieldEx();
    typeCombo = new JComboBox<>();
    DefaultComboBoxModel<CheckObjectType> comboModel = new DefaultComboBoxModel<>(CheckObjectType.values());
    typeCombo.setModel(comboModel);
    model = new DefaultListModel<>();
    objectList.setModel(model);
    objectList.addListSelectionListener(this);
    addButton.addActionListener(this);
    applyButton.addActionListener(this);
    closeButton.addActionListener(this);
    clearButton.addActionListener(this);
    countField.addActionListener(this);
    removeButton.addActionListener(this);
    setupButton.addActionListener(this);
    heightField.addActionListener(this);
    saveButton.addActionListener(this);
    openButton.addActionListener(this);
    printButton.addActionListener(this);
    heightField.addFocusListener(this);
    countField.addFocusListener(this);
}
Also used : RollOverButton(jgnash.ui.components.RollOverButton) JButton(javax.swing.JButton) JToolBar(javax.swing.JToolBar) JTextFieldEx(jgnash.ui.components.JTextFieldEx) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel) CheckObjectType(jgnash.engine.checks.CheckObject.CheckObjectType) CheckLayout(jgnash.engine.checks.CheckLayout)

Example 3 with JTextFieldEx

use of jgnash.ui.components.JTextFieldEx in project jgnash by ccavanaugh.

the class CurrencyModifyDialog method initComponents.

private void initComponents() {
    closeButton = new JButton(rb.getString("Button.Close"));
    sourceList = new JList<>();
    sourceList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    symbolField = new JTextFieldEx();
    descriptionField = new JTextFieldEx();
    scaleField = new JIntegerField();
    prefixField = new JTextFieldEx();
    suffixField = new JTextFieldEx();
    clearButton = new JButton(rb.getString("Button.Clear"));
    applyButton = new JButton(rb.getString("Button.Apply"));
    applyButton.addActionListener(this);
    clearButton.addActionListener(this);
    closeButton.addActionListener(this);
}
Also used : JIntegerField(jgnash.ui.components.JIntegerField) JButton(javax.swing.JButton) JTextFieldEx(jgnash.ui.components.JTextFieldEx)

Example 4 with JTextFieldEx

use of jgnash.ui.components.JTextFieldEx in project jgnash by ccavanaugh.

the class PrintCheckDialog method initComponents.

private void initComponents() {
    layoutField = new JTextFieldEx();
    selectButton = new JButton(rb.getString("Button.Select"));
    startSpinner = new JSpinner();
    incCheckBox = new JCheckBox(rb.getString("Button.IncCheckNums"));
    printButton = new JButton(rb.getString("Button.Print"));
    cancelButton = new JButton(rb.getString("Button.Cancel"));
    // set the spinner value to a safe start value
    startSpinner.getModel().setValue(1);
    cancelButton.addActionListener(this);
    printButton.addActionListener(this);
    selectButton.addActionListener(this);
    incCheckBox.setSelected(pref.getBoolean(INC_NUM, false));
}
Also used : JCheckBox(javax.swing.JCheckBox) JButton(javax.swing.JButton) JSpinner(javax.swing.JSpinner) JTextFieldEx(jgnash.ui.components.JTextFieldEx)

Example 5 with JTextFieldEx

use of jgnash.ui.components.JTextFieldEx in project jgnash by ccavanaugh.

the class RecurringEntryDialog method createTransactionPanel.

private JPanel createTransactionPanel() {
    FormLayout layout = new FormLayout("left:p, 4dlu, p:g, 4dlu, p", "f:p, 3dlu, f:p, 3dlu, f:p, 3dlu, f:40dlu:g");
    layout.setRowGroups(new int[][] { { 1, 3, 5 } });
    CellConstraints cc = new CellConstraints();
    JPanel p = new JPanel(layout);
    descriptionField = new JTextFieldEx();
    accountCombo = new AccountListComboBox();
    notesArea = new JTextArea(5, 20);
    notesArea.setLineWrap(true);
    notesArea.setAutoscrolls(true);
    JScrollPane pane = new JScrollPane(notesArea);
    pane.setAutoscrolls(true);
    transactionField = new JTextFieldEx();
    transactionField.setEditable(false);
    editButton = new JButton(rb.getString("Button.Edit"));
    deleteButton = new JButton(rb.getString("Button.Delete"));
    p.add(new JLabel(rb.getString("Label.Account")), cc.xy(1, 1));
    p.add(accountCombo, cc.xywh(3, 1, 3, 1));
    p.add(new JLabel(rb.getString("Label.Description")), cc.xy(1, 3));
    p.add(descriptionField, cc.xywh(3, 3, 3, 1));
    p.add(new JLabel(rb.getString("Label.Transaction")), cc.xy(1, 5));
    p.add(transactionField, cc.xy(3, 5));
    p.add(new ButtonBarBuilder().addButton(editButton, deleteButton).build(), cc.xy(5, 5));
    p.add(new JLabel(rb.getString("Label.Notes")), cc.xy(1, 7));
    p.add(pane, cc.xywh(3, 7, 3, 1));
    return p;
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) JTextArea(javax.swing.JTextArea) ButtonBarBuilder(com.jgoodies.forms.builder.ButtonBarBuilder) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextFieldEx(jgnash.ui.components.JTextFieldEx) AccountListComboBox(jgnash.ui.components.AccountListComboBox) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Aggregations

JTextFieldEx (jgnash.ui.components.JTextFieldEx)9 JButton (javax.swing.JButton)8 JIntegerField (jgnash.ui.components.JIntegerField)5 JCheckBox (javax.swing.JCheckBox)4 JSpinner (javax.swing.JSpinner)2 JTextArea (javax.swing.JTextArea)2 CurrencyComboBox (jgnash.ui.components.CurrencyComboBox)2 ButtonBarBuilder (com.jgoodies.forms.builder.ButtonBarBuilder)1 CellConstraints (com.jgoodies.forms.layout.CellConstraints)1 FormLayout (com.jgoodies.forms.layout.FormLayout)1 Dimension (java.awt.Dimension)1 ResourceBundle (java.util.ResourceBundle)1 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JPasswordField (javax.swing.JPasswordField)1 JScrollPane (javax.swing.JScrollPane)1 JToolBar (javax.swing.JToolBar)1 SpinnerNumberModel (javax.swing.SpinnerNumberModel)1 Engine (jgnash.engine.Engine)1