private Image loadImage(ClassLoader classLoader, String base, String src) throws IOException { URL url = getResourceUrl(classLoader, base, src); return ((DeviceDisplayImpl) getDeviceDisplay()).createSystemImage(url); }
/** * Create special functional buttons. e.g. ButtonName.DELETE and * ButtonName.BACK_SPACE if not defined in 'device.xml' * * @param name */ J2SEButton(ButtonName functionalName) { this(20002, functionalName.getName(), null, Integer.MIN_VALUE, null, null, null, false); }
/** * @deprecated */ public void init(EmulatorContext context) { super.init(context); }
public int charWidth(Font f, char ch) { return getFont(f).charWidth(ch); }
public int charsWidth(Font f, char[] ch, int offset, int length) { return getFont(f).charsWidth(ch, offset, length); }
public int getBaselinePosition(Font f) { return getFont(f).getBaselinePosition(); }
public int getHeight(Font f) { return getFont(f).getHeight(); }
public int stringWidth(Font f, String str) { return getFont(f).stringWidth(str); }
public Color getForegroundColor() { return new Color(foregroundColor.getRGB()); }
private void drawImageInShape(SwtGraphics g, Image image, org.microemu.device.impl.Shape shape) { org.eclipse.swt.graphics.Rectangle clipSave = g.getClipping(); if (shape instanceof org.microemu.device.impl.Polygon) { // TODO not implemented yet // g.setCliping(region); } org.microemu.device.impl.Rectangle r = shape.getBounds(); g.drawImage(image, r.x, r.y, r.width, r.height, r.x, r.y, r.width, r.height); g.setClipping(clipSave); }
public void setBackgroundColor(Color color) { backgroundColor = new java.awt.Color(color.getRGB()); }
/** * @deprecated */ public void init(EmulatorContext context, String config) { super.init(context, config); }
public int charWidth(Font f, char ch) { return getFont(f).charWidth(ch); }
public int charsWidth(Font f, char[] ch, int offset, int length) { return getFont(f).charsWidth(ch, offset, length); }
public int getBaselinePosition(Font f) { return getFont(f).getBaselinePosition(); }
public int getHeight(Font f) { return getFont(f).getHeight(); }
public int stringWidth(Font f, String str) { return getFont(f).stringWidth(str); }
public Color getBackgroundColor() { return new Color(backgroundColor.getRGB()); }
public void setForegroundColor(Color color) { foregroundColor = new java.awt.Color(color.getRGB()); }
/** * @deprecated use Device.create(EmulatorContext context, ClassLoader * classLoader, String descriptorLocation); */ public void init(EmulatorContext context) { init(context, DEFAULT_LOCATION); }