public Dimension getPreferredSize() { Device device = DeviceFactory.getDevice(); if (device == null) { return new Dimension(0, 0); } return new Dimension(device.getDeviceDisplay().getFullWidth(), device.getDeviceDisplay().getFullHeight()); }
Point deviceCoordinate(DeviceDisplay deviceDisplay, Point p) { if (deviceDisplay.isFullScreenMode()) { return p; } else { org.microemu.device.impl.Rectangle pb = ((J2SEDeviceDisplay) deviceDisplay).getDisplayPaintable(); return new Point(p.x - pb.x, p.y - pb.y); } }
if (da != null) { da.sizeChanged(); deviceDisplay.repaint(0, 0, deviceDisplay.getFullWidth(), deviceDisplay.getFullHeight());
public SwtDisplayGraphics(SwtGraphics a_g, MutableImage a_image) { this.g = a_g; this.image = a_image; Device device = DeviceFactory.getDevice(); this.g.setBackground(g.getColor(new RGB( ((SwtDeviceDisplay) device.getDeviceDisplay()).getBackgroundColor().getRed(), ((SwtDeviceDisplay) device.getDeviceDisplay()).getBackgroundColor().getGreen(), ((SwtDeviceDisplay) device.getDeviceDisplay()).getBackgroundColor().getBlue()))); SwtFont tmpFont = (SwtFont) ((SwtFontManager) device.getFontManager()).getFont(currentFont); this.g.setFont(tmpFont.getFont()); if (device.getDeviceDisplay().isColor()) { this.filter = new RGBImageFilter(); } else { if (device.getDeviceDisplay().numColors() == 2) { this.filter = new BWImageFilter(); } else { this.filter = new GrayImageFilter(); } } }
int height; if (((DeviceDisplayImpl) device.getDeviceDisplay()).isResizable()) { width = device.getDeviceDisplay().getFullWidth(); height = device.getDeviceDisplay().getFullHeight(); } else { width = device.getNormalImage().getWidth();
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode(); if (device.hasPointerMotionEvents()) { if (!fullScreenMode) {
resize(device.getDeviceDisplay().getFullWidth(), device.getDeviceDisplay().getFullHeight()); } else { resize(device.getNormalImage().getWidth(), device.getNormalImage().getHeight());
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode();
public void repaintRequest(int x, int y, int width, int height) { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } Displayable current = da.getCurrent(); if (current == null) { return; } Device device = DeviceFactory.getDevice(); if (device != null) { if (displayImage == null) { displayImage = new J2SEMutableImage( device.getDeviceDisplay().getFullWidth(), device.getDeviceDisplay().getFullHeight()); } Graphics gc = displayImage.getImage().getGraphics(); J2SEDeviceDisplay deviceDisplay = (J2SEDeviceDisplay) device.getDeviceDisplay(); if (!deviceDisplay.isFullScreenMode()) { deviceDisplay.paintControls(gc); } deviceDisplay.paintDisplayable(gc, x, y, width, height); fireDisplayRepaint(displayImage); } }
boolean rawSoftKeys = DeviceFactory.getDevice().getDeviceDisplay().isFullScreenMode(); if (button instanceof SoftButton && !rawSoftKeys) { Command cmd = ((SoftButton) button).getCommand();
device.getDeviceDisplay().getFullWidth(), device.getDeviceDisplay().getFullHeight());
boolean rawSoftKeys = DeviceFactory.getDevice().getDeviceDisplay().isFullScreenMode(); SwtButton pressedButton = getButton(ev); if (pressedButton != null) {
if (displayImage == null) { displayImage = new J2SEMutableImage( device.getDeviceDisplay().getFullWidth(), device.getDeviceDisplay().getFullHeight()); displayGraphics = displayImage.getImage().getGraphics();
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode(); if (device.hasPointerEvents()) { if (!fullScreenMode) {
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode();
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode();
org.microemu.device.impl.Rectangle rect = ((SwtDeviceDisplay) device.getDeviceDisplay()).getDisplayRectangle(); SwtInputMethod inputMethod = (SwtInputMethod) device.getInputMethod(); boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode(); if (rect.x <= e.x && (rect.x + rect.width) > e.x && rect.y <= e.y && (rect.y + rect.height) > e.y) {
org.microemu.device.impl.Rectangle rect = ((SwtDeviceDisplay) device.getDeviceDisplay()).getDisplayRectangle(); SwtInputMethod inputMethod = (SwtInputMethod) device.getInputMethod(); boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode(); if (rect.x <= e.x && (rect.x + rect.width) > e.x && rect.y <= e.y && (rect.y + rect.height) > e.y) {