private Color getHoverBackground() { if (hoverState == STATE_NORMAL) return null; Color color = getColor(hoverState == STATE_HOVER_FULL ? IFormColors.H_HOVER_FULL : IFormColors.H_HOVER_LIGHT); if (color == null) color = getDisplay() .getSystemColor( hoverState == STATE_HOVER_FULL ? SWT.COLOR_WIDGET_BACKGROUND : SWT.COLOR_WIDGET_LIGHT_SHADOW); return color; }
private Color getHoverBackground() { if (hoverState == STATE_NORMAL) return null; Color color = getColor(hoverState == STATE_HOVER_FULL ? IFormColors.H_HOVER_FULL : IFormColors.H_HOVER_LIGHT); if (color == null) color = getDisplay() .getSystemColor( hoverState == STATE_HOVER_FULL ? SWT.COLOR_WIDGET_BACKGROUND : SWT.COLOR_WIDGET_LIGHT_SHADOW); return color; }
public int getFontHeight() { if (fontHeight == -1) { Font font = getFont(); GC gc = new GC(getDisplay()); gc.setFont(font); FontMetrics fm = gc.getFontMetrics(); fontHeight = fm.getHeight(); gc.dispose(); } return fontHeight; }
public int getFontHeight() { if (fontHeight == -1) { Font font = getFont(); GC gc = new GC(getDisplay()); gc.setFont(font); FontMetrics fm = gc.getFontMetrics(); fontHeight = fm.getHeight(); gc.dispose(); } return fontHeight; }
public int getFontBaselineHeight() { if (fontBaselineHeight == -1) { Font font = getFont(); GC gc = new GC(getDisplay()); gc.setFont(font); FontMetrics fm = gc.getFontMetrics(); fontBaselineHeight = fm.getHeight() - fm.getDescent(); gc.dispose(); } return fontBaselineHeight; }
public int getFontBaselineHeight() { if (fontBaselineHeight == -1) { Font font = getFont(); GC gc = new GC(getDisplay()); gc.setFont(font); FontMetrics fm = gc.getFontMetrics(); fontBaselineHeight = fm.getHeight() - fm.getDescent(); gc.dispose(); } return fontBaselineHeight; }
private void createMenuHyperlink() { menuHyperlink = new MenuHyperlink(this, SWT.NULL); menuHyperlink.setBackground(getColor(FormHeading.COLOR_BASE_BG)); menuHyperlink.setDecorationColor(getForeground()); menuHyperlink.setHoverDecorationColor(getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND)); HoverListener listener = new HoverListener(); menuHyperlink.addMouseTrackListener(listener); menuHyperlink.addMouseMoveListener(listener); if (dragSupport) addDragSupport(menuHyperlink, dragOperations, dragTransferTypes, dragListener); }
private void createMenuHyperlink() { menuHyperlink = new MenuHyperlink(this, SWT.NULL); menuHyperlink.setBackground(getColor(FormHeading.COLOR_BASE_BG)); menuHyperlink.setDecorationColor(getForeground()); menuHyperlink.setHoverDecorationColor(getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND)); HoverListener listener = new HoverListener(); menuHyperlink.addMouseTrackListener(listener); menuHyperlink.addMouseMoveListener(listener); if (dragSupport) addDragSupport(menuHyperlink, dragOperations, dragTransferTypes, dragListener); }