/** * Returns the title bar gradient background color when TITLE_BAR style is * used. * * @return the title bar gradient background */ public Color getTitleBarGradientBackground() { if (titleColors == null) return null; if ((getExpansionStyle() & SHORT_TITLE_BAR) != 0) return getBackground(); return titleColors.get(COLOR_GBG); }
buffer.setBackground(getBackground()); gc = new GC(buffer); bg = getBackground(); if (fg == null) fg = getForeground(); if (getBackgroundImage() == null) updateHeaderImage(bg, bounds, gradientheight, theight); gc.setBackground(getBackground()); gc.fillRectangle(bounds.x, bounds.y, bounds.width, bounds.height); drawBackground(gc, bounds.x, bounds.y, bounds.width, theight - 2); if (marginWidth > 0) { gc.setBackground(getBackground()); gc.fillRectangle(0, 0, marginWidth, theight); gc.fillRectangle(bounds.x + bounds.width - marginWidth, 0, gc.setBackground(getBackground()); gc.fillGradientRectangle(marginWidth, marginHeight, bounds.width - marginWidth - marginWidth, theight, true); gc.setBackground(getBackground()); FormUtil.setAntialias(gc, SWT.ON); gc.setForeground(getBackground()); gc.drawPolyline(new int[] { marginWidth + 1, marginHeight + gradientheight + 4, marginWidth + 1, marginHeight + 2, marginWidth + 2, marginHeight + 2, marginWidth + 2, marginHeight + 1,
buffer.setBackground(getBackground()); gc = new GC(buffer); bg = getBackground(); if (fg == null) fg = getForeground(); if (getBackgroundImage() == null) updateHeaderImage(bg, bounds, gradientheight, theight); gc.setBackground(getBackground()); gc.fillRectangle(bounds.x, bounds.y, bounds.width, bounds.height); drawBackground(gc, bounds.x, bounds.y, bounds.width, theight - 2); if (marginWidth > 0) { gc.setBackground(getBackground()); gc.fillRectangle(0, 0, marginWidth, theight); gc.fillRectangle(bounds.x + bounds.width - marginWidth, 0, gc.setBackground(getBackground()); gc.fillGradientRectangle(marginWidth, marginHeight, bounds.width - marginWidth - marginWidth, theight, true); gc.setBackground(getBackground()); FormUtil.setAntialias(gc, SWT.ON); gc.setForeground(getBackground()); gc.drawPolyline(new int[] { marginWidth + 1, marginHeight + gradientheight + 4, marginWidth + 1, marginHeight + 2, marginWidth + 2, marginHeight + 2, marginWidth + 2, marginHeight + 1,
/** * Returns the title bar gradient background color when TITLE_BAR style is * used. * * @return the title bar gradient background */ public Color getTitleBarGradientBackground() { if (titleColors == null) return null; if ((getExpansionStyle() & SHORT_TITLE_BAR) != 0) return getBackground(); return titleColors.get(COLOR_GBG); }
private void updateHeaderImage(Color bg, Rectangle bounds, int theight, int realtheight) { Color gradient = getTitleBarGradientBackground() != null ? getTitleBarGradientBackground() : getBackground(); Image image = FormImages.getInstance().getSectionGradientImage(gradient, bg, realtheight, theight, marginHeight, getDisplay()); super.setBackgroundImage(image); }
private void updateHeaderImage(Color bg, Rectangle bounds, int theight, int realtheight) { Color gradient = getTitleBarGradientBackground() != null ? getTitleBarGradientBackground() : getBackground(); Image image = FormImages.getInstance().getSectionGradientImage(gradient, bg, realtheight, theight, marginHeight, getDisplay()); super.setBackgroundImage(image); }