Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Pattern.dispose()


            .getMenuShadowColor(), 64, theme.getMenuShadowColor(), 0);
        gc.setForegroundPattern(pattern);
        gc.setBackgroundPattern(pattern);
        gc.fillRectangle(new Rectangle(left + width - SHADOW_GAP, top, SHADOW_GAP - 1,
            height - 1));
        pattern.dispose();

        pattern = new Pattern(gc.getDevice(), 9999, top, 9999, top + height, theme
            .getMenuShadowColor(), 48, theme.getMenuShadowColor(), 0);
        gc.setForegroundPattern(pattern);
        gc.setBackgroundPattern(pattern);
View Full Code Here


            .getMenuShadowColor(), 48, theme.getMenuShadowColor(), 0);
        gc.setForegroundPattern(pattern);
        gc.setBackgroundPattern(pattern);
        gc.fillRectangle(new Rectangle(left + SHADOW_GAP, top, width - SHADOW_GAP * 2,
            height));
        pattern.dispose();
      }
      else
      {
        int rightLeft = drawRect.x + drawRect.width + 1;
        int rightTop = drawRect.y + SHADOW_GAP;
View Full Code Here

            SHADOW_GAP - 2, 1));
        gc.fillRectangle(new Rectangle(rightLeft, drawRect.y + 1 + SHADOW_GAP,
            SHADOW_GAP - 1, 1));
        gc.fillRectangle(new Rectangle(rightLeft, drawRect.y + 2 + SHADOW_GAP,
            SHADOW_GAP, SHADOW_GAP - 2));
        pattern.dispose();

        rightTop += SHADOW_GAP;

        pattern = new Pattern(gc.getDevice(), rightLeft, 9999, rightLeft + SHADOW_GAP,
            9999, theme.getMenuShadowColor(), 48, theme.getMenuShadowColor(), 0);
View Full Code Here

            9999, theme.getMenuShadowColor(), 48, theme.getMenuShadowColor(), 0);
        gc.setForegroundPattern(pattern);
        gc.setBackgroundPattern(pattern);
        gc.fillRectangle(new Rectangle(rightLeft, rightTop, SHADOW_GAP, drawRect.y
            + drawRect.height - rightTop + 1));
        pattern.dispose();
      }
    }
    gc.setAdvanced(false);
  }
View Full Code Here

        gc.setBackground(getGroup().getParent().getBackground());
        Pattern p = new Pattern(getGroup().getDisplay(), 0, 0, 0, titleHeight,
                                initialBackColor, 255, getGroup().getBackground(), 0);
        gc.setBackgroundPattern(p);
        gc.fillRectangle(0, 0, getGroup().getSize().x, titleHeight);
        p.dispose();
        gc.setBackgroundPattern(null);
       
        if (getGroup().getExpanded() && getGroup().getSize().x > 1)
        {           
            reg.subtract(1,titleHeight -1,getGroup().getSize().x -2,1);
View Full Code Here

        gc.setBackgroundPattern(pattern);

        gc.fillRectangle(rectangle);

        gc.setBackgroundPattern(null);
        pattern.dispose();

        if (isNotNull(separatorColor)) {
            gc.setForeground(separatorColor);
            gc.drawLine(rectangle.x - 1, rectangle.y, rectangle.x - 1,
                    rectangle.y + rectangle.height);
View Full Code Here

                color2);
        gc.setBackgroundPattern(pattern);
        gc.fillRectangle(bar);

        gc.setBackgroundPattern(originalBackgroundPattern);
        pattern.dispose();

        Color incompleteRegionColor = CellStyleUtil.getCellStyle(cell,
                configRegistry).getAttributeValue(
                PERCENTAGE_BAR_INCOMPLETE_REGION_COLOR);
        if (incompleteRegionColor != null) {
View Full Code Here

    path.close();
    gc.drawPath(path);
    path.dispose();

    if (pattern != null)
      pattern.dispose();
  }

}
View Full Code Here

      pattern = new Pattern(device, background.getBgImage());
      gc.setBackgroundPattern(pattern);
    }
    gc.fillRectangle(0, 0, width, height);
    if (pattern != null)
      pattern.dispose();
  }
}
View Full Code Here

    Pattern pattern = new Pattern(device, rect.x, rect.y, rect.width - 1, rect.height - 1, color1, color2);
    gc.setBackgroundPattern(pattern);
    gc.fillRectangle(rect);
    gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1);
    gc.dispose();
    pattern.dispose();
    return image;
  }

  /**
   * Creates and returns a thumbnail image.
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.