Search in sources :

Example 51 with JCheckBox

use of javax.swing.JCheckBox in project pcgen by PCGen.

the class PreferencesPerformancePanel method initComponents.

private void initComponents() {
    setLayout(new BorderLayout());
    mainPanel = new JPanel();
    refreshOnStateChange = new JCheckBox();
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
    //$NON-NLS-1$
    refreshOnStateChange.setText(LanguageBundle.getString("in_plugin_init_refreshOnChange"));
    mainPanel.add(refreshOnStateChange);
    JScrollPane jScrollPane1 = new JScrollPane();
    jScrollPane1.setViewportView(mainPanel);
    add(jScrollPane1, BorderLayout.CENTER);
}
Also used : JCheckBox(javax.swing.JCheckBox) JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout)

Example 52 with JCheckBox

use of javax.swing.JCheckBox in project ACS by ACS-Community.

the class FilterTypePanel method createComponents.

/* (non-Javadoc)
	 * @see com.cosylab.logging.settings.FilterParameterPanel#createComponents()
	 */
public void createComponents() {
    // Build the renderer for the combo boxes
    rendererMin = new LogTypeRenderer();
    rendererMax = new LogTypeRenderer();
    rendererExact = new LogTypeRenderer();
    JPanel panelTop = new JPanel(new GridBagLayout());
    add(panelTop, newConstraints(0, 4, 4, 4, 4));
    notCheck = new JCheckBox("Discard entries matching this filter");
    notCheck.setToolTipText("Keep/discard entries matching this filter");
    panelTop.add(notCheck, newConstraints(0, 4, 4, 4, 4));
    minimumCheck = new JCheckBox("Minimum value");
    minimumCheck.addItemListener(this);
    panelTop.add(minimumCheck, newConstraints(1, 4, 0, 0, 0));
    LogTypeHelper[] logTypes = LogTypeHelper.values();
    minimum = new JComboBox(logTypes);
    minimum.setSelectedIndex(0);
    minimum.setEditable(false);
    minimum.setMaximumRowCount(logTypes.length);
    minimum.setRenderer(rendererMin);
    panelTop.add(minimum, newConstraints(2, 0, 0, 4, 0));
    maximumCheck = new JCheckBox("Maximum value");
    maximumCheck.addItemListener(this);
    panelTop.add(maximumCheck, newConstraints(3, 4, 0, 0, 0));
    maximum = new JComboBox(logTypes);
    maximum.setSelectedIndex(0);
    maximum.setEditable(false);
    maximum.setMaximumRowCount(logTypes.length);
    maximum.setRenderer(rendererMax);
    panelTop.add(maximum, newConstraints(4, 0, 0, 4, 0));
    JPanel panelBottom = new JPanel(new GridBagLayout());
    add(panelBottom, newConstraints(1, 4, 4, 4, 4));
    exactCheck = new JCheckBox("Exact value");
    exactCheck.addItemListener(this);
    panelBottom.add(exactCheck, newConstraints(0, 4, 0, 0, 0));
    exact = new JComboBox(logTypes);
    exact.setSelectedIndex(0);
    exact.setEditable(false);
    exact.setMaximumRowCount(logTypes.length);
    exact.setRenderer(rendererExact);
    panelBottom.add(exact, newConstraints(1, 0, 0, 4, 0));
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) GridBagLayout(java.awt.GridBagLayout) JComboBox(javax.swing.JComboBox) LogTypeHelper(com.cosylab.logging.engine.log.LogTypeHelper)

Example 53 with JCheckBox

use of javax.swing.JCheckBox in project ACS by ACS-Community.

the class FilterStringPanel method createComponents.

/**
 * Insert the method's description here.
 * Creation date: (2/7/02 11:41:10 AM)
 */
protected void createComponents() {
    SelectionChecked sc = new SelectionChecked();
    notCheck = new JCheckBox("Discard entries matching this filter");
    notCheck.setToolTipText("Keep/discard entries matching this filter");
    add(notCheck, newConstraints(0, 4, 4, 4, 4));
    exactCheck = new JCheckBox("Exact value");
    exactCheck.addItemListener(sc);
    add(exactCheck, newConstraints(1, 4, 4, 0, 4));
    exact = new JTextField();
    add(exact, newConstraints(2, 0, 4, 4, 4));
    regexpCheck = new JCheckBox("Regular expression pattern");
    regexpCheck.addItemListener(sc);
    add(regexpCheck, newConstraints(3, 4, 4, 0, 4));
    regexp = new JTextField();
    add(regexp, newConstraints(4, 0, 4, 4, 4));
}
Also used : JCheckBox(javax.swing.JCheckBox) JTextField(javax.swing.JTextField)

Example 54 with JCheckBox

use of javax.swing.JCheckBox in project ACS by ACS-Community.

the class LoadSwitchesPanel method initGUI.

/**
	 * Initialize the panel
	 */
private void initGUI() {
    clearLogsCB = new JCheckBox("Clear log table", true);
    disconnectCB = new JCheckBox("Disconnect", true);
    checkControlsState();
    setLayout(new FlowLayout(FlowLayout.LEFT));
    add(clearLogsCB);
    add(disconnectCB);
    // Add a border
    TitledBorder border = BorderFactory.createTitledBorder("GUI setup");
    this.setBorder(border);
}
Also used : JCheckBox(javax.swing.JCheckBox) FlowLayout(java.awt.FlowLayout) TitledBorder(javax.swing.border.TitledBorder)

Example 55 with JCheckBox

use of javax.swing.JCheckBox in project EnrichmentMapApp by BaderLab.

the class MasterDetailDialogPage method createDataSetPanel.

private JPanel createDataSetPanel() {
    JPanel titlePanel = createTitlePanel();
    dataSetListModel = new IterableListModel<>();
    dataSetList = new DataSetList(dataSetListModel);
    dataSetList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    dataSetList.addListSelectionListener(e -> selectItem(dataSetList.getSelectedValue()));
    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setViewportView(dataSetList);
    dataSetDetailPanel = new JPanel(new BorderLayout());
    dataSetDetailPanel.setBorder(BorderFactory.createLineBorder(UIManager.getColor("Separator.foreground")));
    cardLayout = new CardLayout();
    dataSetDetailPanel.setLayout(cardLayout);
    // Blank page
    dataSetDetailPanel.add(new EditNothingPanel(), "nothing");
    // Common page
    dataSetListModel.addElement(commonParams);
    dataSetDetailPanel.add(commonParams.getDetailPanel().getPanel(), commonParams.id);
    distinctEdgesCheckbox = new JCheckBox("Create separate edges for each dataset");
    SwingUtil.makeSmall(distinctEdgesCheckbox);
    JPanel checkboxPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0));
    checkboxPanel.add(distinctEdgesCheckbox);
    // Make the NORTH area of both panels the same size
    titlePanel.doLayout();
    checkboxPanel.setPreferredSize(titlePanel.getPreferredSize());
    JPanel leftPanel = new JPanel(new BorderLayout());
    leftPanel.add(titlePanel, BorderLayout.NORTH);
    leftPanel.add(scrollPane, BorderLayout.CENTER);
    JPanel rightPanel = new JPanel(new BorderLayout());
    rightPanel.add(checkboxPanel, BorderLayout.NORTH);
    rightPanel.add(dataSetDetailPanel, BorderLayout.CENTER);
    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel);
    splitPane.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
    splitPane.setResizeWeight(0.3);
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(splitPane, BorderLayout.CENTER);
    return panel;
}
Also used : JScrollPane(javax.swing.JScrollPane) JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) CardLayout(java.awt.CardLayout) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) JSplitPane(javax.swing.JSplitPane)

Aggregations

JCheckBox (javax.swing.JCheckBox)491 JPanel (javax.swing.JPanel)199 JLabel (javax.swing.JLabel)155 JButton (javax.swing.JButton)108 ActionEvent (java.awt.event.ActionEvent)98 ActionListener (java.awt.event.ActionListener)93 JTextField (javax.swing.JTextField)88 GridBagConstraints (java.awt.GridBagConstraints)82 GridBagLayout (java.awt.GridBagLayout)77 Insets (java.awt.Insets)66 BorderLayout (java.awt.BorderLayout)63 Dimension (java.awt.Dimension)59 BoxLayout (javax.swing.BoxLayout)56 JScrollPane (javax.swing.JScrollPane)38 ItemEvent (java.awt.event.ItemEvent)37 ItemListener (java.awt.event.ItemListener)34 FlowLayout (java.awt.FlowLayout)33 JComboBox (javax.swing.JComboBox)33 JRadioButton (javax.swing.JRadioButton)32 Box (javax.swing.Box)30