/** * Tests if the background image is tiled to cover the entire area of the * form heading. * * @return <code>true</code> if heading background image is tiled, * <code>false</code> otherwise. */ public boolean isBackgroundImageTiled() { return head.isBackgroundImageTiled(); }
/** * Tests if the background image is tiled to cover the entire area of the * form heading. * * @return <code>true</code> if heading background image is tiled, * <code>false</code> otherwise. */ public boolean isBackgroundImageTiled() { return head.isBackgroundImageTiled(); }
@Override public void handleEvent(Event e) { if (gradientInfo != null || (backgroundImage != null && !isBackgroundImageTiled())) updateGradientImage(); } });
public void setHeadingBackgroundImage(Image image) { this.backgroundImage = image; if (image != null) setBackground(null); if (isBackgroundImageTiled()) { setBackgroundImage(image); } else updateGradientImage(); }
public void setHeadingBackgroundImage(Image image) { this.backgroundImage = image; if (image != null) setBackground(null); if (isBackgroundImageTiled()) { setBackgroundImage(image); } else updateGradientImage(); }
private void updateGradientImage() { Rectangle rect = getBounds(); if (gradientImage != null) { FormImages.getInstance().markFinished(gradientImage, getDisplay()); gradientImage = null; } if (gradientInfo != null) { gradientImage = FormImages.getInstance().getGradient(gradientInfo.gradientColors, gradientInfo.percents, gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG), getDisplay()); } else if (backgroundImage != null && !isBackgroundImageTiled()) { gradientImage = new Image(getDisplay(), Math.max(rect.width, 1), Math.max(rect.height, 1)); gradientImage.setBackground(getBackground()); GC gc = new GC(gradientImage); gc.drawImage(backgroundImage, 0, 0); gc.dispose(); } setBackgroundImage(gradientImage); }
private void updateGradientImage() { Rectangle rect = getBounds(); Image oldGradientImage = gradientImage; gradientImage = null; if (gradientInfo != null) { gradientImage = FormImages.getInstance().getGradient(gradientInfo.gradientColors, gradientInfo.percents, gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG), getDisplay()); } else if (backgroundImage != null && !isBackgroundImageTiled()) { gradientImage = new Image(getDisplay(), Math.max(rect.width, 1), Math.max(rect.height, 1)); gradientImage.setBackground(getBackground()); GC gc = new GC(gradientImage); gc.drawImage(backgroundImage, 0, 0); gc.dispose(); } if (oldGradientImage != null) { FormImages.getInstance().markFinished(oldGradientImage, getDisplay()); } setBackgroundImage(gradientImage); }
if (gradientInfo != null || (backgroundImage != null && !isBackgroundImageTiled())) updateGradientImage(); });