use of jgnash.ui.components.DatePanel in project jgnash by ccavanaugh.
the class DayTab method layoutMainPanel.
private void layoutMainPanel() {
FormLayout layout = new FormLayout("right:p, $lcgap, f:p, 2dlu, max(48dlu;min), 2dlu, f:p", "f:p, $lgap, f:p, $lgap, f:p");
layout.setRowGroups(new int[][] { { 1, 3, 5 } });
setLayout(layout);
setBorder(Borders.DIALOG);
CellConstraints cc = new CellConstraints();
noEndButton = new JRadioButton(rb.getString("Button.NoEndDate"));
endButton = new JRadioButton();
endDateField = new DatePanel();
group.add(noEndButton);
group.add(endButton);
numberSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 365, 1));
add(new JLabel(rb.getString("Label.Every")), cc.xy(1, 1));
add(numberSpinner, cc.xywh(3, 1, 3, 1));
add(new JLabel(rb.getString("Tab.Day")), cc.xy(7, 1));
add(new JLabel(rb.getString("Label.EndOn")), cc.xy(1, 3));
add(noEndButton, cc.xywh(3, 3, 5, 1));
add(endButton, cc.xy(3, 5));
add(endDateField, cc.xy(5, 5));
}
use of jgnash.ui.components.DatePanel in project jgnash by ccavanaugh.
the class YearTab method layoutMainPanel.
private void layoutMainPanel() {
FormLayout layout = new FormLayout("right:p, $lcgap, f:p, 2dlu, max(48dlu;min), 2dlu, f:p", "f:p, $lgap, f:p, $lgap, f:p");
layout.setRowGroups(new int[][] { { 1, 3, 5 } });
setLayout(layout);
setBorder(Borders.DIALOG);
CellConstraints cc = new CellConstraints();
noEndButton = new JRadioButton(rb.getString("Button.NoEndDate"));
endButton = new JRadioButton();
endDateField = new DatePanel();
group.add(noEndButton);
group.add(endButton);
numberSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 100, 1));
add(new JLabel(rb.getString("Label.Every")), cc.xy(1, 1));
add(numberSpinner, cc.xywh(3, 1, 3, 1));
add(new JLabel(rb.getString("Tab.Year")), cc.xy(7, 1));
add(new JLabel(rb.getString("Label.EndOn")), cc.xy(1, 3));
add(noEndButton, cc.xywh(3, 3, 5, 1));
add(endButton, cc.xy(3, 5));
add(endDateField, cc.xy(5, 5));
}
use of jgnash.ui.components.DatePanel 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.DatePanel in project jgnash by ccavanaugh.
the class MonthTab method layoutMainPanel.
private void layoutMainPanel() {
FormLayout layout = new FormLayout("right:p, $lcgap, f:p, 2dlu, max(48dlu;min), 2dlu, f:p, 10dlu, right:p, 4dlu, max(48dlu;min)", "f:p, $lgap, f:p, $lgap, f:p");
layout.setRowGroups(new int[][] { { 1, 3, 5 } });
setLayout(layout);
setBorder(Borders.DIALOG);
CellConstraints cc = new CellConstraints();
noEndButton = new JRadioButton(rb.getString("Button.NoEndDate"));
endButton = new JRadioButton();
endDateField = new DatePanel();
group.add(noEndButton);
group.add(endButton);
numberSpinner = new JSpinner(new SpinnerNumberModel(1, 1, 24, 1));
typeComboBox = new JComboBox<>();
typeComboBox.setModel(new DefaultComboBoxModel<>(new String[] { rb.getString("Column.Date"), rb.getString("Column.Day") }));
add(new JLabel(rb.getString("Label.Every")), cc.xy(1, 1));
add(numberSpinner, cc.xywh(3, 1, 3, 1));
add(new JLabel(rb.getString("Tab.Month")), cc.xy(7, 1));
add(new JLabel(rb.getString("Label.By")), cc.xy(9, 1));
add(typeComboBox, cc.xy(11, 1));
add(new JLabel(rb.getString("Label.EndOn")), cc.xy(1, 3));
add(noEndButton, cc.xyw(3, 3, 5));
add(endButton, cc.xy(3, 5));
add(endDateField, cc.xy(5, 5));
}
use of jgnash.ui.components.DatePanel in project jgnash by ccavanaugh.
the class RecurringEntryDialog method createFreqPanel.
private JPanel createFreqPanel() {
FormLayout layout = new FormLayout("right:p, 4dlu, max(48dlu;min), 6dlu, p, f:p:g", "f:p, 3dlu, min");
CellConstraints cc = new CellConstraints();
JPanel p = new JPanel(layout);
startDateField = new DatePanel();
enabledCheckBox = new JCheckBox(rb.getString("Button.Enabled"));
freqTab = new JTabbedPane();
freqTab.add(rb.getString("Tab.None"), new NoneTab());
freqTab.add(rb.getString("Tab.Day"), new DayTab());
freqTab.add(rb.getString("Tab.Week"), new WeekTab());
freqTab.add(rb.getString("Tab.Month"), new MonthTab());
freqTab.add(rb.getString("Tab.Year"), new YearTab());
tabMap.put(OneTimeReminder.class, 0);
tabMap.put(DailyReminder.class, 1);
tabMap.put(WeeklyReminder.class, 2);
tabMap.put(MonthlyReminder.class, 3);
tabMap.put(YearlyReminder.class, 4);
p.add(new JLabel(rb.getString("Label.FirstPayDate")), cc.xy(1, 1));
p.add(startDateField, cc.xy(3, 1));
p.add(enabledCheckBox, cc.xy(5, 1));
p.add(freqTab, cc.xywh(1, 3, 6, 1));
return p;
}
Aggregations