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


Java BasicSplitPaneDivider.setBorder方法代碼示例

本文整理匯總了Java中javax.swing.plaf.basic.BasicSplitPaneDivider.setBorder方法的典型用法代碼示例。如果您正苦於以下問題:Java BasicSplitPaneDivider.setBorder方法的具體用法?Java BasicSplitPaneDivider.setBorder怎麽用?Java BasicSplitPaneDivider.setBorder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.plaf.basic.BasicSplitPaneDivider的用法示例。


在下文中一共展示了BasicSplitPaneDivider.setBorder方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: removeBordersFromSplitPane

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
public static void removeBordersFromSplitPane(JSplitPane split)
{
	// remove the border from the split pane
	split.setBorder(null);

	// check the UI. If we can't work with the UI any further, then
	// exit here.
	if( !(split.getUI() instanceof BasicSplitPaneUI) )
	{
		return;
	}

	// grab the divider from the UI and remove the border from it
	final BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI()).getDivider();
	if( divider != null )
	{
		// Taken from http://forums.sun.com/thread.jspa?threadID=566152
		divider.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0),
			new SplitPaneBorder(UIManager.getColor("SplitPane.background")))); //$NON-NLS-1$
	}
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:22,代碼來源:AppletGuiUtils.java

示例2: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
public JSplitPane createSplitPane() {
	JSplitPane split = new JSplitPane();
	// remove the border from the split pane
	split.setBorder(null);

	// set the divider size for a more reasonable, less bulky look 
	split.setDividerSize(3);
	split.setOpaque(false);

	// check the UI.  If we can't work with the UI any further, then
	// exit here.
	if (!(split.getUI() instanceof BasicSplitPaneUI))
		return split;

	//  grab the divider from the UI and remove the border from it
	BasicSplitPaneDivider divider = 
			((BasicSplitPaneUI) split.getUI()).getDivider();
	if (divider != null)
		divider.setBorder(null);

	return split;
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:23,代碼來源:ChildComponentDelegate.java

示例3: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
private static JSplitPane createSplitPane(int orientation) {
	JSplitPane split = new JSplitPane(orientation);
	// remove the border from the split pane
	split.setBorder(null);
        
	// set the divider size for a more reasonable, less bulky look 
	split.setDividerSize(3);

	// check the UI.  If we can't work with the UI any further, then
	// exit here.
	if (!(split.getUI() instanceof BasicSplitPaneUI))
	   return split;

	//  grab the divider from the UI and remove the border from it
	BasicSplitPaneDivider divider =
				   ((BasicSplitPaneUI) split.getUI()).getDivider();
	if (divider != null)
	   divider.setBorder(null);

	return split;
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:22,代碼來源:ElegantDemo.java

示例4: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
public JSplitPane createSplitPane() {
	JSplitPane split = new JSplitPane();
	// remove the border from the split pane
	split.setBorder(null);

	// set the divider size for a more reasonable, less bulky look 
	split.setDividerSize(3);

	// check the UI.  If we can't work with the UI any further, then
	// exit here.
	if (!(split.getUI() instanceof BasicSplitPaneUI))
		return split;

	//  grab the divider from the UI and remove the border from it
	BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI()).getDivider();
	if (divider != null)
		divider.setBorder(null);

	return split;
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:21,代碼來源:SplitPaneDemo.java

示例5: managePortSplitChild

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
/**
 * Removes any border from the <code>DockingPort</code> itself and places the currently 
 * assigned border on the two child components of the <code>DockingPort's</code JSplitPane</code>
 * child.
 * @see basesource.convertor.ui.docking.defaults.BorderManager#managePortSplitChild(basesource.convertor.ui.docking.DockingPort)
 */
public void managePortSplitChild(DockingPort port) {
	if(port==null || !(port.getDockedComponent() instanceof JSplitPane))
		return;
		
	setBorder(port, null);
	
	// clear the border from the split pane		
	JSplitPane split = (JSplitPane) port.getDockedComponent();
	if (split.getUI() instanceof BasicSplitPaneUI) {
		//  grab the divider from the UI and remove the border from it
		BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI()).getDivider();
		if (divider != null && divider.getBorder()!=null)
			divider.setBorder(null);			
	}
	setBorder(split, null);

	// set the borders on each of the child components
	setBorder(split.getLeftComponent(), assignedBorder);
	setBorder(split.getRightComponent(), assignedBorder);
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:27,代碼來源:StandardBorderManager.java

示例6: managePortSplitChild

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
/**
 * Removes any border from the {@code DockingPort} itself and places the
 * currently assigned border on the two child components of the
 * {@code DockingPort's</code JSplitPane} child.
 *
 * @see BorderManager#managePortSplitChild(DockingPort)
 */
public void managePortSplitChild(DockingPort port) {
    if (port == null || !(port.getDockedComponent() instanceof JSplitPane))
        return;

    setBorder(port, null);

    // clear the border from the split pane
    JSplitPane split = (JSplitPane) port.getDockedComponent();
    if (split.getUI() instanceof BasicSplitPaneUI) {
        // grab the divider from the UI and remove the border from it
        BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI())
                                        .getDivider();
        if (divider != null && divider.getBorder() != null)
            divider.setBorder(null);
    }
    setBorder(split, null);

    // set the borders on each of the child components
    setSubComponentBorder(split.getLeftComponent(), assignedBorder);
    setSubComponentBorder(split.getRightComponent(), assignedBorder);
}
 
開發者ID:humphrej,項目名稱:flexdock,代碼行數:29,代碼來源:StandardBorderManager.java

示例7: tweakSplitPaneUI

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:ClassesControllerUI.java

示例8: tweakSplitPaneUI

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
private static void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:OQLControllerUI.java

示例9: setupInstance

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
protected void setupInstance(BasicSplitPaneDivider instance) {
            super.setupInstance(instance);
            
//            instance.setDividerSize(dividerSize);
            if (border != null) {
                Border b = border.createInstance();
                if (b != null) instance.setBorder(b);
            }
        }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:PaneBuilders.java

示例10: tweakUI

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
private void tweakUI() {
    setBorder(null);
    setDividerSize(5);

    if (!(getUI() instanceof BasicSplitPaneUI)) return;

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI)getUI()).getDivider();
    if (divider != null) {
        Color c = UIUtils.isNimbus() ? UIUtils.getDisabledLineColor() :
                new JSeparator().getForeground();
        divider.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, c));
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:CombinedPanel.java

示例11: createDefaultDivider

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
/**
 * Creates the default divider.
 */
public BasicSplitPaneDivider createDefaultDivider() {
	BasicSplitPaneDivider d = new BasicSplitPaneDivider(this) {
		private static final long serialVersionUID = 225334791139486944L;

		public void paint(Graphics g) {

		}
	};
	d.setBorder(null);
	return d;
}
 
開發者ID:SynBioDex,項目名稱:SBOLDesigner,代碼行數:15,代碼來源:InvisibleSplitPane.java

示例12: clearSplitPaneBorder

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
private void clearSplitPaneBorder(JSplitPane split) {
	split.setBorder(null);
	if (split.getUI() instanceof BasicSplitPaneUI) {
		//  grab the divider from the UI and remove the border from it
		BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI()).getDivider();
		if (divider != null && divider.getBorder() != null)
			divider.setBorder(null);
	}
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:10,代碼來源:DemoBorderManager.java

示例13: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
public JSplitPane createSplitPane() {
	JSplitPane split = new JSplitPane();
	split.setDividerSize(3);
	split.setBorder(null);
	if (split.getUI() instanceof BasicSplitPaneUI) {
		BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI()).getDivider();
		if (divider != null && divider.getBorder()!=null)
			divider.setBorder(null);			
	}
	return split;
}
 
開發者ID:Jakegogo,項目名稱:concurrent,代碼行數:12,代碼來源:BorderDemo.java

示例14: clearSplitPaneBorder

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
private void clearSplitPaneBorder(JSplitPane split) {
    split.setBorder(null);
    if (split.getUI() instanceof BasicSplitPaneUI) {
        //  grab the divider from the UI and remove the border from it
        BasicSplitPaneDivider divider = ((BasicSplitPaneUI) split.getUI()).getDivider();
        if (divider != null && divider.getBorder() != null)
            divider.setBorder(null);
    }
}
 
開發者ID:humphrej,項目名稱:flexdock,代碼行數:10,代碼來源:DemoBorderManager.java

示例15: init

import javax.swing.plaf.basic.BasicSplitPaneDivider; //導入方法依賴的package包/類
/**
 * Initializes the applet.
 */
public void init() {
    // Set the JGoodies Plastic 3D look and feel
    initializeLookAndFeels();

    // initialize all beans to demo
    beans = new JComponent[6];
    beans[0] = new JCalendar();
    beans[1] = new JDateChooser();
    beans[2] = new JDayChooser();
    beans[3] = new JMonthChooser();
    beans[4] = new JYearChooser();
    beans[5] = new JSpinField();
    ((JSpinField) beans[5]).adjustWidthToMaximumValue();
    ((JYearChooser) beans[4]).setMaximum(((JSpinField) beans[5]).getMaximum());
    ((JYearChooser) beans[4]).adjustWidthToMaximumValue();

    getContentPane().setLayout(new BorderLayout());
    setJMenuBar(createMenuBar());

    toolBar = createToolBar();
    getContentPane().add(toolBar, BorderLayout.NORTH);

    splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setBorder(BorderFactory.createLineBorder(Color.GRAY));
    splitPane.setDividerSize(4);

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }

    propertyPanel = new JPanel();
    componentPanel = new JPanel();

    URL iconURL = beans[0].getClass().getResource("images/" + beans[0].getName() +
            "Color16.gif");
    ImageIcon icon = new ImageIcon(iconURL);

    propertyTitlePanel = new JTitlePanel("Properties", null, propertyPanel,
            BorderFactory.createEmptyBorder(4, 4, 4, 4));

    componentTitlePanel = new JTitlePanel("Component", icon, componentPanel,
            BorderFactory.createEmptyBorder(4, 4, 0, 4));

    splitPane.setBottomComponent(propertyTitlePanel);
    splitPane.setTopComponent(componentTitlePanel);
    installBean(beans[0]);

    getContentPane().add(splitPane, BorderLayout.CENTER);
}
 
開發者ID:rogerxaic,項目名稱:gestock,代碼行數:55,代碼來源:JCalendarDemo.java


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