本文整理汇总了Java中org.microemu.device.ui.CanvasUI类的典型用法代码示例。如果您正苦于以下问题:Java CanvasUI类的具体用法?Java CanvasUI怎么用?Java CanvasUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CanvasUI类属于org.microemu.device.ui包,在下文中一共展示了CanvasUI类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCanvasUI
import org.microemu.device.ui.CanvasUI; //导入依赖的package包/类
public CanvasUI createCanvasUI(Canvas canvas) {
return new AndroidCanvasUI(activity, canvas);
}
示例2: createCanvasUI
import org.microemu.device.ui.CanvasUI; //导入依赖的package包/类
public CanvasUI createCanvasUI(Canvas canvas) {
return new SwtCanvasUI(canvas);
}
示例3: createCanvasUI
import org.microemu.device.ui.CanvasUI; //导入依赖的package包/类
public CanvasUI createCanvasUI(Canvas canvas) {
return new J2SECanvasUI(canvas);
}
示例4: paintDisplayable
import org.microemu.device.ui.CanvasUI; //导入依赖的package包/类
public void paintDisplayable(int x, int y, int width, int height) {
MIDletAccess ma = MIDletBridge.getMIDletAccess();
if (ma == null) {
return;
}
DisplayAccess da = ma.getDisplayAccess();
if (da == null) {
return;
}
DisplayableUI current = da.getCurrentUI();
if (current == null) {
return;
}
// TODO
// g.save(android.graphics.Canvas.CLIP_SAVE_FLAG);
// TODO
// if (!(current instanceof Canvas) || ((Canvas) current).getWidth() != displayRectangle.width
// || ((Canvas) current).getHeight() != displayRectangle.height) {
// g.translate(displayPaintable.x, displayPaintable.y);
// }
// TODO
// Font oldf = g.getFont();
if (current instanceof CanvasUI) {
Device device = DeviceFactory.getDevice();
// TODO take region size into account
if (device != null) {
synchronized (current) {
Image displayImage = ((AndroidCanvasUI) current).getImage();
synchronized (displayImage) {
Graphics canvas = displayImage.getGraphics();
canvas.clipRect(x, y, x + width, y + height);
ma.getDisplayAccess().paint(canvas);
// TODO
// if (!deviceDisplay.isFullScreenMode()) {
// deviceDisplay.paintControls(canvas);
// }
}
}
}
View view = ((AndroidCanvasUI) current).getView();
view.postInvalidate();
} else {
// TODO extend DisplayableUI interface
//current.paint();
}
// TODO
// g.setFont(oldf);
// TODO
// if (!(current instanceof Canvas) || ((Canvas) current).getWidth() != displayRectangle.width
// || ((Canvas) current).getHeight() != displayRectangle.height) {
// g.translate(-displayPaintable.x, -displayPaintable.y);
//}
// TODO
// g.restore();
}