use of javax.swing.JSplitPane in project ACS by ACS-Community.
the class ErrorTreeCellRenderer method getJSplitPane.
/**
* This method initializes jSplitPane
*
* @return javax.swing.JSplitPane
*/
private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane.setTopComponent(getMainPanel());
jSplitPane.setBottomComponent(getJScrollPane());
jSplitPane.setDividerLocation(470);
}
return jSplitPane;
}
use of javax.swing.JSplitPane 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;
}
use of javax.swing.JSplitPane in project zaproxy by zaproxy.
the class RequestSplitComponent method initUi.
protected void initUi() {
buttonShowView = new JToggleButton(DisplayUtils.getScaledIcon(new ImageIcon(RequestSplitComponent.class.getResource("/resource/icon/view_split.png"))));
buttonShowView.setToolTipText(BUTTON_TOOL_TIP);
panelOptions = new JPanel();
panelOptions.add(headerViews.getSelectableViewsComponent());
panelOptions.add(bodyViews.getSelectableViewsComponent());
headerViews.addView(createHttpPanelHeaderTextView());
splitMain = new JSplitPane();
splitMain.setDividerSize(3);
splitMain.setResizeWeight(0.5d);
splitMain.setContinuousLayout(false);
splitMain.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitMain.setTopComponent(headerViews.getViewsPanel());
splitMain.setBottomComponent(bodyViews.getViewsPanel());
initViews();
panelMain = new JPanel(new BorderLayout());
panelMain.add(splitMain, BorderLayout.CENTER);
setSelected(false);
}
use of javax.swing.JSplitPane 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());
}
use of javax.swing.JSplitPane in project ACS by ACS-Community.
the class LoggingClient method getTableDetailsVrPane.
/**
* @return the split pane with the table of logs and the table with the details of a log
*/
private JSplitPane getTableDetailsVrPane() {
if (tableDetailsVrSplitP == null) {
try {
tableDetailsVrSplitP = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
tableDetailsVrSplitP.setName("TableDetailsSplitPane");
tableDetailsVrSplitP.setLastDividerLocation(570);
tableDetailsVrSplitP.setAlignmentX(Component.LEFT_ALIGNMENT);
tableDetailsVrSplitP.setContinuousLayout(true);
//ivjJSplitPane2.setDividerLocation(501);
tableDetailsVrSplitP.add(getLogTableScroolP(), "left");
tableDetailsVrSplitP.add(getDeatailedInfoPanel(), "right");
} catch (Throwable ivjExc) {
handleException(ivjExc);
}
}
return tableDetailsVrSplitP;
}
Aggregations