com.google.gwt.canvas.dom.client.CssColor Java Examples

The following examples show how to use com.google.gwt.canvas.dom.client.CssColor. 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: DiagramController.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Connection drawStraightArrowConnection(Widget startWidget, Widget endWidget, GUITransition transition) {
	Connection c = drawConnection(ConnectionFactory.ARROW, startWidget, endWidget);
	if (transition.getColor() != null)
		((AbstractConnection) c).connectionColor = CssColor.make(transition.getColor());

	functionsMap.get(startWidget).put(endWidget, c);
	StateWidget widget = new StateWidget(c, this, transition);
	addDecoration(widget, c);
	return c;
}
 
Example #2
Source File: GraphicsContext.java    From openchemlib-js with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private CssColor createColor(long color) {
    return CssColor.make((int) ((color & 0xFF000000l) >> 24), (int) ((color & 0x00FF0000l) >> 16),
            (int) ((color & 0x0000FF00l) >> 8));
}
 
Example #3
Source File: GWTDepictor.java    From openchemlib-js with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
ColorMap(int m, CssColor c) {
    molcol = m;
    color = c;
}
 
Example #4
Source File: GWTDepictor.java    From openchemlib-js with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
protected void setColor(Color theColor) {
    currentColor = CssColor.make(theColor.getRed(), theColor.getGreen(), theColor.getBlue());
}
 
Example #5
Source File: MoleculeDrawDepictor.java    From openchemlib-js with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void setFragmentNoColor(long color) {
  CssColor c = CssColor.make((int) (color >> 24 & 0xFF), (int) (color >> 16 & 0xFF), (int) (color >> 8 & 0xFF));
}