当前位置: 首页>>代码示例>>Java>>正文


Java CssColor.make方法代码示例

本文整理汇总了Java中com.google.gwt.canvas.dom.client.CssColor.make方法的典型用法代码示例。如果您正苦于以下问题:Java CssColor.make方法的具体用法?Java CssColor.make怎么用?Java CssColor.make使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.canvas.dom.client.CssColor的用法示例。


在下文中一共展示了CssColor.make方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawZoom

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
public void drawZoom() {
	if (mouseDown) {
		CssColor fillcolor = CssColor.make("rgba(" + 0 + ", " + 0 + "," + 0
				+ ", " + 0.0 + ")");
		CssColor drawcolor = CssColor.make("rgba(" + 255 + ", " + 0 + ","
				+ 0 + ", " + 1 + ")");

		context.setFillStyle(fillcolor);
		context.setStrokeStyle(drawcolor);

		if (currentx == -1) {
			context.strokeRect(startx, starty, 2, 2);
		} else {
			int width = currentx - startx;
			int height = currenty - starty;

			context.strokeRect(startx, starty, width, height);

			classLogger.log(Level.INFO, "Zoom rect: x: " + startx + ", y: "
					+ starty + ", width: " + width + ", height: " + height);
		}
	}
}
 
开发者ID:metafora-project,项目名称:ReflectionTool,代码行数:24,代码来源:ReflectionToolHtml.java

示例2: clearZoom

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
public void clearZoom() {
	if (mouseDown) {
		CssColor color = CssColor.make("rgba(" + 255 + ", " + 255 + ","
				+ 255 + ", " + 1 + ")");

		context.setFillStyle(color);
		context.setStrokeStyle(color);

		if (currentx == -1) {
			context.strokeRect(startx, starty, 2, 2);
		} else {
			int width = currentx - startx;
			int height = currenty - starty;

			context.strokeRect(startx, starty, width, height);

			classLogger.log(Level.INFO, "Zoom rect: x: " + startx + ", y: "
					+ starty + ", width: " + width + ", height: " + height);
		}
	}
}
 
开发者ID:metafora-project,项目名称:ReflectionTool,代码行数:22,代码来源:ReflectionToolHtml.java

示例3: Timeline

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
public Timeline(Canvas canvas, ScrollPanel scroll, LayoutPanel viewPanel) {
	logger.setLevel(Level.INFO);

	this.canvas = canvas;
	this.scroll = scroll;
	this.viewPanel = viewPanel;

	landmarks = new Vector<Landmark>();
	landmarkbars = new Vector<LandmarkBar>();

	startTime = new Date();
	currentTime = new Date();

	lenghtOfAMinute = 1000;

	color = CssColor.make("rgba(" + 0 + ", " + 0 + "," + 255 + ", " + 1
			+ ")");

	canvas.setWidth(minWidth + "px");
	canvas.setCoordinateSpaceWidth(minWidth);

	canvas.setHeight(minHeight + "px");
	canvas.setCoordinateSpaceHeight(minHeight);

	timer = new Timer() {
		@Override
		public void run() {
			updateTime();
			drawTimeline();
		}
	};
	timer.scheduleRepeating(5000);

	updateTime();
	drawTimeline();
}
 
开发者ID:metafora-project,项目名称:ReflectionTool,代码行数:37,代码来源:Timeline.java

示例4: createColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
private CssColor createColor(long color)
{
    return CssColor.make(
            (int) ((color & 0xFF000000l) >> 24),
            (int) ((color & 0x00FF0000l) >> 16),
            (int) ((color & 0x0000FF00l) >> 8));
}
 
开发者ID:cheminfo,项目名称:openchemlib-js,代码行数:8,代码来源:GraphicsContext.java

示例5: computeBgFgColors

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
private void computeBgFgColors() {
  int r = rnd(255);
  int g = rnd(255);
  int b = rnd(255);
  bg = CssColor.make(r, g, b);
  double i = (r << 16 | g << 8 | b);
  fg = CssColor.make((0xffffff / 2) < i ? "#111111" : "#ffffff");
}
 
开发者ID:manolo,项目名称:gwt-captcha,代码行数:9,代码来源:Captcha.java

示例6: setColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
public void setColor(String color)
{
	m_fillStyle = CssColor.make(color);
	
	Context2d stageContext = m_stagingCanvas.getContext2d();
	stageContext.setFillStyle(m_fillStyle);
}
 
开发者ID:dougkoellmer,项目名称:swarm,代码行数:8,代码来源:CanvasBacking.java

示例7: cssColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
static CssColor cssColor(int color) {
  return CssColor.make(cssColorString(color));
}
 
开发者ID:fredsa,项目名称:forplay,代码行数:4,代码来源:FlashGraphics.java

示例8: makeColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
public static CssColor makeColor(String c)  {
    if (GwtUtil.isHexColor(c))  {
        c= "#" + c;
    }
    return CssColor.make(c);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:7,代码来源:HtmlGwtCanvas.java

示例9: convert

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
public static CssColor convert(ColorOwn in) {
	if (in == null) {
		return null;
	}
	return CssColor.make("rgba(" + in.getRed() + ", " + in.getGreen() + "," + in.getBlue() + ", " + in.getAlpha() / 255.0 + ")");
}
 
开发者ID:umlet,项目名称:umlet,代码行数:7,代码来源:Converter.java

示例10: setColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
@Override
protected void setColor(Color theColor)
{
    currentColor = CssColor.make(theColor.getRed(), theColor.getGreen(), theColor.getBlue());
}
 
开发者ID:cheminfo,项目名称:openchemlib-js,代码行数:6,代码来源:GWTDepictor.java

示例11: setFragmentNoColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
@Override
public void setFragmentNoColor(long color) {
    CssColor c = CssColor.make((int)(color >> 24 & 0xFF),(int)(color >> 16 & 0xFF),(int)(color >> 8 & 0xFF));
}
 
开发者ID:cheminfo,项目名称:openchemlib-js,代码行数:5,代码来源:MoleculeDrawDepictor.java

示例12: getRandomColor

import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
private CssColor getRandomColor() {
  return CssColor.make(rnd(255), rnd(255), rnd(255));
}
 
开发者ID:manolo,项目名称:gwt-captcha,代码行数:4,代码来源:Captcha.java


注:本文中的com.google.gwt.canvas.dom.client.CssColor.make方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。