Search in sources :

Example 1 with JideScrollPane

use of com.jidesoft.swing.JideScrollPane 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();
    }
}
Also used : FormLayout(com.jgoodies.forms.layout.FormLayout) PanelBuilder(com.jgoodies.forms.builder.PanelBuilder) JideScrollPane(com.jidesoft.swing.JideScrollPane) JToolBar(javax.swing.JToolBar) Dimension(java.awt.Dimension) CellConstraints(com.jgoodies.forms.layout.CellConstraints)

Aggregations

PanelBuilder (com.jgoodies.forms.builder.PanelBuilder)1 CellConstraints (com.jgoodies.forms.layout.CellConstraints)1 FormLayout (com.jgoodies.forms.layout.FormLayout)1 JideScrollPane (com.jidesoft.swing.JideScrollPane)1 Dimension (java.awt.Dimension)1 JToolBar (javax.swing.JToolBar)1