@Override public boolean isMouseOver() { if (statusText == null || statusText.isDisposed()) { return false; } return statusText.getDisplay().getCursorControl() == statusText; }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle rect = getDisplay().map(getParent(), null, getBounds()); e.x = rect.x; e.y = rect.y; e.width = rect.width; e.height = rect.height; }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle rect = getDisplay().map(getParent(), null, getBounds()); e.x = rect.x; e.y = rect.y; e.width = rect.width; e.height = rect.height; }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle rect = getDisplay().map(getParent(), null, getBounds()); e.x = rect.x; e.y = rect.y; e.width = rect.width; e.height = rect.height; }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle rect = getDisplay().map(getParent(), null, getBounds()); e.x = rect.x; e.y = rect.y; e.width = rect.width; e.height = rect.height; }
public void getLocation(AccessibleControlEvent e) { Rectangle rect = getDisplay().map(getParent(), null, getBounds()); e.x = rect.x; e.y = rect.y; e.width = rect.width; e.height = rect.height; }
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 ) ); } } }
private void statusMessage(boolean error, String message) { statusLabel.setText(message); if (error) statusLabel.setForeground(JFaceColors.getErrorText(statusLabel .getDisplay())); else statusLabel.setForeground(null); }
private void statusMessage(boolean error, String message) { fStatusLabel.setText(message); if (error) fStatusLabel.setForeground(JFaceColors.getErrorText(fStatusLabel.getDisplay())); else fStatusLabel.setForeground(null); }
private void statusMessage(boolean error, String message) { fStatusLabel.setText(message); if (error) { fStatusLabel.setForeground(JFaceColors.getErrorText(fStatusLabel.getDisplay())); } else { // use same color as another label to respect styling fStatusLabel.setForeground(fFileNamePatternDescription.getForeground()); } }
/** * Updates the message label widget. */ protected void updateMessageLabel() { if (fMessageLabel != null && !fMessageLabel.isDisposed()) { Display display = fMessageLabel.getDisplay(); if ((fErrorText != null && fErrorText.length() > 0) || fErrorImage != null) { fMessageLabel.setForeground(JFaceColors.getErrorText(display)); fMessageLabel.setText(fErrorText); fMessageLabel.setImage(fErrorImage); } else { fMessageLabel.setForeground(getForeground()); fMessageLabel.setText(fMessageText == null ? "" : fMessageText); //$NON-NLS-1$ fMessageLabel.setImage(fMessageImage); } if (copyMenuItem != null && !copyMenuItem.isDisposed()) { String text = fMessageLabel.getText(); copyMenuItem.setEnabled(text != null && text.length() > 0); } } }
/** * Updates the message label widget. */ protected void updateMessageLabel() { if (fMessageLabel != null && !fMessageLabel.isDisposed()) { Display display = fMessageLabel.getDisplay(); if ((fErrorText != null && fErrorText.length() > 0) || fErrorImage != null) { fMessageLabel.setForeground(JFaceColors.getErrorText(display)); fMessageLabel.setText(fErrorText); fMessageLabel.setImage(fErrorImage); } else { fMessageLabel.setForeground(getForeground()); fMessageLabel.setText(fMessageText == null ? "" : fMessageText); //$NON-NLS-1$ fMessageLabel.setImage(fMessageImage); } if (copyMenuItem != null && !copyMenuItem.isDisposed()) { String text = fMessageLabel.getText(); copyMenuItem.setEnabled(text != null && text.length() > 0); } } }
/** * Updates the message label widget. */ protected void updateMessageLabel() { if (fMessageLabel != null && !fMessageLabel.isDisposed()) { Display display = fMessageLabel.getDisplay(); if ((fErrorText != null && fErrorText.length() > 0) || fErrorImage != null) { fMessageLabel.setForeground(JFaceColors.getErrorText(display)); fMessageLabel.setText(fErrorText); fMessageLabel.setImage(fErrorImage); } else { fMessageLabel.setForeground(display .getSystemColor(SWT.COLOR_WIDGET_FOREGROUND)); fMessageLabel.setText(fMessageText == null ? "" : fMessageText); //$NON-NLS-1$ fMessageLabel.setImage(fMessageImage); } // RAP [if] Clipboard // if (copyMenuItem != null && !copyMenuItem.isDisposed()) { // String text = fMessageLabel.getText(); // copyMenuItem.setEnabled(text != null && text.length() > 0); // } } }
/** * Paint the Label's border. */ private void paintBorder(GC gc, Rectangle r) { Display disp= getDisplay(); Color c1 = null; Color c2 = null; int style = getStyle(); if ((style & SWT.SHADOW_IN) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); } if ((style & SWT.SHADOW_OUT) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } if (c1 != null && c2 != null) { gc.setLineWidth(1); drawBevelRect(gc, r.x, r.y, r.width-1, r.height-1, c1, c2); } } /**
/** * Paint the Label's border. */ private void paintBorder(GC gc, Rectangle r) { Display disp= getDisplay(); Color c1 = null; Color c2 = null; int style = getStyle(); if ((style & SWT.SHADOW_IN) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); } if ((style & SWT.SHADOW_OUT) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } if (c1 != null && c2 != null) { gc.setLineWidth(1); drawBevelRect(gc, r.x, r.y, r.width-1, r.height-1, c1, c2); } } /**
/** * Paint the Label's border. */ private void paintBorder(GC gc, Rectangle r) { Display disp= getDisplay(); Color c1 = null; Color c2 = null; int style = getStyle(); if ((style & SWT.SHADOW_IN) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); } if ((style & SWT.SHADOW_OUT) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } if (c1 != null && c2 != null) { gc.setLineWidth(1); drawBevelRect(gc, r.x, r.y, r.width-1, r.height-1, c1, c2); } } /**
/** * Paint the Label's border. */ private void paintBorder(GC gc, Rectangle r) { Display disp= getDisplay(); Color c1 = null; Color c2 = null; int style = getStyle(); if ((style & SWT.SHADOW_IN) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); } if ((style & SWT.SHADOW_OUT) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } if (c1 != null && c2 != null) { gc.setLineWidth(1); drawBevelRect(gc, r.x, r.y, r.width-1, r.height-1, c1, c2); } } /**
/** * Paint the Label's border. */ private void paintBorder(GC gc, Rectangle r) { Display disp= getDisplay(); Color c1 = null; Color c2 = null; int style = getStyle(); if ((style & SWT.SHADOW_IN) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); } if ((style & SWT.SHADOW_OUT) != 0) { c1 = disp.getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW); c2 = disp.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } if (c1 != null && c2 != null) { gc.setLineWidth(1); drawBevelRect(gc, r.x, r.y, r.width-1, r.height-1, c1, c2); } } /**
Display display= fLabel.getDisplay(); if ((fErrorText != null && fErrorText.length() > 0) || fErrorImage != null) { String escapedErrorText= escape(fErrorText);
fMessageLabel.setBackground(JFaceColors.getErrorBackground(fMessageLabel.getDisplay())); fMessageLabel.setImage(fErrorMsgImage); fTitleImage.setImage(null);