use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class BudgetWizardDialog method initComponents.
private void initComponents() {
okButton = new JButton(rb.getString("Button.Ok"));
cancelButton = new JButton(rb.getString("Button.Cancel"));
budgetPeriodCombo = new JComboBox<>();
budgetPeriodCombo.setModel(new DefaultComboBoxModel<>(Period.values()));
budgetPeriodCombo.setSelectedItem(Period.MONTHLY);
budgetNameField = new JTextField();
DefaultUnitConverter unitConverter = DefaultUnitConverter.getInstance();
helpPane = new JEditorPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("NewBudgetOne.txt"));
helpPane.setPreferredSize(new Dimension(unitConverter.dialogUnitXAsPixel(DLU_X, helpPane), unitConverter.dialogUnitYAsPixel(DLU_Y, helpPane)));
roundButton = new JCheckBox(rb.getString("Button.RoundToWhole"));
okButton.addActionListener(this);
cancelButton.addActionListener(this);
}
use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class ImportTwo method initComponents.
private void initComponents() {
table = new ImportTable();
deleteButton = new JButton(rb.getString("Button.Delete"));
helpPane = new JTextPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("ImportTwo.txt"));
addComponentListener(new ComponentAdapter() {
@Override
public void componentShown(ComponentEvent evt) {
refreshInfo();
}
});
deleteButton.addActionListener(this);
JTableUtils.packGenericTable(table);
}
use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class NewFileThree method initComponents.
private void initComponents() {
addButton = new JButton(rb.getString("Button.Add"));
addButton.setIcon(IconUtils.getIcon("/jgnash/resource/list-add.png"));
addButton.setHorizontalTextPosition(SwingConstants.LEADING);
removeButton = new JButton(rb.getString("Button.Remove"));
removeButton.setIcon(IconUtils.getIcon("/jgnash/resource/list-remove.png"));
aJList = new JList<>();
cJList = new JList<>();
helpPane = new JEditorPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("NewFileThree.txt"));
addButton.addActionListener(this);
removeButton.addActionListener(this);
}
use of javax.swing.text.StyledEditorKit 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"));
}
use of javax.swing.text.StyledEditorKit 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);
}
}
Aggregations