當前位置: 首頁>>代碼示例>>Java>>正文


Java JSplitPane.VERTICAL_SPLIT屬性代碼示例

本文整理匯總了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();
}
 
開發者ID:tteguayco,項目名稱:JITRAX,代碼行數:25,代碼來源:DatabaseViewer.java

示例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();
}
 
開發者ID:Blazemeter,項目名稱:jmeter-bzm-plugins,代碼行數:28,代碼來源:ViewResultsFullVisualizer.java

示例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);
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:16,代碼來源:GroovyDisplay.java

示例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);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:DiffResultsView.java

示例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);
    }
 
開發者ID:s-store,項目名稱:s-store,代碼行數:34,代碼來源:PlanTreeCatalogNode.java

示例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);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:7,代碼來源:TestRunnerSettings.java

示例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;
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:14,代碼來源:Simulator.java

示例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);
}
 
開發者ID:CognizantQAHub,項目名稱:Cognizant-Intelligent-Test-Scripter,代碼行數:11,代碼來源:ImageORPanel.java

示例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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:13,代碼來源:GUIBrowser.java

示例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;
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:11,代碼來源:Simulator.java

示例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;
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:13,代碼來源:LTSDisplay.java

示例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);
}
 
開發者ID:HOMlab,項目名稱:QN-ACTR-Release,代碼行數:9,代碼來源:RoutingProbabilitiesEditor.java

示例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();
    }
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:72,代碼來源:DatabaseManagerSwing.java

示例14: isVerticalSplit

public boolean isVerticalSplit() {
    return orientation == JSplitPane.VERTICAL_SPLIT;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:3,代碼來源:MultiSplitPane.java

示例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);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:52,代碼來源:InstancesControllerUI.java


注:本文中的javax.swing.JSplitPane.VERTICAL_SPLIT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。