Package java.awt

Examples of java.awt.Graphics.create()


    }

    private void paintOutline(final JComponent f, final int x, final int y,
                              final int width, final int height) {
        Graphics g = f.getParent().getGraphics();
        g = g.create();
        g.setXORMode(Color.WHITE);
        if (shouldClearOutline) {
            g.drawRect(prevOutlineBounds.x, prevOutlineBounds.y,
                       prevOutlineBounds.width - 1, prevOutlineBounds.height - 1);
        } else {
View Full Code Here


    }
   
    try
    {
      Graphics g = null;
      g.create();
    }
    catch(NullPointerException e)
    {
      try
      {
View Full Code Here

    for (Component comp : unionSet) {
      AttributeSet attrs = comp.getAttributeSet();
      Location loc = comp.getLocation();
      int x = loc.getX() + dx;
      int y = loc.getY() + dy;
      context.setGraphics(g.create());
      comp.getFactory().drawGhost(context, Color.gray, x, y, attrs);
      context.getGraphics().dispose();
    }
    context.setGraphics(g);
  }
View Full Code Here

        for (Component comp : unionSet) {
            AttributeSet attrs = comp.getAttributeSet();
            Location loc = comp.getLocation();
            int x = loc.getX() + dx;
            int y = loc.getY() + dy;
            context.setGraphics(g.create());
            comp.getFactory().drawGhost(context, Color.gray, x, y, attrs);
            context.getGraphics().dispose();
        }
        context.setGraphics(g);
    }
View Full Code Here

          }
          {
            String msg = "4001234567890123456789012345678901234567890";
            i = JEANImage.getAWTImage("xml/barcode/about.xml", msg);
            Graphics gph = i.getGraphics();
            jDesktopPane1.paintComponents(gph.create(0, 0, 200, 50));
          }
          {
            jLabel5 = new JLabel4j_std();
            jDesktopPane1.add(jLabel5);
            jLabel5.setText("Commander4j " + JVersion.getProgramVersion());
View Full Code Here

          }
          {
            String msg = "4001234567890123456789012345678901234567890";
            i = JEANImage.getAWTImage("xml/barcode/about.xml", msg);
            Graphics gph = i.getGraphics();
            jDesktopPane1.paintComponents(gph.create(0, 0, 200, 50));
          }
          {
            jLabel5 = new JLabel4j_std();
            jDesktopPane1.add(jLabel5);
            jLabel5.setText("Commander4j " + JVersion.getProgramVersion());
View Full Code Here

        }
    }

    private void paintOutline(JComponent f, int x, int y, int width, int height) {
        Graphics g = f.getParent().getGraphics();
        g = g.create();
        g.setXORMode(Color.WHITE);
        if (shouldClearOutline) {
            g.drawRect(prevOutlineBounds.x, prevOutlineBounds.y, prevOutlineBounds.width - 1,
                    prevOutlineBounds.height - 1);
        } else {
View Full Code Here

                    h = (int) (ih * Math.sin(radian) + iw * Math.sin(DEGREE_90 - radian));
                }
                Image image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
                cacheByAngle.put(originalAngle, imageResource = new ImageResource(image));
                Graphics g = image.getGraphics();
                Graphics2D g2d = (Graphics2D) g.create();

                // calculate the center of the icon.
                int cx = iw / 2;
                int cy = ih / 2;

View Full Code Here

    }
   
    try
    {
      Graphics g = null;
      g.create();
    }
    catch(NullPointerException e)
    {
      try
      {
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.