Search in sources :

Example 6 with JTextFieldEx

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

the class NetworkOptions method initComponents.

private void initComponents() {
    proxyCheckBox = new JCheckBox(rb.getString("Button.UseProxy"));
    hostField = new JTextFieldEx();
    portField = new JIntegerField();
    authCheckBox = new JCheckBox(rb.getString("Button.HTTPAuth"));
    nameField = new JTextFieldEx();
    passwordField = new JPasswordField();
    SpinnerNumberModel model = new SpinnerNumberModel(ConnectionFactory.getConnectionTimeout(), ConnectionFactory.MIN_TIMEOUT, ConnectionFactory.MAX_TIMEOUT, 1);
    connectionTimeout = new JSpinner(model);
}
Also used : JCheckBox(javax.swing.JCheckBox) JIntegerField(jgnash.ui.components.JIntegerField) SpinnerNumberModel(javax.swing.SpinnerNumberModel) JPasswordField(javax.swing.JPasswordField) JSpinner(javax.swing.JSpinner) JTextFieldEx(jgnash.ui.components.JTextFieldEx)

Example 7 with JTextFieldEx

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

the class AccountPanel method initComponents.

private void initComponents() {
    accountNumberField = new JTextFieldEx();
    accountCodeField = new JIntegerField();
    nameField = new JTextFieldEx();
    bankIdField = new JTextFieldEx();
    nameField.setText(rb.getString("Word.Name"));
    descriptionField = new JTextFieldEx();
    descriptionField.setText(rb.getString("Word.Description"));
    currencyCombo = new CurrencyComboBox();
    securityButton = new JButton(rb.getString("Word.None"));
    // for preferred width so button does not force a wide layout
    securityButton.setPreferredSize(new Dimension(20, securityButton.getPreferredSize().height));
    accountTypeModel = new DefaultComboBoxModel<>(AccountType.values());
    accountTypeModel.removeElement(AccountType.ROOT);
    accountTypeCombo = new JComboBox<>(accountTypeModel);
    lockedCheckBox = new JCheckBox(rb.getString("Button.Locked"));
    placeholderCheckBox = new JCheckBox(rb.getString("Button.PlaceHolder"));
    hideCheckBox = new JCheckBox(rb.getString("Button.HideAccount"));
    excludeBudgetCheckBox = new JCheckBox(rb.getString("Button.ExcludeFromBudget"));
    parentButton = new JButton("Root");
    notesArea = new javax.swing.JTextArea();
    notesArea.setLineWrap(true);
    notesArea.setAutoscrolls(false);
    notesArea.setPreferredSize(new java.awt.Dimension(100, 80));
    accountTypeCombo.addActionListener(this);
    securityButton.addActionListener(this);
    parentButton.addActionListener(this);
}
Also used : JIntegerField(jgnash.ui.components.JIntegerField) JCheckBox(javax.swing.JCheckBox) Dimension(java.awt.Dimension) CurrencyComboBox(jgnash.ui.components.CurrencyComboBox) JButton(javax.swing.JButton) JTextFieldEx(jgnash.ui.components.JTextFieldEx) Dimension(java.awt.Dimension) JTextArea(javax.swing.JTextArea)

Example 8 with JTextFieldEx

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

the class TransactionNumberDialog method initComponents.

private void initComponents() {
    final ResourceBundle rb = ResourceUtils.getBundle();
    final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT);
    Objects.requireNonNull(engine);
    setTitle(rb.getString("Title.DefTranNum"));
    okButton = new JButton(rb.getString("Button.Ok"));
    cancelButton = new JButton(rb.getString("Button.Cancel"));
    insertButton = new JButton(rb.getString("Button.Insert"));
    removeButton = new JButton(rb.getString("Button.Remove"));
    upButton = new JButton(IconUtils.getIcon("/jgnash/resource/stock_up-16.png"));
    downButton = new JButton(IconUtils.getIcon("/jgnash/resource/stock_down-16.png"));
    insertButton.addActionListener(this);
    cancelButton.addActionListener(this);
    okButton.addActionListener(this);
    removeButton.addActionListener(this);
    upButton.addActionListener(this);
    downButton.addActionListener(this);
    model = new DefaultListModel<>();
    final List<String> items = engine.getTransactionNumberList();
    items.forEach(model::addElement);
    list = new JList<>(model);
    entryField = new JTextFieldEx(10);
}
Also used : JButton(javax.swing.JButton) ResourceBundle(java.util.ResourceBundle) JTextFieldEx(jgnash.ui.components.JTextFieldEx) Engine(jgnash.engine.Engine)

Example 9 with JTextFieldEx

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

the class SecurityModifyPanel method initComponents.

private void initComponents() {
    securityList = new JList<>();
    securityList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    symbolField = new JTextFieldEx();
    descriptionField = new JTextFieldEx();
    scaleField = new JIntegerField();
    scaleField.setToolTipText(rb.getString("ToolTip.Scale"));
    isinField = new JTextFieldEx();
    isinField.setToolTipText(rb.getString("ToolTip.ISIN"));
    sourceComboBox = new QuoteSourceComboBox();
    currencyCombo = new CurrencyComboBox();
    currencyCombo.setSelectedNode(engine.getDefaultCurrency());
    newButton = new JButton(rb.getString("Button.New"));
    deleteButton = new JButton(rb.getString("Button.Delete"));
    cancelButton = new JButton(rb.getString("Button.Cancel"));
    applyButton = new JButton(rb.getString("Button.Apply"));
    applyButton.addActionListener(this);
    cancelButton.addActionListener(this);
    deleteButton.addActionListener(this);
    newButton.addActionListener(this);
    buildLists();
}
Also used : JIntegerField(jgnash.ui.components.JIntegerField) CurrencyComboBox(jgnash.ui.components.CurrencyComboBox) JButton(javax.swing.JButton) JTextFieldEx(jgnash.ui.components.JTextFieldEx) QuoteSourceComboBox(jgnash.ui.components.QuoteSourceComboBox)

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