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


Java BasicSplitPaneUI類代碼示例

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


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

示例1: DiffSplitPaneDivider

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
DiffSplitPaneDivider(BasicSplitPaneUI splitPaneUI, EditableDiffView master) {
    super(splitPaneUI);
    this.master = master;
    fontColor = new JLabel().getForeground();

    actionIconsHeight = insertAllImage.getHeight(this);
    actionIconsWidth = insertAllImage.getWidth(this);
    
    setBorder(null);
    setLayout(new BorderLayout());
    mydivider = new DiffSplitDivider();
    add(mydivider);
    
    addMouseListener(this);
    addMouseMotionListener(this);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:17,代碼來源:DiffSplitPaneDivider.java

示例2: splitpane

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
/**
 * Constructs a new SplitPane containing the two components given as
 * arguments
 * 
 * @param orientation - the orientation (HORIZONTAL_SPLIT or VERTICAL_SPLIT)
 * @param first - the left component (if horizontal) or top component (if
 *            vertical)
 * @param second - the right component (if horizontal) or bottom component
 *            (if vertical)
 * @param initialDividerLocation - the initial divider location (in pixels)
 */
public static JSplitPane splitpane(int orientation, Component first, Component second, int initialDividerLocation) {
	JSplitPane x = make(new JSplitPane(orientation, first, second), new EmptyBorder(0, 0, 0, 0));
	x.setContinuousLayout(true);
	x.setDividerLocation(initialDividerLocation);
	x.setOneTouchExpandable(false);
	x.setResizeWeight(0.5);
	if (Util.onMac() && (x.getUI() instanceof BasicSplitPaneUI)) {
		boolean h = (orientation != JSplitPane.HORIZONTAL_SPLIT);
		((BasicSplitPaneUI) (x.getUI())).getDivider().setBorder(new OurBorder(h, h, h, h)); // Makes
																							// the
																							// border
																							// look
																							// nicer
																							// on
																							// Mac
																							// OS
																							// X
	}
	return x;
}
 
開發者ID:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:32,代碼來源:OurUtil.java

示例3: removeBordersFromSplitPane

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例4: layout

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
@Override
@SuppressWarnings("deprecation")
public void layout() {
    super.layout();

    // increase divider width or height
    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) getUI()).getDivider();
    Rectangle bounds = divider.getBounds();
    if (orientation == HORIZONTAL_SPLIT) {
        bounds.x -= dividerDragOffset;
        bounds.width = dividerDragSize;
    } else {
        bounds.y -= dividerDragOffset;
        bounds.height = dividerDragSize;
    }
    divider.setBounds(bounds);
}
 
開發者ID:Helioviewer-Project,項目名稱:JHelioviewer-SWHV,代碼行數:18,代碼來源:JHVSplitPane.java

示例5: toggleRemarks

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
/**
 * Open or close the remarks panel according to its current state
 */
public void toggleRemarks()
{
	log.debug("toggling Remarks panel");
	
	int currLoc = splitPaneTableAndRemarks.getDividerLocation();
	int totalWidth = splitPaneTableAndRemarks.getWidth();
	
	log.debug("Currloc     = "+currLoc);
	log.debug("Total width = " + totalWidth);
	
	
	if(currLoc+20 >= totalWidth)
	{
		log.debug("Panel appears to be shut so open");
		BasicSplitPaneUI ui = (BasicSplitPaneUI)splitPaneTableAndRemarks.getUI();
		JButton oneClick = (JButton)ui.getDivider().getComponent(0);
		oneClick.doClick();
	}
	else
	{
		log.debug("Panel appears to be open so shut");
		hideRemarksPanel();
	}
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:28,代碼來源:SeriesDataMatrix.java

示例6: initBase

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
protected JSplitPane initBase(Component mainComponent, final int mainDividerLoc) {
	propertyTextPane = createPropertyTextPane(); // must be initialized before palettePanel because it could be accessed during palette initialization (eg in case of different default fontsize)
	palettePanel = newPalettePanel();
	rightSplit = newGenericSplitPane(JSplitPane.VERTICAL_SPLIT, palettePanel, propertyTextPane.getPanel(), 2, Config.getInstance().getRight_split_position(), true);
	rightPanel = newRightPanel();

	mainSplit = newGenericSplitPane(JSplitPane.HORIZONTAL_SPLIT, mainComponent, rightPanel, 2, mainDividerLoc, true);
	// hide mainSplit on doubleclick
	((BasicSplitPaneUI) mainSplit.getUI()).getDivider().addMouseListener(new MouseAdapter() {
		@Override
		public void mouseClicked(MouseEvent e) {
			if (e.getClickCount() == 2) {
				rightPanel.setVisible(!rightPanel.isVisible());
				mainSplit.setDividerLocation(mainDividerLoc);
			}
		}
	});
	customHandler = new CustomElementHandler();
	customHandler.getPanel().setVisible(false);
	customSplit = newGenericSplitPane(JSplitPane.VERTICAL_SPLIT, mainSplit, getCustomPanel(), 0, 0, true);
	mailPanel = new MailPanel();
	mailPanel.setVisible(false);
	mailSplit = newGenericSplitPane(JSplitPane.VERTICAL_SPLIT, mailPanel, customSplit, 0, 0, true);
	return mailSplit;
}
 
開發者ID:umlet,項目名稱:umlet,代碼行數:26,代碼來源:BaseGUIBuilder.java

示例7: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例8: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例9: createSplitPane

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例10: managePortSplitChild

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例11: doLayout

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
@Override
public void doLayout()
{
	super.doLayout();

	// increase divider width or height
	BasicSplitPaneDivider divider = ((BasicSplitPaneUI) getUI())
			.getDivider();
	Rectangle bounds = divider.getBounds();
	if (orientation == HORIZONTAL_SPLIT)
	{
		bounds.x -= dividerDragOffset;
		bounds.width = dividerDragSize;
	}
	else
	{
		bounds.y -= dividerDragOffset;
		bounds.height = dividerDragSize;
	}
	divider.setBounds(bounds);
}
 
開發者ID:justin-espedal,項目名稱:polydes,代碼行數:22,代碼來源:MiniSplitPane.java

示例12: managePortSplitChild

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例13: doLayout

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的package包/類
@Override
public void doLayout() {
    super.doLayout();

    // increase divider width or height
    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) getUI()).getDivider();
    Rectangle bounds = divider.getBounds();
    if (orientation == HORIZONTAL_SPLIT) {
        bounds.x -= dividerDragOffset;
        bounds.width = dividerDragSize;
    } else {
        bounds.y -= dividerDragOffset;
        bounds.height = dividerDragSize;
    }
    divider.setBounds(bounds);
}
 
開發者ID:IvyBits,項目名稱:Amber-IDE,代碼行數:17,代碼來源:ThinSplitPane.java

示例14: tweakSplitPaneUI

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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

示例15: tweakSplitPaneUI

import javax.swing.plaf.basic.BasicSplitPaneUI; //導入依賴的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


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