Package java.awt

Examples of java.awt.Graphics.dispose()


      ComponentDrawContext context = new ComponentDrawContext(
          proj.getFrame().getCanvas(), circ, circState,
          base, g, printerView);
      Collection<Component> noComps = Collections.emptySet();
      circ.draw(context, noComps);
      g.dispose();
      return Printable.PAGE_EXISTS;
    }
  }
 
  private static String format(String header, int index, int max,
View Full Code Here


    g.translate(-offset.getX(), -offset.getY());
    for (CanvasObject shape : getObjectsFromBottom()) {
      if (!(shape instanceof AppearanceElement)) {
        Graphics dup = g.create();
        shape.paint(dup, null);
        dup.dispose();
      }
    }
    g.translate(offset.getX(), offset.getY());
    if (rotate != 0.0) {
      ((Graphics2D) g).rotate(-rotate);
View Full Code Here

      g.setColor(Color.BLACK);
      Graphics g_copy = g.create();
      ComponentDrawContext c = new ComponentDrawContext(destination,
          null, null, g, g_copy);
      tool.paintIcon(c, 2, 2);
      g_copy.dispose();
    }
   
    public String getToolTip() {
      String ret = tool.getDescription();
      int index = 1;
View Full Code Here

    }

    Graphics g2 = g.create();
    g2.translate(BORDER, BORDER);
    item.paintIcon(ToolbarButton.this, g2);
    g2.dispose();

    // draw selection indicator
    if (toolbar.getToolbarModel().isSelected(item)) {
      Dimension dim = item.getDimension(toolbar.getOrientation());
      GraphicsUtil.switchToWidth(g, 2);
View Full Code Here

    Graphics gScaled = g.create();
    if (zoom != 1.0 && zoom != 0.0 && gScaled instanceof Graphics2D) {
      ((Graphics2D) gScaled).scale(zoom, zoom);
    }
    super.paintForeground(gScaled);
    gScaled.dispose();
  }
 
  @Override
  public void repaintCanvasCoords(int x, int y, int width, int height) {
    double zoom = grid.getZoomFactor();
View Full Code Here

        JOptionPane.showMessageDialog(frame,
            Strings.get("couldNotCreateFile"));
        monitor.close();
        return;
      }
      g.dispose();
      monitor.close();
    }
  }
}
View Full Code Here

          }
        }
        GraphicsUtil.drawText(g, label, x, y,
            GraphicsUtil.H_CENTER, GraphicsUtil.V_BASELINE);
      }
      g.dispose();
    }
  }

  /* TODO
  public String getToolTip(ComponentUserEvent e) {
View Full Code Here

    CanvasModel model = this.model;
    CanvasTool tool = listener.getTool();
    if (model != null) {
      Graphics dup = g.create();
      model.paint(g, selection);
      dup.dispose();
    }
    if (tool != null) {
      Graphics dup = g.create();
      tool.draw(this, dup);
      dup.dispose();
View Full Code Here

      dup.dispose();
    }
    if (tool != null) {
      Graphics dup = g.create();
      tool.draw(this, dup);
      dup.dispose();
    }
  }
}
View Full Code Here

          mProgramLabel.setOpaque(true);
          mProgramLabel.setBounds(0, 0, bounds.width, bounds.height);
          mProgramLabel.paint(lg);

          g.drawImage(textImage, bounds.x, bounds.y, mProgramLabel);
          lg.dispose();
        }
        else {
          super.paintRow(g,clipBounds,insets,bounds,path,row,isExpanded,hasBeenExpanded,isLeaf);
        }
      }
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.