/** * Sets the receiver's foreground color to the color specified by the argument, or to the default * system color for the control if the argument is null. * * <p>Note: This operation is a hint and may be overridden by the platform. * * @param color the new color (or null) * @exception IllegalArgumentException * <ul> * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed * </ul> * * @exception SWTException * <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver * </ul> */ @Override public void setForeground(Color color) { foreground = color; super.setForeground(getForeground()); redraw(); }