menuHyperlink.setVisible(!menuManager.isEmpty() && titleLabel.getVisible()); if (menuHyperlink.getVisible()) msize = menuHyperlink.computeSize(SWT.DEFAULT, SWT.DEFAULT); menuHyperlink.setBounds(xloc, yloc + getFontHeight() / 2 - msize.y / 2, msize.x, msize.y);
menuHyperlink.setVisible(!menuManager.isEmpty() && titleLabel.getVisible()); if (menuHyperlink.getVisible()) msize = menuHyperlink.computeSize(SWT.DEFAULT, SWT.DEFAULT); menuHyperlink.setBounds(xloc, yloc + getFontHeight() / 2 - msize.y / 2, msize.x, msize.y);
public void setHoverState(int state) { if (dragSource == null || this.hoverState == state) return; this.hoverState = state; Color color = getHoverBackground(); titleLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (busyLabel != null) busyLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (menuHyperlink != null) menuHyperlink.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); redraw(); }
public void setHoverState(int state) { if (dragSource == null || this.hoverState == state) return; this.hoverState = state; Color color = getHoverBackground(); titleLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (busyLabel != null) busyLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (menuHyperlink != null) menuHyperlink.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); redraw(); }
public MenuHyperlink(Composite parent, int style) { super(parent, style); setExpanded(true); }
@Override public void setBackground(Color bg) { super.setBackground(bg); titleLabel.setBackground(bg); if (busyLabel != null) busyLabel.setBackground(bg); if (menuHyperlink != null) menuHyperlink.setBackground(bg); }
@Override public void setForeground(Color fg) { super.setForeground(fg); titleLabel.setForeground(fg); if (menuHyperlink != null) menuHyperlink.setForeground(fg); }
@Override public void setBackground(Color bg) { super.setBackground(bg); titleLabel.setBackground(bg); if (busyLabel != null) busyLabel.setBackground(bg); if (menuHyperlink != null) menuHyperlink.setBackground(bg); }
public MenuHyperlink(Composite parent, int style) { super(parent, style); setExpanded(true); }
@Override public void setForeground(Color fg) { super.setForeground(fg); titleLabel.setForeground(fg); if (menuHyperlink != null) menuHyperlink.setForeground(fg); }
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); }