use of javax.swing.JToolBar in project JMRI by JMRI.
the class MdiMainFrame method addMainToolBar.
protected void addMainToolBar(String toolBarFile) {
// no context
JToolBar toolBar = JToolBarUtil.loadToolBar(toolBarFile, rightWI, null);
// this takes up space at the top until pulled to floating
add(toolBar, BorderLayout.NORTH);
}
use of javax.swing.JToolBar in project JMRI by JMRI.
the class MultiPaneWindow method addMainToolBar.
protected void addMainToolBar(String toolBarFile) {
JToolBar toolBar = JToolBarUtil.loadToolBar(toolBarFile, rightTopWI, null);
// this takes up space at the top until pulled to floating
add(toolBar, BorderLayout.NORTH);
}
use of javax.swing.JToolBar in project jgnash by ccavanaugh.
the class MainRegisterPanel method layoutMainPanel.
private void layoutMainPanel() {
final ResourceBundle rb = ResourceUtils.getBundle();
JPanel toolPanel;
toolPanel = new JPanel();
registerPane = new JSplitPane();
registerPane.setOneTouchExpandable(true);
setLayout(new BorderLayout());
toolPanel.setLayout(new BorderLayout());
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.setRollover(true);
reconcileButton = new RollOverButton(rb.getString("Button.Reconcile"), IconUtils.getIcon("/jgnash/resource/view-refresh.png"));
reconcileButton.setToolTipText(rb.getString("ToolTip.ReconcileAccount"));
reconcileButton.addActionListener(this);
toolBar.add(reconcileButton);
filterButton = new RollOverButton(rb.getString("Button.Filter"), IconUtils.getIcon("/jgnash/resource/preferences-system.png"));
filterButton.setToolTipText(rb.getString("ToolTip.FilterAccounts"));
filterButton.addActionListener(this);
toolBar.add(filterButton);
columnsButton = new RollOverButton(rb.getString("Button.Columns"), IconUtils.getIcon("/jgnash/resource/stock_select-column.png"));
columnsButton.setToolTipText(rb.getString("ToolTip.ColumnVis"));
columnsButton.addActionListener(this);
toolBar.add(columnsButton);
resizeButton = new RollOverButton(rb.getString("Button.Resize"), IconUtils.getIcon("/jgnash/resource/stock_table-fit-width.png"));
resizeButton.setToolTipText(rb.getString("ToolTip.ResizeColumns"));
resizeButton.addActionListener(this);
toolBar.add(resizeButton);
zoomButton = new RollOverButton(rb.getString("Button.Zoom"), IconUtils.getIcon("/jgnash/resource/edit-find.png"));
zoomButton.setToolTipText(rb.getString("ToolTip.ZoomRegister"));
zoomButton.addActionListener(this);
toolBar.add(zoomButton);
printButton = new RollOverButton(rb.getString("Button.Print"), IconUtils.getIcon("/jgnash/resource/document-print.png"));
printButton.setToolTipText(rb.getString("ToolTip.PrintRegRep"));
printButton.addActionListener(this);
toolBar.add(printButton);
exportButton = new RollOverButton(rb.getString("Button.Export"), IconUtils.getIcon("/jgnash/resource/document-save-as.png"));
exportButton.setToolTipText(rb.getString("ToolTip.ExportTransactions"));
exportButton.addActionListener(this);
toolBar.add(exportButton);
toolPanel.add(toolBar, BorderLayout.NORTH);
toolPanel.add(new JSeparator(), BorderLayout.CENTER);
add(toolPanel, java.awt.BorderLayout.NORTH);
registerPane.setDividerLocation(50);
registerPane.setContinuousLayout(true);
registerTree = new RegisterTree();
registerTree.setBorder(new EmptyBorder(new Insets(0, 0, 2, 0)));
registerTree.expand();
registerPane.setLeftComponent(registerTree);
registerPane.setRightComponent(new JPanel(null));
add(registerPane, BorderLayout.CENTER);
registerPane.setDividerLocation(prefs.getInt(DIVIDER, registerPane.getDividerLocation()));
MessageBus.getInstance().registerListener(this, MessageChannel.ACCOUNT, MessageChannel.SYSTEM);
}
use of javax.swing.JToolBar in project jgnash by ccavanaugh.
the class BudgetPanel method layoutMainPanel.
private void layoutMainPanel() {
initComponents();
FormLayout layout = new FormLayout("fill:p:g, 5dlu", "d, $rg, d, f:p:g, 5dlu");
PanelBuilder builder = new PanelBuilder(layout, this);
CellConstraints cc = new CellConstraints();
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.setRollover(true);
toolBar.add(budgetCombo);
toolBar.add(budgetPropertiesButton);
toolBar.addSeparator();
toolBar.add(budgetManagerButton);
toolBar.addSeparator();
toolBar.add(summaryRowVisibleCheckBox);
toolBar.add(summaryColVisibleCheckBox);
toolBar.addSeparator();
toolBar.add(budgetExportButton);
builder.add(toolBar, cc.xyw(1, 1, 2));
scrollPane = new JideScrollPane();
// force it something small so it will resize correctly
scrollPane.setPreferredSize(new Dimension(1, 1));
scrollPane.setColumnHeadersHeightUnified(true);
rowHeaderResizeHandler = new AccountRowHeaderResizeHandler(scrollPane);
overviewPanel = new BudgetOverviewPanel(this);
add(overviewPanel, cc.xyw(1, 3, 2));
add(scrollPane, cc.xy(1, 4));
// listen for budget events
MessageBus.getInstance().registerListener(this, MessageChannel.BUDGET);
MessageBus.getInstance().registerListener(this, MessageChannel.SYSTEM);
if (budgetCombo.getSelectedBudget() != null) {
showBudgetPane();
}
}
use of javax.swing.JToolBar in project jgnash by ccavanaugh.
the class ActionParser method createToolBar.
public JToolBar createToolBar(final String id) {
JToolBar toolBar = new JToolBar();
ActionNode node = actionTrees.get(id);
for (int i = 0; i < node.size(); i++) {
if (node.id == null && node.idref == null) {
toolBar.addSeparator();
} else {
toolBar.add(createButton(node.getChildAt(i)));
}
}
return toolBar;
}
Aggregations