public void run() { if (inputMethod != null) { inputMethod.buttonPressed(button, '\0'); } }
public SoftButton createSoftButton(int skinVersion, String name, Rectangle paintable, Image normalImage, Image pressedImage) { return new J2SESoftButton(skinVersion, name, paintable, normalImage, pressedImage); }
public Button createButton(int skinVersion, String name, org.microemu.device.impl.Shape shape, int keyCode, String keyboardKeys, String keyboardChars, Hashtable inputToChars, boolean modeChange) { return new J2SEButton(skinVersion, name, shape, keyCode, keyboardKeys, keyboardChars, inputToChars, modeChange); }
public javax.microedition.lcdui.Graphics getGraphics() { java.awt.Graphics2D g = (java.awt.Graphics2D) img.getGraphics(); g.setClip(0, 0, getWidth(), getHeight()); J2SEDisplayGraphics displayGraphics = new J2SEDisplayGraphics(g, this); displayGraphics.setColor(0x00000000); displayGraphics.translate(-displayGraphics.getTranslateX(), -displayGraphics.getTranslateY()); return displayGraphics; }
/** * * * @return a key code corresponding to this game action * @throws IllegalArgumentException * if <code>gameAction</code> is not a valid game action */ public int getKeyCode(int gameAction) { ButtonName name = ButtonDetaultDeviceKeyCodes.getButtonNameByGameAction(gameAction); return J2SEDeviceButtonsHelper.getButton(name).getKeyCode(); }
public Image createImage(String name) throws IOException { return getImage(name); }
public int stringWidth(String str) { checkInitialized(); return fontMetrics.stringWidth(str); }
public org.microemu.device.impl.Font createSystemFont(String defName, String defStyle, int defSize, boolean antialiasing) { return new J2SESystemFont(defName, defStyle, defSize, antialiasing); }
public MutableImage getScaledDisplayImage(int zoom) { return displayImage.scale(zoom); }
public org.microemu.device.impl.Font createTrueTypeFont(URL defUrl, String defStyle, int defSize, boolean antialiasing) { return new J2SETrueTypeFont(defUrl, defStyle, defSize, antialiasing); }
public Image createImage(int width, int height) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException(); } return new J2SEMutableImage(width, height); }
protected void paintComponent(Graphics g) { if (displayImage != null) { synchronized (displayImage) { g.drawImage(displayImage.getImage(), 0, 0, null); } } }
public int stringWidth(String str) { checkInitialized(); return fontMetrics.stringWidth(str); }
public Image createImage(javax.microedition.lcdui.Image source) { if (source.isMutable()) { return new J2SEImmutableImage((J2SEMutableImage) source); } else { return source; } }
public static void mouseReleased() { if ((task != null) && (task.inputMethod != null)) { task.inputMethod.buttonReleased(task.button, '\0'); stop(); } }
public int stringWidth(Font f, String str) { return getFont(f).stringWidth(str); }
public SoftButton createSoftButton(int skinVersion, String name, Shape shape, int keyCode, String keyboardKeys, Rectangle paintable, String alignmentName, Vector commands, javax.microedition.lcdui.Font font) { return new J2SESoftButton(skinVersion, name, shape, keyCode, keyboardKeys, paintable, alignmentName, commands, font); }
public Image createImage(InputStream is) throws IOException { if (is == null) { throw new IOException(); } return getImage(is); }
public int charsWidth(char[] ch, int offset, int length) { checkInitialized(); return fontMetrics.charsWidth(ch, offset, length); }