Java 类javax.swing.plaf.basic.BasicSplitPaneDivider 实例源码

项目:marathonv5    文件:RComponentFactory.java   
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);
}
项目:marathonv5    文件:RSplitPaneTest.java   
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());
}
项目:Equella    文件:AppletGuiUtils.java   
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$
    }
}
项目:powertext    文件:Theme.java   
@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);
    }
};
}
项目:MFM    文件:AddRemoveDividerUI.java   
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;
}
项目:openjdk-jdk10    文件:JSplitPaneOperator.java   
/**
 * 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() + '}';
        }
    }));
}
项目:openjdk9    文件:JSplitPaneOperator.java   
/**
 * 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() + '}';
        }
    }));
}
项目:burp-second-order    文件:GlyphSplitPaneUI.java   
@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);
        }
    };
}
项目:JHelioviewer-SWHV    文件:JHVSplitPane.java   
@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);
}
项目:burp-token-rewrite    文件:GlyphSplitPaneUI.java   
@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);
        }
    };
}
项目:jMovieManager    文件:MyBasicSplitPaneUI.java   
/**
     * 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);
//              }
            }            
        };
    }
项目:concurrent    文件:ChildComponentDelegate.java   
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;
}
项目:concurrent    文件:ElegantDemo.java   
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;
}
项目:concurrent    文件:SplitPaneDemo.java   
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;
}
项目:concurrent    文件:StandardBorderManager.java   
/**
 * 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);
}
项目:polydes    文件:MiniSplitPane.java   
@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);
}
项目:polydes    文件:MiniSplitPane.java   
@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);
}
项目:flexdock    文件:StandardBorderManager.java   
/**
 * 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);
}
项目:Amber-IDE    文件:ThinSplitPane.java   
@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);
}
项目:incubator-netbeans    文件:ClassesControllerUI.java   
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);
    }
}
项目:incubator-netbeans    文件:InstancesControllerUI.java   
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);
    }
}
项目:incubator-netbeans    文件:SummaryControllerUI.java   
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);
    }
}
项目:incubator-netbeans    文件:OQLControllerUI.java   
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);
    }
}
项目:incubator-netbeans    文件:PaneBuilders.java   
static ComponentBuilder getBuilder(Instance instance, Heap heap) {
    if (DetailsUtils.isSubclassOf(instance, JViewport.class.getName())) {
        return new JViewportBuilder(instance, heap);
    } else if (DetailsUtils.isSubclassOf(instance, JScrollPane.class.getName())) {
        return new JScrollPaneBuilder(instance, heap);
    } else if (DetailsUtils.isSubclassOf(instance, JSplitPane.class.getName())) {
        return new JSplitPaneBuilder(instance, heap);
    } else if (DetailsUtils.isSubclassOf(instance, BasicSplitPaneDivider.class.getName())) {
        return new BasicSplitPaneDividerBuilder(instance, heap);
    } else if (DetailsUtils.isSubclassOf(instance, JTabbedPane.class.getName())) {
        return new JTabbedPaneBuilder(instance, heap);
    }
    return null;
}
项目:incubator-netbeans    文件:PaneBuilders.java   
protected void setupInstance(BasicSplitPaneDivider instance) {
            super.setupInstance(instance);

//            instance.setDividerSize(dividerSize);
            if (border != null) {
                Border b = border.createInstance();
                if (b != null) instance.setBorder(b);
            }
        }
项目:incubator-netbeans    文件:PaneBuilders.java   
protected BasicSplitPaneDivider createInstanceImpl() {
    final JSplitPane split = new JSplitPane(orientation);
    BasicSplitPaneUI ui = split.getUI() instanceof BasicSplitPaneUI ?
            (BasicSplitPaneUI)split.getUI() : new BasicSplitPaneUI() {
                { installUI(split); }
            };
    return new BasicSplitPaneDivider(ui);
}
项目:incubator-netbeans    文件:CombinedPanel.java   
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));
    }
}
项目:incubator-netbeans    文件:JCompoundSplitPane.java   
private void tweakUI() {
    if (!(getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

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

    if (divider != null) {
        divider.addMouseListener(new DividerMouseListener());
    }
}
项目:CanReg5    文件:DottedDividerSplitPane.java   
@Override
public BasicSplitPaneDivider createDefaultDivider() {

    return new BasicSplitPaneDivider(this) {

        @Override
        public void setBorder(Border b) {
        }

        @Override
        public void paint(Graphics g) {                
            g.setColor(Color.DARK_GRAY);
            int startOval = 0;
            final int ovalSize = divider.getDividerSize() % 2 == 0 ? 
                    divider.getDividerSize() / 2 : 
                    divider.getDividerSize() / 2 + 1;

            if(getOrientation() == javax.swing.JSplitPane.HORIZONTAL_SPLIT) {
                while((startOval+ovalSize) < getSize().height) {
                    g.fillOval(1, startOval, ovalSize, ovalSize);
                    startOval += divider.getDividerSize();
                }
            } else if(getOrientation() == javax.swing.JSplitPane.VERTICAL_SPLIT) {
                while((startOval+ovalSize) < getSize().width) {
                    g.fillOval(startOval, 1, ovalSize, ovalSize);
                    startOval += divider.getDividerSize();
                }
            }

            super.paint(g);
        }
    };
}
项目:cuba    文件:DesktopSplitPanel.java   
@Override
public void setLocked(boolean locked) {
    this.locked = locked;

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) impl.getUI()).getDivider();
    if (locked) {
        divider.setDividerSize(0);
    } else {
        divider.setDividerSize(10);
    }

    impl.revalidate();
    impl.repaint();
}
项目:SBOLDesigner    文件:InvisibleSplitPane.java   
/**
 * 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;
}
项目:beautyeye    文件:SplitPaneDividerBorder.java   
public Insets getBorderInsets(Component c)
{
    Insets insets = new Insets(0, 0, 0, 0);
    if (c instanceof BasicSplitPaneDivider)
    {
        BasicSplitPaneUI bspui = ((BasicSplitPaneDivider) c)
                .getBasicSplitPaneUI();

        if (bspui != null)
        {
            JSplitPane splitPane = bspui.getSplitPane();

            if (splitPane != null)
            {
                if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT)
                {
                    insets.top = insets.bottom = 0;
                    insets.left = insets.right = 1;
                    return insets;
                }
                // VERTICAL_SPLIT
                insets.top = insets.bottom = 1;
                insets.left = insets.right = 0;
                return insets;
            }
        }
    }
    insets.top = insets.bottom = insets.left = insets.right = 1;
    return insets;
}
项目:PasswordSafe    文件:CSplitPaneDividerBorder.java   
public Insets getBorderInsets(Component c)
{
    Insets insets = new Insets(0, 0, 0, 0);
    if(c instanceof BasicSplitPaneDivider)
    {
        BasicSplitPaneUI bspui = ((BasicSplitPaneDivider)c).getBasicSplitPaneUI();
        if(bspui != null)
        {
            JSplitPane splitPane = bspui.getSplitPane();
            if(splitPane != null)
            {
                if(splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT)
                {
                    // horizontal
                    insets.top = insets.bottom = 0;
                    insets.left = insets.right = 1;
                    return insets;
                }
                else
                {
                    // vertical
                    insets.top = insets.bottom = 1;
                    insets.left = insets.right = 0;
                    return insets;
                }
            }
        }
    }
    insets.top = insets.bottom = insets.left = insets.right = 1;
    return insets;
}
项目:metasfresh    文件:AdempiereSplitPaneUI.java   
@Override
public Insets getBorderInsets(final Component c)
{
    final Insets insets = new Insets(0, 0, 0, 0);
    if (c instanceof BasicSplitPaneDivider)
    {
        final BasicSplitPaneUI bspui = ((BasicSplitPaneDivider)c).getBasicSplitPaneUI();
        if (bspui != null)
        {
            final JSplitPane splitPane = bspui.getSplitPane();
            if (splitPane != null)
            {
                if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT)
                {
                    insets.top = insets.bottom = 0;
                    insets.left = insets.right = 1;
                    return insets;
                }
                // VERTICAL_SPLIT
                insets.top = insets.bottom = 1;
                insets.left = insets.right = 0;
                return insets;
            }
        }
    }
    insets.top = insets.bottom = insets.left = insets.right = 1;
    return insets;
}
项目:Emulator    文件:Splitpanel.java   
public Splitpanel() {
    super(JSplitPane.HORIZONTAL_SPLIT);
    setBorder(new EmptyBorder(10, 3, 10, 3));
    setContinuousLayout(true);
    setDividerSize(2);
    setOpaque(false);
    setUI(new BasicSplitPaneUI() {
        public BasicSplitPaneDivider createDefaultDivider() {
            return new BasicSplitPaneDivider(this) {
                public void setBorder(Border b) {
                    super.setBorder(new EmptyBorder(0, 0, 0, 0));
                }

                @Override
                public void paint(Graphics g) {
                    super.paint(g);

                    Graphics2D g2   = (Graphics2D) g;
                    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                    g2.setColor(new Color(229, 229, 229, 100));
                    g2.drawLine(getWidth() - 1, 0, getWidth() - 1, getHeight());
                    g2.setColor(new Color(241, 241, 241, 255));
                    g2.drawLine(getWidth() - 2, 1, getWidth() - 2, getHeight() - 1);
                }
            };
        }
      });
}
项目:seaglass    文件:SeaGlassSplitPaneUI.java   
/**
 * Creates the default divider.
 */
public BasicSplitPaneDivider createDefaultDivider() {
    SeaGlassSplitPaneDivider divider = new SeaGlassSplitPaneDivider(this);

    divider.setDividerSize(splitPane.getDividerSize());
    return divider;
}
项目:concurrent    文件:SplitPaneDividerBorder.java   
public Insets getBorderInsets(Component c)
{
    Insets insets = new Insets(0, 0, 0, 0);
    if (c instanceof BasicSplitPaneDivider)
    {
        BasicSplitPaneUI bspui = ((BasicSplitPaneDivider) c)
                .getBasicSplitPaneUI();

        if (bspui != null)
        {
            JSplitPane splitPane = bspui.getSplitPane();

            if (splitPane != null)
            {
                if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT)
                {
                    insets.top = insets.bottom = 0;
                    insets.left = insets.right = 1;
                    return insets;
                }
                // VERTICAL_SPLIT
                insets.top = insets.bottom = 1;
                insets.left = insets.right = 0;
                return insets;
            }
        }
    }
    insets.top = insets.bottom = insets.left = insets.right = 1;
    return insets;
}
项目:concurrent    文件:DemoBorderManager.java   
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);
    }
}
项目:concurrent    文件:BorderDemo.java   
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;
}
项目:findbugs-all-the-bugs    文件:MainFrameComponentFactory.java   
JSplitPane summaryTab() {
        mainFrame.setSummaryTopPanel(new JPanel());
        mainFrame.getSummaryTopPanel().setLayout(new GridLayout(0, 1));
        mainFrame.getSummaryTopPanel().setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 4));
//        mainFrame.getSummaryTopPanel().setMinimumSize(new Dimension(fontSize * 50, fontSize * 5));

        JPanel summaryTopOuter = new JPanel(new BorderLayout());
        summaryTopOuter.add(mainFrame.getSummaryTopPanel(), BorderLayout.NORTH);

        mainFrame.getSummaryHtmlArea().setContentType("text/html");
        mainFrame.getSummaryHtmlArea().setEditable(false);
        mainFrame.getSummaryHtmlArea().addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent evt) {
                AboutDialog.editorPaneHyperlinkUpdate(evt);
            }
        });
        setStyleSheets();
        // JPanel temp = new JPanel(new BorderLayout());
        // temp.add(summaryTopPanel, BorderLayout.CENTER);
        JScrollPane summaryScrollPane = new JScrollPane(summaryTopOuter);
        summaryScrollPane.getVerticalScrollBar().setUnitIncrement((int) Driver.getFontSize());

        JSplitPane splitP = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false, summaryScrollPane,
                mainFrame.getSummaryHtmlScrollPane());
        splitP.setContinuousLayout(true);
        splitP.setDividerLocation(GUISaveState.getInstance().getSplitSummary());
        splitP.setOneTouchExpandable(true);
        splitP.setUI(new BasicSplitPaneUI() {
            @Override
            public BasicSplitPaneDivider createDefaultDivider() {
                return new BasicSplitPaneDivider(this) {
                    @Override
                    public void setBorder(Border b) {
                    }
                };
            }
        });
        splitP.setBorder(null);
        return splitP;
    }