当前位置: 首页>>代码示例>>Java>>正文


Java JSplitPane.setOrientation方法代码示例

本文整理汇总了Java中javax.swing.JSplitPane.setOrientation方法的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.setOrientation方法的具体用法?Java JSplitPane.setOrientation怎么用?Java JSplitPane.setOrientation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JSplitPane的用法示例。


在下文中一共展示了JSplitPane.setOrientation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSplitPane

import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane createSplitPane(Component lower) {
    JSplitPane pane = new JSplitPane();

    if (firstSplit == null) {
        firstSplit = Boolean.TRUE;
    } else {
        firstSplit = Boolean.FALSE;
    }

    pane.setRightComponent(lower);
    pane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    pane.setContinuousLayout(true);
    pane.setResizeWeight(1);
    pane.setDividerLocation(0.80f);
    pane.setBorder(BorderFactory.createEmptyBorder());
    //Do not install our custom split pane UI on Nimbus L&F
    if (!"Nimbus".equals(UIManager.getLookAndFeel().getID())) {
        pane.setUI(PropUtils.createSplitPaneUI());
    }

    // #52188: default F6 behaviour doesn't make to much sense in NB 
    // property sheet and blocks NetBeans default F6
    pane.getActionMap().getParent().remove("toggleFocus");
    if( PropUtils.isAqua ) {
        pane.setBackground( UIManager.getColor("NbExplorerView.background") ); //NOI18N
    }

    return pane;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:PSheet.java

示例2: setOrientation

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
 * Sets the layout orientation of the contained result pane.
 *
 * @param orientation the orientation (see {@link JSplitPane#VERTICAL_SPLIT}
 * and {@link JSplitPane#HORIZONTAL_SPLIT}) to set.
 */
public void setOrientation(int orientation) {
    for(JSplitPane view: viewMap.values()){
        if (view.getOrientation() != orientation) {
            view.setOrientation(orientation);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ResultWindow.java

示例3: setupGui

import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void setupGui(ClientService clientService, PluginService pluginService)
{
	model = new SecurityTreeModel(clientService, pluginService);

	tree = new JTree(model);
	tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
	tree.setCellRenderer(new MyTreeCellRenderer());
	tree.addTreeSelectionListener(this);

	tabManager = new TabManager(clientService, allowEditing);

	JScrollPane scroller = new JScrollPane(tree);
	scroller.setMinimumSize(new Dimension(200, Integer.MAX_VALUE));

	JSplitPane split = AppletGuiUtils.createSplitPane();
	split.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	split.setContinuousLayout(true);
	split.add(scroller, JSplitPane.LEFT);
	split.add(tabManager, JSplitPane.RIGHT);

	JButton closeButton = new JButton(closeAction);

	final int[] rows = {TableLayout.FILL, closeButton.getPreferredSize().height,};
	final int[] cols = {TableLayout.FILL, closeButton.getPreferredSize().width,};

	content = new JPanel(new TableLayout(rows, cols));
	content.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
	content.add(split, new Rectangle(0, 0, 2, 1));
	content.add(closeButton, new Rectangle(1, 1, 1, 1));

	updateEditor();
}
 
开发者ID:equella,项目名称:Equella,代码行数:33,代码来源:SecurityTree.java

示例4: initialize

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
 * This method initializes this
 *
 * @return void
 */
private void initialize() {
    setLayout(new BorderLayout());
    this.setSize(new Dimension(441, 231));
    JSplitPane splitPane = new JSplitPane();
    this.add(splitPane, java.awt.BorderLayout.CENTER);
    splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    splitPane.setDividerLocation(0.75d);
    splitPane.setLeftComponent(getSelectRowPane());
    splitPane.setRightComponent(getJPanel4());
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:16,代码来源:SectorRowsEditor.java

示例5: erzeugeAuflisterPanel

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
 * Erzeugt das Panel für die Anzeige der Kunden- und Medien-Tabelle, die
 * durch eine Splittpane voneinander getrennt sind.
 * 
 */
private void erzeugeAuflisterPanel()
{
    JPanel auflisterPanel = new JPanel();
    _hauptPanel.add(auflisterPanel, BorderLayout.CENTER);
    auflisterPanel.setLayout(new BorderLayout());
    setNoSize(auflisterPanel);
    auflisterPanel.setBackground(UIConstants.BACKGROUND_COLOR);

    _auflisterSplitpane = new JSplitPane();
    auflisterPanel.add(_auflisterSplitpane, BorderLayout.CENTER);
    _auflisterSplitpane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    _auflisterSplitpane.setOneTouchExpandable(true);
    _auflisterSplitpane.setDividerLocation(300);

    setNoSize(_auflisterSplitpane);
    _auflisterSplitpane.setContinuousLayout(true);
    _auflisterSplitpane.setDoubleBuffered(true);
    _auflisterSplitpane.setResizeWeight(0.5);
    _auflisterSplitpane.setBackground(UIConstants.BACKGROUND_COLOR);
    _auflisterSplitpane
        .setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    // Kundendarstellung
    _auflisterSplitpane.add(_kundenauflisterPanel, JSplitPane.TOP);
    // Mediendarstellung
    _auflisterSplitpane.add(_medienauflisterPanel, JSplitPane.BOTTOM);
}
 
开发者ID:polemonium,项目名称:SE2Project,代码行数:32,代码来源:AusleiheUI.java

示例6: ListWithView

import javax.swing.JSplitPane; //导入方法依赖的package包/类
public ListWithView(boolean enableUpDown, boolean enableAddRemove, TLEAction... additionalActions)
{
	this.enableAddRemove = enableAddRemove;

	actions = new ArrayList<TLEAction>();
	for( TLEAction additionalAction : additionalActions )
	{
		actions.add(additionalAction);
	}
	actions.add(upAction);
	actions.add(downAction);
	actions.add(addAction);
	actions.add(removeAction);

	final JTextlessButton upButton = new JTextlessButton(upAction);
	final JTextlessButton downButton = new JTextlessButton(downAction);
	final JButton addButton = new JButton(addAction);
	final JButton removeButton = new JButton(removeAction);

	list = new JList<>(model);
	list.addMouseListener(new ListPopupListener(list, actions));
	list.addListSelectionListener(new ListSelectionListener()
	{
		@Override
		public void valueChanged(ListSelectionEvent e)
		{
			onListSelectionChange();
			update();
		}
	});

	final JPanel left = new JPanel(new MigLayout("insets 0, fill, wrap 5, hidemode 2", "[][grow][][][grow]",
		"[grow][][][grow][]"));
	left.add(new JScrollPane(list), "skip, grow, span 4 4");
	left.add(upButton);
	left.add(downButton);
	left.add(addButton, "skip 3, align right");
	left.add(removeButton);

	if( !enableUpDown )
	{
		upButton.setVisible(false);
		downButton.setVisible(false);
	}

	if( !enableAddRemove )
	{
		addButton.setVisible(false);
		removeButton.setVisible(false);
	}

	// This makes the left-panel more "stable" and reliable in the splitter.
	left.setMinimumSize(new Dimension(200, 0));
	left.setPreferredSize(left.getMaximumSize());

	JSplitPane split = AppletGuiUtils.createSplitPane();
	split.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	split.setContinuousLayout(true);
	split.setResizeWeight(0.1);

	split.add(left, JSplitPane.LEFT);
	split.add(editorContainer, JSplitPane.RIGHT);

	setLayout(new GridLayout(1, 1));
	add(split);

	update();
}
 
开发者ID:equella,项目名称:Equella,代码行数:69,代码来源:ListWithView.java


注:本文中的javax.swing.JSplitPane.setOrientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。