Package javax.swing.border

Examples of javax.swing.border.Border.paintBorder()


            g.setColor(getBackground());
            g.fillRect(0, 0, size.width, size.height);
        }

        if (border != null) {
            border.paintBorder(this, g, 0, 0, size.width, size.height);
        }

        if (_jideSplitPane.isShowGripper()) {
            Rectangle rect = new Rectangle(size);
            if (_gripperPainter != null) {
View Full Code Here


    }

    protected void paintBorder(Graphics g, AbstractButton b) {
        Border border = getBorder(b);
        if(border!=null)
            border.paintBorder(b, g, 0, 0, b.getWidth(), b.getHeight());
    }

    protected Border getBorder(AbstractButton button) {
        if(isPressed(button))
            return getPressedBorder(button);
View Full Code Here

    protected void paintBorder(Graphics g, Titlebar titlebar) {
        Border border = getBorder(titlebar);
        if (border != null) {
            Rectangle rectangle = getPaintRect(titlebar);
            g.translate(rectangle.x, rectangle.y);
            border.paintBorder(titlebar, g, 0, 0, rectangle.width, rectangle.height);
            g.translate(-rectangle.x, -rectangle.y);
        }
    }

    public void layoutComponents(Titlebar titlebar) {
View Full Code Here

//        if (menuItem.isOpaque()) {
        if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
            // Draw a dark shadow border without bottom
            if (mouseSelectedBorder != null) {
                mouseSelectedBorder.paintBorder(menuItem, g, 0, 0, menuWidth - 1, menuHeight);
            }
            g.setColor(mouseHoverBackground);
            g.fillRect(1, 1, menuWidth - 3, menuHeight - 2);
        }
        else {
View Full Code Here

                {
                    ((Graphics2D)g).setComposite(!overrideFirstMode && secondMode
                        ? COMPOSITE_MODE_2 : COMPOSITE_MODE_1);
                }

                border.paintBorder(this, g, picX, picY, width, height);

                if (INDICATION_TYPE == INDICATION_FRAME && !secondMode)
                {
                    g.setColor(Color.WHITE);
                    g.drawRect(picX + 1, picY + 1, width - 2, height - 2);
View Full Code Here

            getSeparatorInsets(insets);
            int x = c.getX() - insets.right;
            int y = c.getY() - 2;
            int w = c.getWidth() + insets.left + insets.right;
            int h = c.getHeight() + 4;
            b.paintBorder(c, g, x, y, w, h);
        }
    }
   
    @Override protected void paintSeparator(Graphics2D g, JXStatusBar bar, int x, int y, int w, int h) {
        //paint nothing, since paintBackground handles this
View Full Code Here

        public void paint(Graphics g, JComponent c) {
            Border vpBorder = scrollpane.getViewportBorder();
            if (vpBorder != null) {
                Rectangle r = scrollpane.getViewportBorderBounds();
                vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height);
            }
        }

        protected void uninstallListeners(JScrollPane scrollPane) {
            super.uninstallListeners(scrollPane);
View Full Code Here

    public void paint(final Graphics g, final JComponent c) {
        Border viewportBorder = scrollpane.getViewportBorder();
        if (viewportBorder != null) {
            Rectangle borderBounds = scrollpane.getViewportBorderBounds();
            viewportBorder.paintBorder(scrollpane, g, borderBounds.x, borderBounds.y, borderBounds.width, borderBounds.height);
        }
    }

    public Dimension getMaximumSize(final JComponent c) {
        return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
View Full Code Here

        public void paint(Graphics g, JComponent c) {
            Border vpBorder = scrollpane.getViewportBorder();
            if (vpBorder != null) {
                Rectangle r = scrollpane.getViewportBorderBounds();
                vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height);
            }
        }

        protected void uninstallListeners(JScrollPane scrollPane) {
            super.uninstallListeners(scrollPane);
View Full Code Here

    public void paint(final Graphics g, final JComponent c) {
        Border viewportBorder = scrollpane.getViewportBorder();
        if (viewportBorder != null) {
            Rectangle borderBounds = scrollpane.getViewportBorderBounds();
            viewportBorder.paintBorder(scrollpane, g, borderBounds.x, borderBounds.y, borderBounds.width, borderBounds.height);
        }
    }

    public Dimension getMaximumSize(final JComponent c) {
        return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.