- {
- int fgColorConstant;
- switch(wa.getValue())
- {
- case ONE:
- fgColorConstant = SWT.COLOR_GREEN;
- break;
- case ZERO:
- fgColorConstant = SWT.COLOR_BLUE;
- break;
- case U:
- case X:
- case Z:
- fgColorConstant = SWT.COLOR_RED;
- break;
- default:
- throw new IllegalArgumentException("Unknown enum constant: " + wa.getValue());
- }
- gc.setForeground(gc.getDevice().getSystemColor(fgColorConstant));
- }