Java Code Examples for org.eclipse.draw2d.ColorConstants#red()

The following examples show how to use org.eclipse.draw2d.ColorConstants#red() . 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: TimelineUsingContentProvider.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Color getForeground(Object element) {
	if ("1200".equals(element.toString()))
		return ColorConstants.red;

	return null;
}
 
Example 2
Source File: DomainStatusLabel.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
protected Color getSeverityColor(Severity severity) {
	if (severity == Severity.ERROR)
		return ColorConstants.red;
	else if (severity == Severity.WARNING)
		return ColorConstants.darkBlue;
	return ColorConstants.darkBlue;
}
 
Example 3
Source File: RepositoryLabelProvider.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
public Color getForeground(final Object element) {
    final IRepository repository = (IRepository) element;
    if (RepositoryManager.getInstance().getCurrentRepository().equals(element)) {
        return ColorConstants.gray;
    } else if (!ProductVersion.sameMinorVersion(repository.getVersion())) {
        return ColorConstants.red;
    }
    return null;
}
 
Example 4
Source File: DefaultTimelineStyleProvider.java    From nebula with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public Border getOverviewSelectionBorder() {
	return new LeftRightBorder(ColorConstants.red);
}
 
Example 5
Source File: DefaultTimelineStyleProvider.java    From nebula with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public Color getSelectedCursorColor() {
	return ColorConstants.red;
}
 
Example 6
Source File: ErrorNode.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected Color getUnselectedBackgroundColor() {
	return ColorConstants.red;
}