Package java.awt

Examples of java.awt.Composite


                break;
            }
        }

        // Opacity
        Composite composite = CSSUtilities.convertOpacity(element);
        as.addAttribute(GVTAttributedCharacterIterator.TextAttribute.OPACITY,
                        composite, firstChar, lastChar+1);

        // Fill
        Paint p = PaintServer.convertFillPaint(element, node, ctx);
View Full Code Here


        for (int i = 0; i < textRuns.size(); i++) {
            TextRun textRun = (TextRun)textRuns.get(i);
            AttributedCharacterIterator runaci = textRun.getACI();
            runaci.first();

            Composite opacity = (Composite)
                  runaci.getAttribute(GVTAttributedCharacterIterator.
                                              TextAttribute.OPACITY);
            if (opacity != null) {
                g2d.setComposite(opacity);
            }
View Full Code Here

        for (int i = 0; i < textRuns.size(); i++) {
            TextRun textRun = (TextRun)textRuns.get(i);
            AttributedCharacterIterator runaci = textRun.getACI();
            runaci.first();

            Composite opacity = (Composite)
                  runaci.getAttribute(GVTAttributedCharacterIterator.
                                              TextAttribute.OPACITY);
            if (opacity != null) {
                g2d.setComposite(opacity);
            }
View Full Code Here

        state.context.setStatus(ILayer.WAIT);
        state.context.setStatusMessage(Messages.BasicGridCoverageRenderer_rendering_status);

        // setup composite
        Composite oldComposite = graphics.getComposite();
        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, state.opacity));

        // setup affine transform for on screen rendering
        Rectangle displayArea = state.displayArea;
View Full Code Here

        state.context.setStatus(ILayer.WAIT);
        state.context.setStatusMessage(Messages.BasicGridCoverageRenderer_rendering_status);

        // setup composite
        Composite oldComposite = graphics.getComposite();
        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, state.opacity));

        // setup affine transform for on screen rendering
        Rectangle displayArea = state.displayArea;
View Full Code Here

  @Override
  public void paintHovered(Graphics g) {
    if (((JScrollPaneDesignOperation)getOperation()).isHovered()) {
      Graphics2D g2d = (Graphics2D) g;
      Stroke olds = g2d.getStroke();
      Composite oldc = g2d.getComposite();
      g2d.setColor(((JScrollPaneDesignOperation)getOperation()).isPermitted() ? GREEN_COLOR : RED_COLOR);
      g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
      int w = adaptable.getWidget().getWidth();
      int h = adaptable.getWidget().getHeight();
      g2d.fillRect(0, 0, w, h);
View Full Code Here

    if (((JTabbedPaneDesignOperation)getOperation()).isHovered()) {
      int w = adaptable.getWidget().getWidth();
      int h = adaptable.getWidget().getHeight();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setColor(GREEN_COLOR);
      Composite oldComposite = g2d.getComposite();
      AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);
      g2d.setComposite(composite);
      g2d.fillRect(0, 0, w, h);
      Stroke oldStroke = g2d.getStroke();
      g2d.setColor(RED_COLOR);
View Full Code Here

    if (forbid) {
      int w = adaptable.getWidget().getWidth();
      int h = adaptable.getWidget().getHeight();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setColor(RED_COLOR);
      Composite oldComposite = g2d.getComposite();
      AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);
      g2d.setComposite(composite);
      g2d.fillRect(0, 0, w, h);
      Stroke oldStroke = g2d.getStroke();
      g2d.setColor(GREEN_COLOR);
View Full Code Here

  public void paintHovered(Graphics clipg) {
    Rectangle bounds = ((JSplitPaneDesignOperation)getOperation()).getHotspotBounds();
    if (bounds != null) {
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setColor(((JSplitPaneDesignOperation)getOperation()).isForbid() ? RED_COLOR : GREEN_COLOR);
      Composite oldComposite = g2d.getComposite();
      AlphaComposite composite = AlphaComposite.getInstance(
          AlphaComposite.SRC_OVER, 0.5f);
      g2d.setComposite(composite);
      g2d.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);
      Stroke oldStroke = g2d.getStroke();
View Full Code Here

      Window window = new Frame();
      window.setVisible(true);

      Graphics2D graphics2d = (Graphics2D) window.getGraphics();

      Composite composite = new TestComposite();

      Permission[] readDisplayPixels = new Permission[] {
  new AWTPermission("readDisplayPixels")};

      TestSecurityManager sm = new TestSecurityManager(harness);
View Full Code Here

TOP

Related Classes of java.awt.Composite

Copyright © 2018 www.massapicom. 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.