本文整理汇总了Java中javax.swing.JSplitPane.VERTICAL_SPLIT属性的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.VERTICAL_SPLIT属性的具体用法?Java JSplitPane.VERTICAL_SPLIT怎么用?Java JSplitPane.VERTICAL_SPLIT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.swing.JSplitPane
的用法示例。
在下文中一共展示了JSplitPane.VERTICAL_SPLIT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DatabaseViewer
public DatabaseViewer() {
selectedDatabaseViewer = new SelectedDatabaseViewer();
tablesViewer = new TablesViewer();
selectedTableViewer = new SelectedTableViewer();
setLayout(new BorderLayout());
JScrollPane tablesSP = new JScrollPane(tablesViewer);
tablesSP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
tablesSP.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true,
tablesSP, selectedTableViewer);
splitPane.setResizeWeight(SPLIT_WEIGHT);
selectedDatabaseViewer.setBorder(BorderFactory.createEmptyBorder(DBVIEWER_TOP_PADDING, 0, 0, 0));
add(selectedDatabaseViewer, BorderLayout.NORTH);
add(splitPane, BorderLayout.CENTER);
LineBorder lineBorderPanel = (LineBorder) BorderFactory.createLineBorder(PANEL_BORDER_COLOR);
setBorder(BorderFactory.createTitledBorder(lineBorderPanel, PANEL_TITLE));
setListeners();
}
示例2: init
/**
* Initialize this visualizer
* @throws ClassNotFoundException
* @throws IllegalAccessException
* @throws InstantiationException
*/
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
log.debug("init() - pass");
setLayout(new BorderLayout(0, 5));
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
leftSide = createLeftPanel();
// Prepare the common tab
rightSide = new JTabbedPane();
// Create the split pane
mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftSide, rightSide);
mainSplit.setOneTouchExpandable(true);
JSplitPane searchAndMainSP = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
new SearchTreePanel(root), mainSplit);
searchAndMainSP.setOneTouchExpandable(true);
add(searchAndMainSP, BorderLayout.CENTER);
// init right side with first render
resultsRender.setRightSide(rightSide);
resultsRender.init();
}
示例3: buildDisplay
@Override
protected void buildDisplay() {
this.setLayout(new BorderLayout());
this.setFocusable(false);
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, getTabPane(),
new JScrollPane(getEditorPane()));
getEditorPane().setEditable(false);
splitPane.setOneTouchExpandable(true);
splitPane.setDividerLocation(0.8);
splitPane.setResizeWeight(0.8);
add(splitPane, BorderLayout.CENTER);
}
示例4: DiffResultsView
public DiffResultsView (SearchHistoryPanel parent, List<RepositoryRevision> results) {
this.parent = parent;
this.results = results;
treeView = new DiffTreeTable(parent);
treeView.setResults(results);
treeView.addAncestorListener(this);
diffView = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
diffView.setTopComponent(treeView);
setBottomComponent(new NoContentPanel(NbBundle.getMessage(DiffResultsView.class, "MSG_DiffPanel_NoRevisions"))); // NOI18N
list = WeakListeners.propertyChange(this, null);
}
示例5: init
private void init() {
// GraphVisualization
RenderContext<AbstractPlanNode, PlanNodeGraph.Edge> context = this.visualizationPanel.getRenderContext();
context.setEdgeShapeTransformer(new EdgeShape.Line<AbstractPlanNode, PlanNodeGraph.Edge>());
context.setVertexFontTransformer(new GraphVisualizationPanel.VertexFontTransformer<AbstractPlanNode>(true));
// PlanFragmentBoundaries boundaryPainter = new PlanFragmentBoundaries();
// this.visualizationPanel.addPostRenderPaintable(boundaryPainter);
// Full Plan Tab
JPanel textInfoPanel = new JPanel();
textInfoPanel.setLayout(new BorderLayout());
JTextArea textInfoTextArea = new JTextArea();
textInfoTextArea.setEditable(false);
textInfoTextArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
textInfoTextArea.setText(PlanNodeUtil.debug(this.root));
textInfoPanel.add(new JScrollPane(textInfoTextArea), BorderLayout.CENTER);
// Node Field Tab
this.nodeField = new JTextArea();
this.nodeField.setEditable(false);
this.nodeField.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
this.nodeField.setText("");
JPanel textInfoPanel2 = new JPanel(new BorderLayout());
textInfoPanel2.add(new JScrollPane(this.nodeField), BorderLayout.CENTER);
this.tabbedPane = new JTabbedPane();
this.tabbedPane.add("Full Plan", textInfoPanel);
this.tabbedPane.add("Selected Node", textInfoPanel2);
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, visualizationPanel, this.tabbedPane);
splitPane.setDividerLocation(AbstractViewer.DEFAULT_WINDOW_HEIGHT - 500);
this.mainPanel.add(splitPane, BorderLayout.CENTER);
}
示例6: setResultsSplitPaneDivider
private void setResultsSplitPaneDivider(int dividerLocation, int orientation) {
if (JSplitPane.VERTICAL_SPLIT == orientation) {
getPreferences().putInt(RESULTS_SPLITPANE_DIVIDER_VERTICAL, dividerLocation);
} else {
getPreferences().putInt(RESULTS_SPLITPANE_DIVIDER_HORIZONTAL, dividerLocation);
}
}
示例7: getContentPanel
/**
* Lazily creates and returns the content panel of the simulator frame.
* The content panel consists of the grammar panel and the results panel.
*/
JSplitPane getContentPanel() {
if (this.contentPanel == null) {
this.contentPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
this.contentPanel.setTopComponent(getGrammarPanel());
this.contentPanel.setResizeWeight(0.8);
this.contentPanel.setDividerSize(0);
this.contentPanel.setContinuousLayout(true);
}
return this.contentPanel;
}
示例8: init
private void init() {
setLayout(new BorderLayout());
splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
splitPane.setOneTouchExpandable(true);
splitPane.setBottomComponent(objectTable);
TreeSearch tSearch = TreeSearch.installForOR(objectTree.getTree());
splitPane.setTopComponent(tSearch);
splitPane.setResizeWeight(.5);
splitPane.setDividerLocation(.5);
add(splitPane);
}
示例9: createUnderPane
private JSplitPane createUnderPane(JTree tree) {
JTextArea toStringArea = new JTextArea();
toStringArea.setLineWrap(true);
toStringArea.setEditable(false);
tree.addTreeSelectionListener(new ToStringListener(toStringArea));
JSplitPane result = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
new JScrollPane(tree),
new JScrollPane(toStringArea));
result.setOneTouchExpandable(true);
result.setDividerSize(8);
result.setDividerLocation(0.8);
return result;
}
示例10: getListsPanel
/**
* Lazily creates and returns the panel with the resource lists.
*/
JSplitPane getListsPanel() {
if (this.listsPanel == null) {
this.listsPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
getDisplaysPanel().getUpperListsPanel(), getDisplaysPanel().getLowerListsPanel());
this.listsPanel.setBorder(null);
}
return this.listsPanel;
}
示例11: getMainPanel
/** Creates a panel consisting of the error panel and the status bar. */
private JSplitPane getMainPanel() {
if (this.mainPanel == null) {
this.mainPanel =
new JSplitPane(JSplitPane.VERTICAL_SPLIT, getGraphPanel(), getErrorPanel());
this.mainPanel.setDividerSize(1);
this.mainPanel.setContinuousLayout(true);
this.mainPanel.setResizeWeight(0.9);
this.mainPanel.resetToPreferredSizes();
this.mainPanel.setBorder(null);
}
return this.mainPanel;
}
示例12: RoutingProbabilitiesEditor
public RoutingProbabilitiesEditor(StationDefinition sd, Object stationKey, Object classKey) {
super();
super.setOrientation(JSplitPane.VERTICAL_SPLIT);
super.setDividerSize(3);
super.setBorder(new EmptyBorder(0, 0, 0, 0));
this.setResizeWeight(.5);
initComponents();
setData(sd, stationKey, classKey);
}
示例13: initGUI
private void initGUI() {
JPanel pCommand = new JPanel();
pResult = new JPanel();
nsSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, pCommand,
pResult);
pCommand.setLayout(new BorderLayout());
pResult.setLayout(new BorderLayout());
Font fFont = new Font("Dialog", Font.PLAIN, 12);
txtCommand = new JTextArea(5, 40);
txtCommand.setMargin(new Insets(5, 5, 5, 5));
txtCommand.addKeyListener(this);
txtCommandScroll = new JScrollPane(txtCommand);
txtResult = new JTextArea(20, 40);
txtResult.setMargin(new Insets(5, 5, 5, 5));
txtResultScroll = new JScrollPane(txtResult);
txtCommand.setFont(fFont);
txtResult.setFont(new Font("Courier", Font.PLAIN, 12));
/*
// button replaced by toolbar
butExecute = new JButton("Execute");
butExecute.addActionListener(this);
pCommand.add(butExecute, BorderLayout.EAST);
*/
pCommand.add(txtCommandScroll, BorderLayout.CENTER);
gResult = new GridSwing();
TableSorter sorter = new TableSorter(gResult);
tableModel = sorter;
gResultTable = new JTable(sorter);
sorter.setTableHeader(gResultTable.getTableHeader());
gScrollPane = new JScrollPane(gResultTable);
gResultTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
gResult.setJTable(gResultTable);
//getContentPane().setLayout(new BorderLayout());
pResult.add(gScrollPane, BorderLayout.CENTER);
// Set up the tree
rootNode = new DefaultMutableTreeNode("Connection");
treeModel = new DefaultTreeModel(rootNode);
tTree = new JTree(treeModel);
tScrollPane = new JScrollPane(tTree);
tScrollPane.setPreferredSize(new Dimension(120, 400));
tScrollPane.setMinimumSize(new Dimension(70, 100));
txtCommandScroll.setPreferredSize(new Dimension(360, 100));
txtCommandScroll.setMinimumSize(new Dimension(180, 100));
gScrollPane.setPreferredSize(new Dimension(460, 300));
ewSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
tScrollPane, nsSplitPane);
fMain.getContentPane().add(ewSplitPane, BorderLayout.CENTER);
doLayout();
fMain.pack();
}
示例14: isVerticalSplit
public boolean isVerticalSplit() {
return orientation == JSplitPane.VERTICAL_SPLIT;
}
示例15: initComponents
private void initComponents() {
JPanel fieldsBrowserPanel = instancesController.getFieldsBrowserController().getPanel();
JPanel referencesBrowserPanel = instancesController.getReferencesBrowserController().getPanel();
JPanel instancesListPanel = instancesController.getInstancesListController().getPanel();
browsersSplit = new JExtendedSplitPane(JSplitPane.VERTICAL_SPLIT, fieldsBrowserPanel, referencesBrowserPanel);
tweakSplitPaneUI(browsersSplit);
browsersSplit.setResizeWeight(0.5d);
contentsSplit = new JExtendedSplitPane(JSplitPane.HORIZONTAL_SPLIT, instancesListPanel, browsersSplit);
tweakSplitPaneUI(contentsSplit);
contentsSplit.setDividerLocation(instancesListPanel.getPreferredSize().width);
JPanel classPresenterPanel = instancesController.getClassPresenterPanel();
classPresenterPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 3, 0,
getBackground()),
classPresenterPanel.getBorder()));
legendPanel = new LegendPanel(true);
dataPanel = new JPanel(new BorderLayout());
dataPanel.setOpaque(false);
dataPanel.add(classPresenterPanel, BorderLayout.NORTH);
dataPanel.add(contentsSplit, BorderLayout.CENTER);
dataPanel.add(legendPanel, BorderLayout.SOUTH);
noDataPanel = new JPanel(new BorderLayout());
noDataPanel.setBorder(BorderFactory.createLoweredBevelBorder());
HTMLTextArea hintArea = new HTMLTextArea() {
protected void showURL(URL url) {
instancesController.getHeapFragmentWalker().switchToClassesView();
}
};
hintArea.setBorder(BorderFactory.createEmptyBorder(10, 8, 8, 8));
String classesRes = Icons.getResource(LanguageIcons.CLASS);
String hintText = Bundle.InstancesControllerUI_NoClassDefinedMsg(
"<a href='#'><img border='0' align='bottom' src='nbresloc:/" + classesRes + "'></a>"); // NOI18N
hintArea.setText(hintText);
noDataPanel.add(hintArea, BorderLayout.CENTER);
contents = new CardLayout();
setLayout(contents);
add(noDataPanel, NO_DATA);
add(dataPanel, DATA);
LegendUpdater legendUpdater = new LegendUpdater();
fieldsBrowserPanel.addHierarchyListener(legendUpdater);
referencesBrowserPanel.addHierarchyListener(legendUpdater);
}