public Button createButton(String name, Shape shape, int keyCode, String keyName, Hashtable inputToChars) { return new SwtButton(name, shape, keyCode, keyName, inputToChars); }
public Image createImage(String name) throws IOException { return getImage(name); }
public javax.microedition.lcdui.Graphics getGraphics() { SwtDisplayGraphics displayGraphics = new SwtDisplayGraphics(new SwtGraphics(gc), this); displayGraphics.setColor(0x00000000); displayGraphics.setClip(0, 0, getWidth(), getHeight()); displayGraphics.translate(-displayGraphics.getTranslateX(), -displayGraphics.getTranslateY()); return displayGraphics; }
private Image getImage(InputStream is) throws IOException { ImageFilter filter = null; if (isColor()) { filter = new RGBImageFilter(); } else { if (numColors() == 2) { filter = new BWImageFilter(); } else { filter = new GrayImageFilter(); } } return new SwtImmutableImage(SwtDeviceComponent.createImage(is, filter)); }
public SoftButton createSoftButton(String name, Rectangle paintable, Image normalImage, Image pressedImage) { return new SwtSoftButton(name, paintable, normalImage, pressedImage); }
public Font getFont() { checkInitialized(); return font; }
public org.microemu.device.impl.Font createSystemFont(String defName, String defStyle, int defSize, boolean antialiasing) { return new SwtSystemFont(defName, defStyle, defSize, antialiasing); }
public int charWidth(char ch) { return charsWidth(new char[] {ch}, 0, 1); }
public Font getFont() { checkInitialized(); return font; }
public org.microemu.device.impl.Font createTrueTypeFont(URL defUrl, String defStyle, int defSize, boolean antialiasing) { return new SwtTrueTypeFont(defUrl, defStyle, defSize, antialiasing); }
public Image createImage(int width, int height) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException(); } return new SwtMutableImage(width, height); }
public boolean isChar(char c, int inputMode) { c = Character.toLowerCase(c); char[] chars = getChars(inputMode); if (chars != null) { for (int i = 0; i < chars.length; i++) { if (c == Character.toLowerCase(chars[i])) { return true; } } } return false; }
public Image createImage(javax.microedition.lcdui.Image source) { if (source.isMutable()) { return new SwtImmutableImage((SwtMutableImage) source); } else { return source; } }
public SwtImmutableImage(SwtMutableImage image) { img = SwtDeviceComponent.createImage(image.getImage()); }
public int stringWidth(Font f, String str) { return getFont(f).stringWidth(str); }
public Image createImage(InputStream is) throws IOException { if (is == null) { throw new IOException(); } return getImage(is); }
public SoftButton createSoftButton(String name, Shape shape, int keyCode, String keyName, Rectangle paintable, String alignmentName, Vector commands, javax.microedition.lcdui.Font font) { return new SwtSoftButton(name, shape, keyCode, keyName, paintable, alignmentName, commands, font); }
public int stringWidth(String str) { checkInitialized(); return SwtDeviceComponent.stringWidth(font, str); }