Examples of paintBorder()


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

    // Active, not selected
    Graphics2D g = image.createGraphics();
    g.setColor(style.getForeground());
    g.fillRect(0, 0, ICON_WIDTH, ICON_WIDTH);
    g.setClip(0, 0, ICON_WIDTH, ICON_WIDTH);
    border.paintBorder(null, g, 0, 0, ICON_WIDTH, ICON_WIDTH);
    g.dispose();
    defaultIcon = new ImageIcon(image);
   
    // Active, selected
    // Icon does not copy the image, so we need a new one
View Full Code Here

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

    image2 = gc.createCompatibleImage(ICON_WIDTH, ICON_WIDTH, Transparency.OPAQUE);
    g = image2.createGraphics();
    g.setColor(style.getShadowColor());
    g.fillRect(0, 0, ICON_WIDTH, ICON_WIDTH);
    g.setClip(0, 0, ICON_WIDTH, ICON_WIDTH);
    border.paintBorder(null, g, 0, 0, ICON_WIDTH, ICON_WIDTH);
    g.dispose();
    disabledIcon = new ImageIcon(image2);
   
    // Inactive, selected
    image = gc.createCompatibleImage(ICON_WIDTH, ICON_WIDTH, Transparency.OPAQUE);
View Full Code Here

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

        bottom = border.getBorderInsets(this).bottom;
      } else {
        left = border.getBorderInsets(this).left;
        right = border.getBorderInsets(this).right;
      }
      border.paintBorder(this, g, 0 - left, 0 - top,
        getWidth() + right + left, getHeight() + top + bottom);
    }
   
    /**
     * Paint highlighted borders. Meanot to be used at mouseover.
View Full Code Here

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

//        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

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

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

                    break;
            }

            if (border != null) {
                if ((position != TOP) && (position != BOTTOM)) {
                    border.paintBorder(c, g, borderX, borderY, borderW, borderH);
                } else {
                    Graphics g2 = g.create();
                    if (g2 instanceof Graphics2D) {
                        Graphics2D g2d = (Graphics2D) g2;
                        Path2D path = new Path2D.Float();
View Full Code Here

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

                        path.append(new Rectangle(borderX, labelY, labelX - borderX - TEXT_SPACING, labelH), false);
                        path.append(new Rectangle(labelX + labelW + TEXT_SPACING, labelY, borderX - labelX + borderW - labelW - TEXT_SPACING, labelH), false);
                        path.append(new Rectangle(borderX, labelY + labelH, borderW, borderY - labelY + borderH - labelH), false);
                        g2d.clip(path);
                    }
                    border.paintBorder(c, g2, borderX, borderY, borderW, borderH);
                    g2.dispose();
                }
            }
            g.translate(labelX, labelY);
            label.setSize(labelW, labelH);
View Full Code Here

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

            g.translate(labelX, labelY);
            label.setSize(labelW, labelH);
            label.paint(g);
            g.translate(-labelX, -labelY);
        } else if (border != null) {
            border.paintBorder(c, g, x, y, width, height);
        }
    }

    /**
     * This default implementation returns a new <code>Insets</code>
View Full Code Here

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

    }

    final Border border = getBorder();
    if (border != null)
    {
      border.paintBorder(this, g2, 0, 0, (int) (getWidth() / zoom), (int) (getHeight() / zoom));
    }
    g2.dispose();
  }

}
View Full Code Here

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

                    ((cmp instanceof JToolBar) && ((JToolBar)cmp).isBorderPainted())
                    ||
                    ((cmp instanceof JMenuBar) && ((JMenuBar)cmp).isBorderPainted())
                    ||
                    ((cmp instanceof JProgressBar) && ((JProgressBar)cmp).isBorderPainted() ))
                    border.paintBorder(cmp, svgGen, 0, 0, cmp.getWidth(), cmp.getHeight());
            } else {
                border.paintBorder(cmp, svgGen, 0, 0, cmp.getWidth(), cmp.getHeight());
            }
        }
    }
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.