Search in sources :

Example 1 with CheckList

use of alma.acs.gui.widgets.CheckList in project ACS by ACS-Community.

the class FilterChooserDialog method initialize.

/**
	 * Init the GUI
	 */
private void initialize() {
    setLocation(50, 50);
    // Add the toolbars
    initMenubar();
    initToolbar();
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    description = new JLabel("Select filter to apply");
    c = newConstraints(0, 0, 0, 4);
    c.gridwidth = 3;
    panel.add(description, c);
    c = newConstraints(0, 1, 0, 4);
    c.gridwidth = 3;
    c.weighty = 1.0;
    c.fill = GridBagConstraints.BOTH;
    filterList = new CheckList();
    panel.add(new JScrollPane(filterList), c);
    JSeparator sep = new JSeparator();
    GridBagConstraints constr = newConstraints(0, 2, 4, 4);
    constr.gridwidth = 3;
    panel.add(sep, constr);
    buttonApply = new JButton("Apply");
    buttonApply.addActionListener(bl);
    panel.add(buttonApply, newConstraints(0, 3, 4, 4));
    buttonRestore = new JButton("Restore");
    buttonRestore.addActionListener(bl);
    panel.add(buttonRestore, newConstraints(1, 3, 4, 4));
    buttonClose = new JButton("Close");
    buttonClose.addActionListener(bl);
    panel.add(buttonClose, newConstraints(2, 3, 4, 4));
    getContentPane().add(panel, BorderLayout.CENTER);
    pack();
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) CheckList(alma.acs.gui.widgets.CheckList) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JSeparator(javax.swing.JSeparator)

Aggregations

CheckList (alma.acs.gui.widgets.CheckList)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JSeparator (javax.swing.JSeparator)1