/** * * @param updateWindow */ @Override public void setUpdateNeeded(UpdateWindow updateWindow) { this.updateWindow = updateWindow; if (updateWindow != null) { statusText.setCursor(display.getSystemCursor(SWT.CURSOR_HAND)); statusText.setForeground(Colors.colorWarning); updateStatusText(); } else { statusText.setCursor(null); statusText.setForeground(null); updateStatusText(); } }
void handleSetSelection ( final boolean selected ) { if ( selected ) { this.item.setBackground ( this.item.getDisplay ().getSystemColor ( SWT.COLOR_LIST_SELECTION ) ); this.item.setForeground ( this.item.getDisplay ().getSystemColor ( SWT.COLOR_LIST_SELECTION_TEXT ) ); this.item.setCursor ( null ); } else { this.item.setBackground ( (Color)null ); this.item.setForeground ( null ); this.item.setCursor ( this.item.getDisplay ().getSystemCursor ( SWT.CURSOR_HAND ) ); } } }
public static CLabel createLink(final Composite parent, final String text, final String tooltip, final Image image, final boolean blueColor, final MouseListener listener) { final CLabel link = new CLabel(parent, SWT.NONE); link.setText(text); if (tooltip != null) { link.setToolTipText(tooltip); } if (blueColor) { link.setForeground(createColor(SWT.COLOR_BLUE)); } link.setImage(image); link.addMouseListener(listener); link.setCursor(new Cursor(parent.getDisplay(), SWT.CURSOR_HAND)); if (blueColor) { link.addMouseTrackListener(new MouseTrackAdapter() { @Override public void mouseExit(final MouseEvent event) { link.setForeground(createColor(SWT.COLOR_BLUE)); } @Override public void mouseEnter(final MouseEvent event) { link.setForeground(createColor(SWT.COLOR_DARK_BLUE)); } }); } return link; }
linkLabel.setCursor(display.getSystemCursor(SWT.CURSOR_HAND)); linkLabel.setForeground(Colors.blue); gridData = new GridData(GridData.FILL_HORIZONTAL);