java.lang.Object
com.barteo.emulator.device.swt.SwtDevice
- All Implemented Interfaces:
- com.barteo.emulator.device.Device
- public class SwtDevice
- extends java.lang.Object
- implements com.barteo.emulator.device.Device
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
private com.barteo.emulator.EmulatorContext context
deviceDisplay
private SwtDeviceDisplay deviceDisplay
fontManager
private com.barteo.emulator.device.FontManager fontManager
inputMethod
private SwtInputMethod inputMethod
buttons
private java.util.Vector buttons
softButtons
private java.util.Vector softButtons
normalImage
private org.eclipse.swt.graphics.Image normalImage
overImage
private org.eclipse.swt.graphics.Image overImage
pressedImage
private org.eclipse.swt.graphics.Image pressedImage
SwtDevice
public SwtDevice()
init
public void init(com.barteo.emulator.EmulatorContext context)
init
public void init(com.barteo.emulator.EmulatorContext context,
java.lang.String config)
createImage
public javax.microedition.lcdui.Image createImage(int width,
int height)
- Specified by:
createImage in interface com.barteo.emulator.device.Device
createImage
public javax.microedition.lcdui.Image createImage(java.lang.String name)
throws java.io.IOException
- Specified by:
createImage in interface com.barteo.emulator.device.Device
createImage
public javax.microedition.lcdui.Image createImage(javax.microedition.lcdui.Image source)
- Specified by:
createImage in interface com.barteo.emulator.device.Device
createImage
public javax.microedition.lcdui.Image createImage(byte[] imageData,
int imageOffset,
int imageLength)
- Specified by:
createImage in interface com.barteo.emulator.device.Device
getEmulatorContext
public com.barteo.emulator.EmulatorContext getEmulatorContext()
- Specified by:
getEmulatorContext in interface com.barteo.emulator.device.Device
getDeviceDisplay
public com.barteo.emulator.device.DeviceDisplay getDeviceDisplay()
- Specified by:
getDeviceDisplay in interface com.barteo.emulator.device.Device
getFontManager
public com.barteo.emulator.device.FontManager getFontManager()
- Specified by:
getFontManager in interface com.barteo.emulator.device.Device
getInputMethod
public com.barteo.emulator.device.InputMethod getInputMethod()
- Specified by:
getInputMethod in interface com.barteo.emulator.device.Device
getGameAction
public int getGameAction(int keyCode)
- Specified by:
getGameAction in interface com.barteo.emulator.device.Device
getKeyCode
public int getKeyCode(int gameAction)
- Specified by:
getKeyCode in interface com.barteo.emulator.device.Device
getSoftButtons
public java.util.Vector getSoftButtons()
- Specified by:
getSoftButtons in interface com.barteo.emulator.device.Device
getNormalImage
public org.eclipse.swt.graphics.Image getNormalImage()
getOverImage
public org.eclipse.swt.graphics.Image getOverImage()
getPressedImage
public org.eclipse.swt.graphics.Image getPressedImage()
hasPointerMotionEvents
public boolean hasPointerMotionEvents()
- Specified by:
hasPointerMotionEvents in interface com.barteo.emulator.device.Device
hasPointerEvents
public boolean hasPointerEvents()
- Specified by:
hasPointerEvents in interface com.barteo.emulator.device.Device
hasRepeatEvents
public boolean hasRepeatEvents()
- Specified by:
hasRepeatEvents in interface com.barteo.emulator.device.Device
dispose
public void dispose()
getButtons
public java.util.Vector getButtons()
loadConfig
public void loadConfig(java.lang.String config)
throws java.io.IOException
getElement
private nanoxml.XMLElement getElement(nanoxml.XMLElement source,
java.lang.String name)
getRectangle
private org.eclipse.swt.graphics.Rectangle getRectangle(nanoxml.XMLElement source)
parseBoolean
private boolean parseBoolean(java.lang.String value)
getSystemImage
private org.eclipse.swt.graphics.Image getSystemImage(java.lang.String str)
throws java.io.IOException
getImage
private org.eclipse.swt.graphics.Image getImage(java.lang.String str)
throws java.io.IOException
getImage
private org.eclipse.swt.graphics.Image getImage(java.io.InputStream is)
throws java.io.IOException