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

The following examples show how to use org.eclipse.draw2d.ColorConstants#white() . 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: CustomTextAnnotation2EditPart.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
public void paintGradient(Graphics graphics) {                     
 Rectangle rect = getClientArea();
 if (rect == null)
	 return;

 graphics.pushState();
 Color from = ColorConstants.white;
 Color to = getBackgroundColor();

 graphics.setForegroundColor(from);
 graphics.setBackgroundColor(to);

 graphics.fillGradient(rect, false);

 graphics.popState();
 //now drawing the outline shape
 super.outlineShape(graphics);
}
 
Example 2
Source File: WalkerNoteFigure.java    From erflute with Apache License 2.0 5 votes vote down vote up
private void decideColor(int[] color) {
    if (color != null) {
        final int sum = color[0] + color[1] + color[2];
        if (sum > 255) {
            this.foregroundColor = ColorConstants.black;
        } else {
            this.foregroundColor = ColorConstants.white;
        }
    }
}
 
Example 3
Source File: NoteFigure.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
private void decideColor(int[] color) {
	if (color != null) {
		int sum = color[0] + color[1] + color[2];

		if (sum > 255) {
			this.foregroundColor = ColorConstants.black;
		} else {
			this.foregroundColor = ColorConstants.white;
		}
	}
}
 
Example 4
Source File: TableFigure.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
private void decideColor(int[] color) {
	if (color != null) {
		int sum = color[0] + color[1] + color[2];

		if (sum > 255) {
			this.foregroundColor = ColorConstants.black;
		} else {
			this.foregroundColor = ColorConstants.white;
		}
	}
}
 
Example 5
Source File: ModelPropertiesFigure.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
private void decideColor(int[] color) {
	if (color != null) {
		int sum = color[0] + color[1] + color[2];

		if (sum > 255) {
			this.foregroundColor = ColorConstants.black;
		} else {
			this.foregroundColor = ColorConstants.white;
		}
	}
}
 
Example 6
Source File: TableFigure.java    From erflute with Apache License 2.0 5 votes vote down vote up
private void decideColor(int[] color) {
    if (color != null) {
        final int sum = color[0] + color[1] + color[2];
        if (sum > 255) {
            this.foregroundColor = ColorConstants.black;
        } else {
            this.foregroundColor = ColorConstants.white;
        }
    }
}
 
Example 7
Source File: ModelPropertiesFigure.java    From erflute with Apache License 2.0 5 votes vote down vote up
private void decideColor(int[] color) {
    if (color != null) {
        final int sum = color[0] + color[1] + color[2];
        if (sum > 255) {
            this.foregroundColor = ColorConstants.black;
        } else {
            this.foregroundColor = ColorConstants.white;
        }
    }
}
 
Example 8
Source File: NoteFigure.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
private void decideColor(final int[] color) {
    if (color != null) {
        final int sum = color[0] + color[1] + color[2];

        if (sum > 255) {
            foregroundColor = ColorConstants.black;
        } else {
            foregroundColor = ColorConstants.white;
        }
    }
}
 
Example 9
Source File: TableFigure.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
private void decideColor(final int[] color) {
    if (color != null) {
        final int sum = color[0] + color[1] + color[2];

        if (sum > 255) {
            foregroundColor = ColorConstants.black;
        } else {
            foregroundColor = ColorConstants.white;
        }
    }
}
 
Example 10
Source File: ModelPropertiesFigure.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
private void decideColor(final int[] color) {
    if (color != null) {
        final int sum = color[0] + color[1] + color[2];

        if (sum > 255) {
            foregroundColor = ColorConstants.black;
        } else {
            foregroundColor = ColorConstants.white;
        }
    }
}
 
Example 11
Source File: ERDiagramResizeHandle.java    From erflute with Apache License 2.0 4 votes vote down vote up
@Override
protected Color getFillColor() {
    return ColorConstants.white;
}
 
Example 12
Source File: DefaultTimelineStyleProvider.java    From nebula with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public Color getOverviewSelectionBackgroundColor() {
	return ColorConstants.white;
}
 
Example 13
Source File: ReportResizeHandle.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected Color getBorderColor( )
{
	return ( isPrimary( ) ) ? ColorConstants.white
			: ReportColorConstants.SelctionFillColor;
}
 
Example 14
Source File: ReportResizeHandle.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected Color getFillColor( )
{
	return ( isPrimary( ) ) ? ReportColorConstants.SelctionFillColor
			: ColorConstants.white;
}
 
Example 15
Source File: ERDiagramResizeHandle.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected Color getFillColor() {
	return ColorConstants.white;
}
 
Example 16
Source File: ERDiagramResizeHandle.java    From ermasterr with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected Color getFillColor() {
    return ColorConstants.white;
}
 
Example 17
Source File: CustomResizeHandle.java    From bonita-studio with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the color for the inside of the handle.
 * 
 * @return the color of the handle
 */
protected Color getFillColor() {
	return ColorConstants.white;
}