use of javax.swing.JSplitPane in project jmeter by apache.
the class MainFrame method init.
/**
* Create the GUI components and layout.
*/
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
menuBar = new JMeterMenuBar();
setJMenuBar(menuBar);
JPanel all = new JPanel(new BorderLayout());
all.add(createToolBar(), BorderLayout.NORTH);
JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
treePanel = createTreePanel();
treeAndMain.setLeftComponent(treePanel);
JSplitPane topAndDown = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
topAndDown.setOneTouchExpandable(true);
topAndDown.setDividerLocation(0.8);
topAndDown.setResizeWeight(.8);
topAndDown.setContinuousLayout(true);
// see bug jdk 4131528
topAndDown.setBorder(null);
if (!DISPLAY_LOGGER_PANEL) {
topAndDown.setDividerSize(0);
}
mainPanel = createMainPanel();
logPanel = createLoggerPanel();
errorsAndFatalsCounterLogTarget = new ErrorsAndFatalsCounterLogTarget();
GuiPackage.getInstance().getLogEventBus().registerEventListener(logPanel);
GuiPackage.getInstance().getLogEventBus().registerEventListener(errorsAndFatalsCounterLogTarget);
topAndDown.setTopComponent(mainPanel);
topAndDown.setBottomComponent(logPanel);
treeAndMain.setRightComponent(topAndDown);
treeAndMain.setResizeWeight(.2);
treeAndMain.setContinuousLayout(true);
all.add(treeAndMain, BorderLayout.CENTER);
getContentPane().add(all);
tree.setSelectionRow(1);
addWindowListener(new WindowHappenings());
// Building is complete, register as listener
GuiPackage.getInstance().registerAsListener();
setTitle(DEFAULT_TITLE);
// $NON-NLS-1$
setIconImage(JMeterUtils.getImage("icon-apache.png").getImage());
// define AWT WM_CLASS string
setWindowTitle();
refreshErrorsTimer.start();
}
use of javax.swing.JSplitPane in project jabref by JabRef.
the class BasePanel method setupMainPanel.
public void setupMainPanel() {
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
splitPane.setDividerSize(SPLIT_PANE_DIVIDER_SIZE);
// restore last splitting state (before mainTable is created as creation affects the stored size of the entryEditors)
adjustSplitter();
// check whether a mainTable already existed and a floatSearch was active
boolean floatSearchActive = (mainTable != null) && (this.tableModel.getSearchState() == MainTableDataModel.DisplayOption.FLOAT);
createMainTable();
splitPane.setTopComponent(mainTable.getPane());
// Remove borders
splitPane.setBorder(BorderFactory.createEmptyBorder());
setBorder(BorderFactory.createEmptyBorder());
// otherwise set the bottom component to null.
if (mode == BasePanelMode.SHOWING_PREVIEW) {
mode = BasePanelMode.SHOWING_NOTHING;
highlightEntry(selectionListener.getPreview().getEntry());
} else if (mode == BasePanelMode.SHOWING_EDITOR) {
mode = BasePanelMode.SHOWING_NOTHING;
} else {
splitPane.setBottomComponent(null);
}
setLayout(new BorderLayout());
removeAll();
add(splitPane, BorderLayout.CENTER);
// Set up name autocompleter for search:
instantiateSearchAutoCompleter();
this.getDatabase().registerListener(new SearchAutoCompleteListener());
AutoCompletePreferences autoCompletePreferences = new AutoCompletePreferences(Globals.prefs);
// Set up AutoCompleters for this panel:
if (Globals.prefs.getBoolean(JabRefPreferences.AUTO_COMPLETE)) {
autoCompleters = new ContentAutoCompleters(getDatabase(), bibDatabaseContext.getMetaData(), autoCompletePreferences, Globals.journalAbbreviationLoader);
// ensure that the autocompleters are in sync with entries
this.getDatabase().registerListener(new AutoCompleteListener());
} else {
// create empty ContentAutoCompleters() if autoCompletion is deactivated
autoCompleters = new ContentAutoCompleters();
}
// (needed if preferences have been changed which causes a recreation of the main table)
if (floatSearchActive) {
mainTable.showFloatSearch();
}
splitPane.revalidate();
revalidate();
repaint();
// saves the divider position as soon as it changes
splitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, event -> saveDividerLocation());
}
use of javax.swing.JSplitPane in project JMRI by JMRI.
the class TwoPaneTBWindow method configureFrame.
protected void configureFrame() {
//rightTop.setBorder(BorderFactory.createLineBorder(Color.black));
top.setLayout(new BoxLayout(top, BoxLayout.X_AXIS));
bottom.setLayout(new BoxLayout(bottom, BoxLayout.X_AXIS));
upDownSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, top, bottom);
upDownSplitPane.setOneTouchExpandable(true);
// emphasize top part
upDownSplitPane.setResizeWeight(1.0);
add(upDownSplitPane, BorderLayout.CENTER);
}
use of javax.swing.JSplitPane in project JMRI by JMRI.
the class MultiPaneWindow method configureFrame.
protected void configureFrame() {
rightTop.setBorder(BorderFactory.createLineBorder(Color.black));
// new BoxLayout(rightTop, BoxLayout.Y_AXIS));
rightTop.setLayout(new FlowLayout());
// new BoxLayout(rightBottom, BoxLayout.Y_AXIS));
rightBottom.setLayout(new FlowLayout());
rightUpDownSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, rightTop, rightBottom);
rightUpDownSplitPane.setOneTouchExpandable(true);
// emphasize top part
rightUpDownSplitPane.setResizeWeight(1.0);
leftRightSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, // placeholder
new JPanel(), rightUpDownSplitPane);
leftRightSplitPane.setOneTouchExpandable(true);
// emphasize right part
leftRightSplitPane.setResizeWeight(0.0);
add(leftRightSplitPane, BorderLayout.CENTER);
}
use of javax.swing.JSplitPane in project qi4j-sdk by Qi4j.
the class MethodPane method $$$setupUI$$$.
/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
* DO NOT edit this method OR call it in your code!
*
*/
private void $$$setupUI$$$() {
contentPane = new JPanel();
contentPane.setLayout(new BorderLayout(0, 0));
splitPane = new JSplitPane();
contentPane.add(splitPane, BorderLayout.CENTER);
final JScrollPane scrollPane1 = new JScrollPane();
splitPane.setLeftComponent(scrollPane1);
methodList = new JList();
scrollPane1.setViewportView(methodList);
final JScrollPane scrollPane2 = new JScrollPane();
splitPane.setRightComponent(scrollPane2);
methodDetailTable = new JTable();
scrollPane2.setViewportView(methodDetailTable);
}
Aggregations