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


Java BasicSplitPaneDivider类代码示例

本文整理汇总了Java中javax.swing.plaf.basic.BasicSplitPaneDivider的典型用法代码示例。如果您正苦于以下问题:Java BasicSplitPaneDivider类的具体用法?Java BasicSplitPaneDivider怎么用?Java BasicSplitPaneDivider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: reset

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
public static void reset() {
    entries.clear();
    add(Component.class, RUnknownComponent.class);
    add(Window.class, RWindow.class);
    add(JTable.class, RTable.class);
    add(JTableHeader.class, RTableHeader.class);
    add(AbstractButton.class, RAbstractButton.class);
    add(JToggleButton.class, RToggleButton.class);
    add(JComboBox.class, RComboBox.class);
    add(JTextComponent.class, RTextComponent.class);
    add(JTree.class, RTree.class);
    add(JList.class, RList.class);
    add(JTabbedPane.class, RTabbedPane.class);
    add(JMenuItem.class, RMenuItem.class);
    add(JSlider.class, RSlider.class);
    add(JProgressBar.class, RProgressBar.class);
    add(JSpinner.class, RSpinner.class);
    add(DefaultEditor.class, RDefaultEditor.class);
    add(JColorChooser.class, RColorChooser.class);
    add(JSplitPane.class, RSplitPane.class);
    add(BasicSplitPaneDivider.class, RSplitPane.class);
    add(JFileChooser.class, RFileChooser.class);
    add(JEditorPane.class, REditorPane.class);
    add(JLabel.class, RLabel.class);
    add(JScrollBar.class, RIgnoreComponent.class);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:27,代码来源:RComponentFactory.java

示例2: selectSplitPaneDividerLocation

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
public void selectSplitPaneDividerLocation() throws InterruptedException {
    final LoggingRecorder lr = new LoggingRecorder();
    siw(new Runnable() {
        @Override public void run() {
            JSplitPane splitPane = (JSplitPane) ComponentUtils.findComponent(JSplitPane.class, frame);
            splitPane.setDividerLocation(300);
            BasicSplitPaneDivider divider = (BasicSplitPaneDivider) ComponentUtils.findComponent(BasicSplitPaneDivider.class,
                    splitPane);
            RSplitPane rDivider = new RSplitPane(divider, null, null, lr);
            rDivider.mouseReleased(null);
        }
    });
    Call call = lr.getCall();
    AssertJUnit.assertEquals("select", call.getFunction());
    AssertJUnit.assertEquals("300", call.getState());
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:17,代码来源:RSplitPaneTest.java

示例3: 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

示例4: createDefaultDivider

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
@Override
public BasicSplitPaneDivider createDefaultDivider() {
return new BasicSplitPaneDivider(this) {
    
    @Override
    public void setBorder(Border b) {
        b = border ;
    }

@Override
    public void paint(Graphics g) {
    g.setColor(c);
    g.fillRect(0, 0, getSize().width, getSize().height);
        super.paint(g);
    }
};
}
 
开发者ID:Thecarisma,项目名称:powertext,代码行数:18,代码来源:Theme.java

示例5: createDefaultDivider

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
public BasicSplitPaneDivider createDefaultDivider() {
    BasicSplitPaneDivider divider = new BasicSplitPaneDivider(this) {
        public int getDividerSize() {
            return ((int) size.getWidth());
        }
    };

    if (getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
        divider.setLayout(new BoxLayout(divider, BoxLayout.Y_AXIS));
        divider.add(Box.createVerticalGlue());
        divider.add(addButtonV);
        divider.add(Box.createVerticalStrut(50));
        divider.add(removeButtonV);
        divider.add(Box.createVerticalGlue());

    } else {
        divider.setLayout(new BoxLayout(divider, BoxLayout.X_AXIS));
        divider.add(Box.createHorizontalGlue());
        divider.add(addButtonH);
        divider.add(Box.createHorizontalStrut(50));
        divider.add(removeButtonH);
        divider.add(Box.createHorizontalGlue());
    }
    return divider;
}
 
开发者ID:phweda,项目名称:MFM,代码行数:26,代码来源:AddRemoveDividerUI.java

示例6: findDivider

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
/**
 * Searches divider inside split pane.
 *
 * @return an operator for the divider.
 */
public BasicSplitPaneDivider findDivider() {
    return ((BasicSplitPaneDivider) waitSubComponent(new ComponentChooser() {
        @Override
        public boolean checkComponent(Component comp) {
            return comp instanceof BasicSplitPaneDivider;
        }

        @Override
        public String getDescription() {
            return "";
        }

        @Override
        public String toString() {
            return "JSplitPaneOperator.findDivider.ComponentChooser{description = " + getDescription() + '}';
        }
    }));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:JSplitPaneOperator.java

示例7: createDefaultDivider

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
@Override
public BasicSplitPaneDivider createDefaultDivider() {
    return new BasicSplitPaneDivider(this) {

        @Override
        public void paint(Graphics g) {
            g.setColor(backgroundColor);
            g.fillRect(0, 0, getSize().width, getSize().height);
            int mid = getSize().height / 2;
            g.setColor(ORANGE_COLOR);
            int min = 4;
            int max = 9;
            for (int i = min; i <= max; i++) {
                g.drawLine(i, mid - max + i, i, mid + max - i);
            }
            super.paint(g);
        }
    };
}
 
开发者ID:hvqzao,项目名称:burp-second-order,代码行数:20,代码来源:GlyphSplitPaneUI.java

示例8: layout

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的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

示例9: createDefaultDivider

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的package包/类
/**
     * Creates the default divider.
     */
    @Override
    public BasicSplitPaneDivider createDefaultDivider() {
        return new BasicSplitPaneDivider(this){
            /**
             * Paints the divider.</br> 
             * <b>Zeichne den Divier nicht.</b>
             */
            @Override
            public void paint(Graphics g) {
//              super.paint(g);
//
//              // Paint the border.
//              Border   border = getBorder();
//
//              if (border != null) {
//                  Dimension     size = getSize();
//
//                  border.paintBorder(this, g, 0, 0, size.width, size.height);
//              }
            }            
        };
    }
 
开发者ID:R3d-Dragon,项目名称:jMovieManager,代码行数:26,代码来源:MyBasicSplitPaneUI.java

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: doLayout

import javax.swing.plaf.basic.BasicSplitPaneDivider; //导入依赖的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

示例15: 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


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