Examples of paintIcon()


Examples of javax.swing.Icon.paintIcon()

        }
      }
      toPaint = new ImageIcon(image);
      this.iconMap.put(fadePos, toPaint);
    }
    toPaint.paintIcon(c, g, x, y);
  }
}
View Full Code Here

Examples of javax.swing.Icon.paintIcon()

    // Necessary as some icons (like JInternalFrame's) don't have
    // disabled icons.
    if (icon!=null) {
      Graphics2D g2d = (Graphics2D)g;
      g2d.setComposite(OfficeXPUtilities.ICON_COMPOSITE);
      icon.paintIcon(b, g2d, iconRect.x, iconRect.y);
      g2d = null;
    }
  }

View Full Code Here

Examples of javax.swing.ImageIcon.paintIcon()

        ? new ImageIcon(HomeComponent3D.class.getResource(navigationPanelIconPath))
        : null;
    navigationPanel.setBorder(new Border() {
        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
          if (nagivationPanelIcon != null) {
            nagivationPanelIcon.paintIcon(c, g, x, y);
          } else {
            // Draw a surrounding oval if no navigation panel icon is defined
            Graphics2D g2D = (Graphics2D)g;
            g2D.setColor(Color.BLACK);
            g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

Examples of javax.swing.ImageIcon.paintIcon()

        ImageIcon baseIcon = new ImageIcon(baseImage);
        Image result = new BufferedImage(baseIcon.getIconWidth(), baseIcon
                .getIconHeight(), BufferedImage.TYPE_INT_ARGB);
        Component c = new Component() {};
        Graphics2D g = (Graphics2D) result.getGraphics();
        baseIcon.paintIcon(c, g, 0, 0);
       
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
        g.setColor(Color.black);
        int x = baseIcon.getIconWidth()/4;
View Full Code Here

Examples of javax.swing.ImageIcon.paintIcon()

        ImageIcon baseIcon = new ImageIcon(baseImage);
        Image result = new BufferedImage(baseIcon.getIconWidth(), baseIcon
                .getIconHeight(), BufferedImage.TYPE_INT_ARGB);
        Component c = new Component() {};
        Graphics2D g = (Graphics2D) result.getGraphics();
        baseIcon.paintIcon(c, g, 0, 0);
       
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
        g.setColor(Color.black);
        int x = baseIcon.getIconWidth()/4;
View Full Code Here

Examples of javax.swing.ImageIcon.paintIcon()

        for (Iterator iterator = iconSet.iterator(); iterator.hasNext();) {
            ImageIcon icon = (ImageIcon) iterator.next();
            Dimension id = new Dimension(icon.getIconWidth(), icon.getIconHeight());
            int dx = (d.width - id.width)/2;
            int dy = (d.height - id.height)/2;
            icon.paintIcon(c, g, x+dx, y+dy);
        }
        ImageIcon bg = getBackground();
        if (bg != null) {
            int dx = (d.width - bg.getIconWidth())/2;
            int dy = (d.height - bg.getIconHeight())/2;
View Full Code Here

Examples of org.scilab.forge.jlatexmath.TeXIcon.paintIcon()

        Graphics2D g2 = img.createGraphics();
        g2.setColor(Color.white);
        g2.fillRect(0,0,icon.getIconWidth(),icon.getIconHeight());
        JLabel jl = new JLabel();
        jl.setForeground(new Color(0, 0, 0));
        icon.paintIcon(jl, g2, 0, 0);

        alpha = (float)0.5;
     
}
View Full Code Here

Examples of org.scilab.forge.jlatexmath.TeXIcon.paintIcon()

        Graphics2D g2 = img.createGraphics();
        g2.setColor(Color.white);
        g2.fillRect(0,0,icon.getIconWidth(),icon.getIconHeight());
        JLabel jl = new JLabel();
        jl.setForeground(new Color(0, 0, 0));
        icon.paintIcon(jl, g2, 0, 0);

        alpha = (float)0.5;
     
}
View Full Code Here

Examples of org.scilab.forge.jlatexmath.TeXIcon.paintIcon()

                           
                            JLabel jl = new JLabel();
                           
                             jl.setForeground(plotColor)// GlobalValues.defaultFormulaColor);
                            if (useLogical == false)   // do not use logical coordinates
                              icon.paintIcon(jl, g2, coordx, coordy);
                            else  // use logical coordinates to place the formula
                            {
                                double [] logicalCoords = { logicalx, logicaly};
                                int [] screenCoords = draw.project(logicalCoords[0], logicalCoords[1]);
                                icon.paintIcon(jl, g2, screenCoords[0], screenCoords[1]);
View Full Code Here

Examples of org.scilab.forge.jlatexmath.TeXIcon.paintIcon()

                              icon.paintIcon(jl, g2, coordx, coordy);
                            else  // use logical coordinates to place the formula
                            {
                                double [] logicalCoords = { logicalx, logicaly};
                                int [] screenCoords = draw.project(logicalCoords[0], logicalCoords[1]);
                                icon.paintIcon(jl, g2, screenCoords[0], screenCoords[1]);
                               

  }
        }
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.