Examples of FilteredImageSource


Examples of ae.java.awt.image.FilteredImageSource

            filter = new AreaAveragingScaleFilter(width, height);
        } else {
            filter = new ReplicateScaleFilter(width, height);
        }
        ImageProducer prod;
        prod = new FilteredImageSource(getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
View Full Code Here

Examples of com.google.code.appengine.awt.image.FilteredImageSource

        if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
            filter = new AreaAveragingScaleFilter(width, height);
        } else {
            filter = new ReplicateScaleFilter(width, height);
        }
        ImageProducer producer = new FilteredImageSource(getSource(), filter);
//        return Toolkit.getDefaultToolkit().createImage(producer);
        throw new UnsupportedOperationException();
    }
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.image.FilteredImageSource

        if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
            filter = new AreaAveragingScaleFilter(width, height);
        } else {
            filter = new ReplicateScaleFilter(width, height);
        }
        ImageProducer producer = new FilteredImageSource(getSource(), filter);
        return new OffscreenImage(producer);
    }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

     */
    public void setImage(Image image) {
        this.image = image;
        if (image != null) {
            UIUtil.waitFor(image, this);
            grayImage = createImage(new FilteredImageSource(image.getSource(), new GrayFilter()));
            UIUtil.waitFor(grayImage, this);
        } else {
            grayImage = null;
        }
        buffer = null;
View Full Code Here

Examples of java.awt.image.FilteredImageSource

                      }
                      int toff = 0;
                      if (imagePath != null) {
                          Image img = UIUtil.loadImage(m.getClass(), imagePath);
                          if(!m.isEnabled()) {
                              img = createImage(new FilteredImageSource(img.getSource(),
                              new GrayFilter()));
                              UIUtil.waitFor(img, this);
                          }
                         
                          if (img != null) {
View Full Code Here

Examples of java.awt.image.FilteredImageSource

      }
    }
    // Draw the pattern image with foreground color
    final int foregroundColorRgb = foregroundColor.getRGB() & 0xFFFFFF;
    imageGraphics.drawImage(Toolkit.getDefaultToolkit().createImage(
        new FilteredImageSource(patternImage.getSource(),
        new RGBImageFilter() {
          {
            this.canFilterIndexColorModel = true;
          }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

          public void actionPerformed(ActionEvent ev) {
            // Manage auto repeat button with mouse listener
          }
        });
      // Create a darker press icon
      setPressedIcon(new ImageIcon(createImage(new FilteredImageSource(
          ((ImageIcon)getIcon()).getImage().getSource(),
          new RGBImageFilter() {
            {
              canFilterIndexColorModel = true;
            }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

          imageGraphics.dispose();
         
          final int colorRed   = this.pieceColor & 0xFF0000;
          final int colorGreen = this.pieceColor & 0xFF00;
          final int colorBlue  = this.pieceColor & 0xFF;
          setIcon(new ImageIcon(c.createImage(new FilteredImageSource(image.getSource (),
              new RGBImageFilter() {
                {
                  canFilterIndexColorModel = true;
                }
 
View Full Code Here

Examples of java.awt.image.FilteredImageSource

    /**
     * Creates an image from an existing one by replacing the old color with the new color.
     */
    public static Image createImage(Image i, Color oldColor, Color newColor) {
        MaskFilter filter = MaskFilter.getInstance(oldColor, newColor);
        ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
        Image image = Toolkit.getDefaultToolkit().createImage(prod);
        return image;
    }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

     * @param insets the insets. The border area with the insets will not be tinted.
     * @return a tinted image
     */
    public static Image createTintedImage(Image i, Color color, Insets insets) {
        TintFilter filter = new TintFilter(color, i.getWidth(null), i.getHeight(null), insets);
        ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
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.