Package javax.swing

Examples of javax.swing.Icon.paintIcon()


            g2.rotate( - Math.PI / 2 );
            g2.translate( - c.getHeight(), 0 );
          }

          if (icon != null) {
                icon.paintIcon(c, g, paintIconR.x, paintIconR.y);
            }

            if (text != null) {
                int textX = paintTextR.x;
                int textY = paintTextR.y + fm.getAscent();
View Full Code Here


        }

        BufferedImage bimg = new BufferedImage(THUMB_SIZE, THUMB_SIZE, BufferedImage.TYPE_INT_ARGB);
        Graphics g = bimg.getGraphics();
        preview.paintIcon(null, g, 0, 0);
        icon.paintIcon(null, g, THUMB_SIZE - icon.getIconWidth(), THUMB_SIZE - icon.getIconHeight());

        preview.setImage(bimg);
    };

    private void loadImage(CoverWrapper wrap) {
View Full Code Here

     
      if (zone == DockingConstants.INT_HIDE_LEFT) {
        g2.translate(0, btn.getHeight());
        g2.rotate( -pid2);
        if (icon != null) {
          icon.paintIcon(btn, g2, i.bottom, i.left);
          if (text != null){
            g2.drawString(text,
                i.bottom + icon.getIconWidth() + btn.getIconTextGap(),
                i.left + btn.getWidth() / 2 +
                fm.getAscent() / 2 /*       fm.getAscent()*/);
 
View Full Code Here

        }
      } else {
        g2.translate(btn.getWidth(), 0);
        g2.rotate(pid2);
        if (icon != null) {
          icon.paintIcon(btn, g2, 1, 1);
          if (text != null){
            g2.drawString(text, i.top + icon.getIconWidth() + btn.getIconTextGap(),
                btn.getWidth() / 2 + fm.getAscent() / 2);
          }
        } else {
View Full Code Here

        Icon icon = frame.getFrameIcon();
        if (icon != null) {
            if (!leftToRight)
                xOffset -= icon.getIconWidth();
            int iconY = ((height / 2) - (icon.getIconHeight() / 2));
            icon.paintIcon(frame, g, xOffset, iconY);
            xOffset += leftToRight ? icon.getIconWidth() + 5 : -5;
        }

        if (frameTitle != null) {
            Font f = getFont();
View Full Code Here

        }
        if (toPaint!=null) {
          Icon icon = toPaint.getIcon();
          if (icon!=null) {
            int y2 = y + (cellHeight-icon.getIconHeight())/2;
            icon.paintIcon(this, g, 0, y2);
          }
        }
      }

      // The next possible y-coordinate is just after the last line
View Full Code Here

    }

    protected void paintIcon(final Graphics g, final JComponent c, final Rectangle iconRect) {
        final Icon icon = ButtonCommons.getCurrentIcon((AbstractButton)c);
        if (icon != null) {
            icon.paintIcon(c, g, iconRect.x, iconRect.y);
        }
    }

    protected void paintText(final Graphics g, final AbstractButton b,
                             final Rectangle textRect, final String text) {
View Full Code Here

        paintTitleBackground(g);

        if (menuBar == null) {
            Icon frameIcon = internals.getFrameIcon();
            if (frameIcon != null) {
                frameIcon.paintIcon(this, g, menuBarBounds.x, menuBarBounds.y);
            }
        }

        g.setColor(internals.isSelected()
                   ? selectedTextColor
View Full Code Here

    }

    protected void paintIcon(final Graphics g, final JComponent c, final Rectangle iconRect) {
        final Icon icon = ButtonCommons.getCurrentIcon((AbstractButton)c);
        if (icon != null) {
            icon.paintIcon(c, g, iconRect.x, iconRect.y);
        }
    }

    protected void paintText(final Graphics g, final AbstractButton b,
                             final Rectangle textRect, final String text) {
View Full Code Here

    }

    protected void paintIcon(final Graphics g, final JComponent c, final Rectangle iconRect) {
        final Icon icon = ButtonCommons.getCurrentIcon((AbstractButton)c);
        if (icon != null) {
            icon.paintIcon(c, g, iconRect.x, iconRect.y);
        }
    }

    protected void paintText(final Graphics g, final AbstractButton b,
                             final Rectangle textRect, final String text) {
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.