Examples of Paint


Examples of java.awt.Paint

     * fillPaint.
     *
     * @param fPattern the TexturePaint to set.
     */
    public void setFillPattern(TexturePaint fPattern) {
        Paint oldPattern = fPattern;
        fillPattern = fPattern;

        if (fillColorButton != null) {
            // GUI doesn't handle fill patterns yet.
        }
View Full Code Here

Examples of java.awt.Paint

     */
    public void actionPerformed(ActionEvent e) {
        Object source = e.getSource();
        String command = e.getActionCommand();
        String interString;
        Paint tmpPaint;
        if (command == LineColorCommand && linePaint instanceof Color) {
            interString = i18n.get(DrawingAttributes.class,
                    "chooseLineColor",
                    "Choose Line Color");
            tmpPaint = getNewPaint((Component) source,
View Full Code Here

Examples of java.awt.Paint

     * @return a matting paint choice icon for the current settings of this
     *         DrawingAttributes object, with the matting paint used.
     */
    public ImageIcon getMattingIconForPaint() {

        Paint paint = getMattingPaint();

        DrawingAttributes da = new DrawingAttributes();
        da.setLinePaint(paint);
        da.setStroke(new BasicStroke(3));

        DrawingAttributes innerda = new DrawingAttributes();
        innerda.setLinePaint(Color.white);
        innerda.setStroke(new BasicStroke(1));

        OpenMapAppPartCollection collection = OpenMapAppPartCollection.getInstance();
        IconPartList parts = new IconPartList();

        if (paint instanceof Color) {
            Color color = (Color) paint;
            Paint opaqueColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), 255);
            DrawingAttributes opaqueDA = new DrawingAttributes();
            opaqueDA.setLinePaint(opaqueColor);
            opaqueDA.setStroke(new BasicStroke(3));

            parts.add(collection.get("LR_TRI", opaqueDA));
View Full Code Here

Examples of java.awt.Paint

     */
    public void setBckgrnd(Paint paint) {
        setBufferDirty(true);

        // Instead, do this.
        Paint oldBackground = background;
        background = paint;
        firePropertyChange(BackgroundProperty, oldBackground, background);

        repaint();
    }
View Full Code Here

Examples of java.awt.Paint

     * null.
     *
     * @return color java.awt.Color.
     */
    public Color getBackground() {
        Paint ret = getBckgrnd();
        if (ret instanceof Color) {
            return (Color) ret;
        }

        return super.getBackground();
View Full Code Here

Examples of java.awt.Paint

     * background of the projection will be returned.
     *
     * @return color java.awt.Color.
     */
    public Paint getBckgrnd() {
        Paint ret = background;
        if (ret == null) {
            // ret = projection.getBackgroundColor();
            ret = super.getBackground();
        }
        return ret;
View Full Code Here

Examples of java.awt.Paint

        int pheight = 512;

        AcmeGifFormatter formatter = new AcmeGifFormatter();
        Graphics graphics = formatter.getGraphics(pwidth, pheight);

        Paint background;
        if (map == null) {
            background = MapBean.DEFAULT_BACKGROUND_COLOR;
        } else {
            background = map.getBckgrnd();
        }
View Full Code Here

Examples of java.awt.Paint

    boolean hasChanged = false;
    for (int i=0; i<mapperSources.size(); ++i) {
      if (ds.equals(mapperSources.get(i))) {
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if (cm!=null) {
          Paint p1 = hasChanged ? null : plot.getSectionPaint(i);
          plot.setSectionPaint(i,cm.getPaint(ds,index));
          // check colors only if useful => when one color changed, don't check the others
          if (!hasChanged) {
            Paint p2 = plot.getSectionPaint(i);
            if (!p1.equals(p2)) hasChanged = true;
          }
        }
      }
    }
View Full Code Here

Examples of java.awt.Paint

    boolean hasChanged = false;
    for (int i=0; i<mapperSources.size(); ++i) {
      if (ds.equals(mapperSources.get(i))) {
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if (cm!=null) {
          Paint p1 = hasChanged ? null : renderer.getSeriesPaint(i);
          renderer.setSeriesPaint(i,cm.getPaint(ds,index));
          // check colors only if useful => when one color changed, don't check the others
          if (!hasChanged) {
            Paint p2 = renderer.getSeriesPaint(i);
            if (!p1.equals(p2)) hasChanged = true;
          }
        }
      }
    }
View Full Code Here

Examples of java.awt.Paint

  }

  public DrawingSupplier getDrawingSupplier() {
    if (supplier==null) supplier = new DefaultDrawingSupplier() {
      public Paint getNextPaint() {
        Paint p = super.getNextPaint();
        if ((x_ary>1) && (p instanceof Color)) {
          Color c = ((Color)p);
          float[] hsb = Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),new float[3]);
          hsb[0] += 0.1 * (x_ary-1);
          if (hsb[0]>1) hsb[0] -=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.