use of jgnash.ui.components.JIntegerField in project jgnash by ccavanaugh.
the class SecuritiesHistoryDialog method initComponents.
private void initComponents() {
dateField = new DatePanel();
closeField = new JFloatField();
lowField = new JFloatField();
highField = new JFloatField();
securityCombo = new SecurityComboBox();
volumeField = new JIntegerField();
updateButton = new JButton(rb.getString("Button.UpdateOnline"), IconUtils.getIcon("/jgnash/resource/applications-internet.png"));
deleteButton = new JButton(rb.getString("Button.Delete"));
clearButton = new JButton(rb.getString("Button.Clear"));
applyButton = new JButton(rb.getString("Button.Add"));
closeButton = new JButton(rb.getString("Button.Close"));
model = new HistoryModel();
table = new HistoryTable();
table.setModel(model);
table.setPreferredScrollableViewportSize(new Dimension(150, 120));
table.setCellSelectionEnabled(false);
table.setColumnSelectionAllowed(false);
table.setRowSelectionAllowed(true);
table.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
table.setRowSorter(new TableRowSorter<>(model));
table.setFillsViewportHeight(true);
// create an empty chart for panel construction
chartPanel = new ChartPanel(new JFreeChart(new XYPlot()));
chartPanel.setPreferredSize(new Dimension(150, 90));
applyButton.addActionListener(this);
clearButton.addActionListener(this);
deleteButton.addActionListener(this);
updateButton.addActionListener(this);
securityCombo.addActionListener(this);
closeButton.addActionListener(this);
}
use of jgnash.ui.components.JIntegerField 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();
}
Aggregations