Search in sources :

Example 6 with JIntegerField

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);
}
Also used : JIntegerField(jgnash.ui.components.JIntegerField) ChartPanel(org.jfree.chart.ChartPanel) JFloatField(jgnash.ui.components.JFloatField) XYPlot(org.jfree.chart.plot.XYPlot) DatePanel(jgnash.ui.components.DatePanel) JButton(javax.swing.JButton) SecurityComboBox(jgnash.ui.components.SecurityComboBox) Dimension(java.awt.Dimension) JFreeChart(org.jfree.chart.JFreeChart)

Example 7 with JIntegerField

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();
}
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

JIntegerField (jgnash.ui.components.JIntegerField)7 JButton (javax.swing.JButton)5 JTextFieldEx (jgnash.ui.components.JTextFieldEx)5 JCheckBox (javax.swing.JCheckBox)4 Dimension (java.awt.Dimension)2 CurrencyComboBox (jgnash.ui.components.CurrencyComboBox)2 DatePanel (jgnash.ui.components.DatePanel)2 JFloatField (jgnash.ui.components.JFloatField)2 CellConstraints (com.jgoodies.forms.layout.CellConstraints)1 FormLayout (com.jgoodies.forms.layout.FormLayout)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JPasswordField (javax.swing.JPasswordField)1 JSpinner (javax.swing.JSpinner)1 JTextArea (javax.swing.JTextArea)1 SpinnerNumberModel (javax.swing.SpinnerNumberModel)1 JDateField (jgnash.ui.components.JDateField)1 QuoteSourceComboBox (jgnash.ui.components.QuoteSourceComboBox)1 SecurityComboBox (jgnash.ui.components.SecurityComboBox)1 ChartPanel (org.jfree.chart.ChartPanel)1