本文整理汇总了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);
}
}
}
示例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);
}
}
}
示例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();
}
示例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));
}
示例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");
}
示例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);
}
示例7: cssColor
import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
static CssColor cssColor(int color) {
return CssColor.make(cssColorString(color));
}
示例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);
}
示例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 + ")");
}
示例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());
}
示例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));
}
示例12: getRandomColor
import com.google.gwt.canvas.dom.client.CssColor; //导入方法依赖的package包/类
private CssColor getRandomColor() {
return CssColor.make(rnd(255), rnd(255), rnd(255));
}