Search in sources :

Example 31 with JTextPane

use of javax.swing.JTextPane in project jgnash by ccavanaugh.

the class ImportOne method initComponents.

private void initComponents() {
    accountCombo = new AccountListComboBox();
    helpPane = new JTextPane();
    helpPane.setEditable(false);
    helpPane.setEditorKit(new StyledEditorKit());
    helpPane.setBackground(getBackground());
    helpPane.setText(TextResource.getString("ImportOne.txt"));
}
Also used : StyledEditorKit(javax.swing.text.StyledEditorKit) JTextPane(javax.swing.JTextPane) AccountListComboBox(jgnash.ui.components.AccountListComboBox)

Example 32 with JTextPane

use of javax.swing.JTextPane in project jgnash by ccavanaugh.

the class PartialOne method initComponents.

private void initComponents() {
    accountCombo = new AccountListComboBox();
    helpPane = new JTextPane();
    helpPane.setEditable(false);
    helpPane.setEditorKit(new StyledEditorKit());
    helpPane.setBackground(getBackground());
    helpPane.setText(TextResource.getString("QifOne.txt"));
    /* Create the combo for date format selection */
    dateFormatCombo = new JComboBox<>(DateFormat.values());
    dateFormatCombo.addActionListener(this);
    dateFormatCombo.setSelectedIndex(pref.getInt(DATE_FORMAT, 0));
    accountCombo.addActionListener(this);
    /* Try a set the comboBox to the last selected account */
    String lastAccount = pref.get(LAST_ACCOUNT, "");
    final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT);
    Objects.requireNonNull(engine);
    final Account last = engine.getAccountByUuid(lastAccount);
    if (last != null) {
        setAccount(last);
    }
}
Also used : StyledEditorKit(javax.swing.text.StyledEditorKit) JTextPane(javax.swing.JTextPane) QifAccount(jgnash.convert.imports.qif.QifAccount) Account(jgnash.engine.Account) AccountListComboBox(jgnash.ui.components.AccountListComboBox) Engine(jgnash.engine.Engine)

Aggregations

JTextPane (javax.swing.JTextPane)32 JScrollPane (javax.swing.JScrollPane)13 JButton (javax.swing.JButton)9 JLabel (javax.swing.JLabel)9 JPanel (javax.swing.JPanel)8 Color (java.awt.Color)6 Dimension (java.awt.Dimension)6 JRadioButton (javax.swing.JRadioButton)6 JTextField (javax.swing.JTextField)6 Insets (java.awt.Insets)4 IOException (java.io.IOException)4 JCheckBox (javax.swing.JCheckBox)4 JPasswordField (javax.swing.JPasswordField)4 JTable (javax.swing.JTable)4 BorderLayout (java.awt.BorderLayout)3 Component (java.awt.Component)3 FlowLayout (java.awt.FlowLayout)3 Font (java.awt.Font)3 GridBagConstraints (java.awt.GridBagConstraints)3 GridBagLayout (java.awt.GridBagLayout)3