Search in sources :

Example 46 with FlowLayout

use of java.awt.FlowLayout 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)

Example 47 with FlowLayout

use of java.awt.FlowLayout in project ACS by ACS-Community.

the class CernSysPanel method initialize.

/**
	 * Init the GUI
	 *
	 */
private void initialize(UndocAlarmTableModel undocModel) {
    setLayout(new BorderLayout());
    // Build GUI objects
    model = new AlarmTableModel(this, ACTIVATE_RDUCTION_RULES, false, undocModel);
    model.start();
    alarmSound = new AlarmSound(model);
    statusLine = new StatusLine(model, this);
    alarmTable = new AlarmTable(model, this, undocModel, statusLine);
    connectionListener = statusLine;
    model.setConnectionListener(statusLine);
    detailTable = new AlarmDetailTable();
    // The table of alarms
    tableScrollPane.setViewportView(alarmTable);
    Dimension minimumSize = new Dimension(300, 150);
    tableScrollPane.setMinimumSize(minimumSize);
    tableScrollPane.setPreferredSize(minimumSize);
    // The details table
    detailsScrollPane.setViewportView(detailTable);
    // The panel with the details
    JPanel detailsPanel = new JPanel();
    BoxLayout layout = new BoxLayout(detailsPanel, BoxLayout.Y_AXIS);
    detailsPanel.setLayout(new BorderLayout());
    JPanel lblPnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    lblPnl.add(new JLabel("Alarm details"));
    detailsPanel.add(lblPnl, BorderLayout.PAGE_START);
    detailsPanel.add(detailsScrollPane, BorderLayout.CENTER);
    minimumSize = new Dimension(120, 150);
    detailsPanel.setMinimumSize(minimumSize);
    detailsPanel.setPreferredSize(minimumSize);
    splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tableScrollPane, detailsPanel);
    splitPane.setOneTouchExpandable(true);
    splitPane.setResizeWeight(1);
    //splitPane.setDividerLocation(tableScrollPane.getMinimumSize().width);
    add(splitPane, BorderLayout.CENTER);
    // Add the toolbar
    toolbar = new Toolbar(alarmTable, model, alarmSound, ACTIVATE_RDUCTION_RULES, this);
    add(toolbar, BorderLayout.NORTH);
    // Add the status line
    add(statusLine, BorderLayout.SOUTH);
    // Set the initial auto ack level.
    toolbar.setAutoAckLevel(getInitialAutoAckLevel());
}
Also used : JPanel(javax.swing.JPanel) UndocAlarmTableModel(alma.acsplugins.alarmsystem.gui.undocumented.table.UndocAlarmTableModel) AlarmTableModel(alma.acsplugins.alarmsystem.gui.table.AlarmTableModel) FlowLayout(java.awt.FlowLayout) BoxLayout(javax.swing.BoxLayout) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) StatusLine(alma.acsplugins.alarmsystem.gui.statusline.StatusLine) BorderLayout(java.awt.BorderLayout) AlarmTable(alma.acsplugins.alarmsystem.gui.table.AlarmTable) AlarmDetailTable(alma.acsplugins.alarmsystem.gui.detail.AlarmDetailTable) JSplitPane(javax.swing.JSplitPane) AlarmSound(alma.acsplugins.alarmsystem.gui.sound.AlarmSound) Toolbar(alma.acsplugins.alarmsystem.gui.toolbar.Toolbar)

Example 48 with FlowLayout

use of java.awt.FlowLayout in project ACS by ACS-Community.

the class AlSysNotAvailPanel method initialize.

/**
	 * Initialize the GUI
	 */
private void initialize() {
    setLayout(new BorderLayout());
    // Add the label
    JPanel labelPnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
    labelPnl.add(lbl);
    add(labelPnl, BorderLayout.NORTH);
    // Add the message area
    messages.setEditable(false);
    add(messages, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout)

Example 49 with FlowLayout

use of java.awt.FlowLayout in project ACS by ACS-Community.

the class LoadURLDlg method initGUI.

/**
	 * Setup the GUI
	 */
private void initGUI() {
    JRootPane mainPnl = this.getRootPane();
    mainPnl.setLayout(new BorderLayout());
    guiSwitches = new LoadSwitchesPanel(loggingClient);
    mainPnl.add(guiSwitches, BorderLayout.NORTH);
    JPanel urlPnl = new JPanel(new FlowLayout());
    urlPnl.add(new JLabel("URL of the file: "));
    urlPnl.add(urlTF);
    mainPnl.add(urlPnl, BorderLayout.CENTER);
    JPanel btnPnl = new JPanel(new BorderLayout());
    loadBtn.addActionListener(this);
    cancelBtn.addActionListener(this);
    btnPnl.add(loadBtn, BorderLayout.WEST);
    btnPnl.add(cancelBtn, BorderLayout.EAST);
    mainPnl.add(btnPnl, BorderLayout.SOUTH);
}
Also used : JPanel(javax.swing.JPanel) LoadSwitchesPanel(alma.acs.logging.io.LoadSwitchesPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JRootPane(javax.swing.JRootPane)

Example 50 with FlowLayout

use of java.awt.FlowLayout in project zaproxy by zaproxy.

the class HttpPanel method initUi.

private void initUi() {
    allOptions = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
    componentOptions = new JPanel(new BorderLayout(0, 0));
    moreOptionsComponent = new JPanel(new BorderLayout(0, 0));
    toolBarComponents = new JToolBar();
    toolBarComponents.setFloatable(false);
    toolBarComponents.setBorder(BorderFactory.createEmptyBorder());
    toolBarComponents.setRollover(true);
    toolBarMoreOptions = new JToolBar();
    toolBarMoreOptions.setFloatable(false);
    toolBarMoreOptions.setBorder(BorderFactory.createEmptyBorder());
    toolBarMoreOptions.setRollover(true);
    endAllOptions = new JPanel();
    JPanel panel1 = new JPanel(new BorderLayout(0, 0));
    JPanel panelFlow = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
    panelFlow.add(allOptions);
    panelFlow.add(componentOptions);
    panelFlow.add(toolBarComponents);
    panelFlow.add(moreOptionsComponent);
    panelFlow.add(toolBarMoreOptions);
    panel1.add(panelFlow, BorderLayout.WEST);
    panelFlow = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
    panelFlow.add(endAllOptions);
    panel1.add(panelFlow, BorderLayout.EAST);
    panelHeader.add(panel1, BorderLayout.NORTH);
    //getPanelContent().add(new EmptyComponent(), "");
    initComponents();
    setMessage(null);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) JToolBar(javax.swing.JToolBar)

Aggregations

FlowLayout (java.awt.FlowLayout)400 JPanel (javax.swing.JPanel)338 JLabel (javax.swing.JLabel)189 JButton (javax.swing.JButton)161 ActionEvent (java.awt.event.ActionEvent)134 BoxLayout (javax.swing.BoxLayout)129 BorderLayout (java.awt.BorderLayout)118 ActionListener (java.awt.event.ActionListener)113 Dimension (java.awt.Dimension)95 JScrollPane (javax.swing.JScrollPane)94 Container (java.awt.Container)49 GridBagLayout (java.awt.GridBagLayout)42 JTextField (javax.swing.JTextField)41 Insets (java.awt.Insets)39 GridBagConstraints (java.awt.GridBagConstraints)38 ButtonGroup (javax.swing.ButtonGroup)38 JCheckBox (javax.swing.JCheckBox)35 JTable (javax.swing.JTable)32 JmriJFrame (jmri.util.JmriJFrame)30 JSeparator (javax.swing.JSeparator)24