Java Code Examples for org.eclipse.swt.SWT#COLOR_BLACK
The following examples show how to use
org.eclipse.swt.SWT#COLOR_BLACK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdapterFactory.java From tlaplus with MIT License | 6 votes |
/** * Converts parse status to a foreground color for display in the status contribution item * @param spec specification holding the parse status * @return SWT color constant */ public static int getStatusAsSWTFGColor(Spec spec) { if (spec != null) { switch (spec.getStatus()) { case IParseConstants.PARSED: return SWT.COLOR_BLACK; case IParseConstants.COULD_NOT_FIND_MODULE: case IParseConstants.SEMANTIC_WARNING: case IParseConstants.SEMANTIC_ERROR: case IParseConstants.SYNTAX_ERROR: case IParseConstants.UNKNOWN_ERROR: return SWT.COLOR_WHITE; case IParseConstants.UNPARSED: return SWT.COLOR_BLACK; case IParseConstants.UNKNOWN: default: return SWT.COLOR_BLACK; } } else { return SWT.COLOR_BLACK; } }
Example 2
Source File: Console.java From cppcheclipse with Apache License 2.0 | 6 votes |
public OutputStream getConsoleOutputStream(boolean isError) { final MessageConsoleStream output = messageConsole.newMessageStream(); output.setActivateOnWrite(false); final int colorId; if (!isError) { colorId = SWT.COLOR_BLACK; } else { colorId = SWT.COLOR_RED; } /* we must set the color in the UI thread */ Runnable runnable = new Runnable() { public void run() { org.eclipse.swt.graphics.Color color = Display.getCurrent() .getSystemColor(colorId); output.setColor(color); } }; Display.getDefault().syncExec(runnable); return output; }
Example 3
Source File: XpectConsole.java From n4js with Eclipse Public License 1.0 | 5 votes |
private MessageConsoleStream getNewMessageConsoleStream(int msgKind) { int swtColorId = SWT.COLOR_BLACK; switch (msgKind) { case MSG_LOG: swtColorId = SWT.COLOR_BLACK; break; case MSG_INFORMATION: swtColorId = SWT.COLOR_DARK_GRAY; break; case MSG_ERROR: swtColorId = SWT.COLOR_DARK_MAGENTA; break; case MSG_WARNING: swtColorId = SWT.COLOR_DARK_YELLOW; break; case MSG_SUCCESS: swtColorId = SWT.COLOR_DARK_GREEN; break; default: swtColorId = SWT.COLOR_BLACK; break; } MessageConsoleStream msgConsoleStream = messageConsole.newMessageStream(); msgConsoleStream.setColor(Display.getCurrent().getSystemColor(swtColorId)); return msgConsoleStream; }
Example 4
Source File: EpfOutputDialog.java From workspacemechanic with Eclipse Public License 1.0 | 5 votes |
public Color getForeground(Object element, int columnIndex) { String key = (String) element; int systemTextColor; if (columnIndex == 1 && preferences.get(key) == null) { systemTextColor = SWT.COLOR_DARK_GRAY; } else { systemTextColor = SWT.COLOR_BLACK; } return getShell().getDisplay().getSystemColor(systemTextColor); }
Example 5
Source File: ControllableShape.java From gef with Eclipse Public License 2.0 | 5 votes |
public ControllableShape() { controlPoints = new ArrayList<>(); shapeColor = SWT.COLOR_BLACK; controlColor = SWT.COLOR_BLUE; controlRadius = 5; active = true; }