public int getClipHeight() { Rectangle rect = g.getClipping(); if (rect == null) { DisplayAccess da = MIDletBridge.getMIDletAccess().getDisplayAccess(); return da.getCurrent().getHeight(); } else { return rect.height; } }
public void commandAction(Command c, Displayable d) { if (menuList == null) { lateInit(); } MIDletBridge.getMIDletAccess().getDisplayAccess().setCurrent(previous); if ((c == CMD_SELECT) || c == List.SELECT_COMMAND) { MIDletBridge.getMIDletAccess().getDisplayAccess().commandAction( (Command) menuCommands.elementAt(menuList.getSelectedIndex()), previous); } } };
public boolean isFullScreenMode() { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return false; } else { DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return false; } else { return da.isFullScreenMode(); } } }
public void commandAction(Command command) { if (menuList == null) { lateInit(); } previous = MIDletBridge.getMIDletAccess().getDisplayAccess().getCurrent(); MIDletBridge.getMIDletAccess().getDisplayAccess().setCurrent(menuList); }
return; da.keyRepeated(keyCode); eventAlreadyConsumed = true; return; CommandManager.getInstance().commandAction(cmd); } else { da.commandAction(cmd, da.getCurrent());
return; Displayable d = da.getCurrent(); Command cmd = initialPressedSoftButton.getCommand(); if (cmd != null) { CommandManager.getInstance().commandAction(cmd); } else { da.commandAction(cmd, d); da.keyPressed(getButtonByButtonName(ButtonName.UP).getKeyCode()); } else if (initialPressedSoftButton.getName().equals("down")) { da.keyPressed(getButtonByButtonName(ButtonName.DOWN).getKeyCode());
public void paintDisplayable(Graphics g, 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; } g.setColor(foregroundColor); java.awt.Shape oldclip = g.getClip(); if (!(current instanceof Canvas) || ((Canvas) current).getWidth() != displayRectangle.width || ((Canvas) current).getHeight() != displayRectangle.height) { g.translate(displayPaintable.x, displayPaintable.y); } g.setClip(x, y, width, height); Font oldf = g.getFont(); ma.getDisplayAccess().paint(new J2SEDisplayGraphics((java.awt.Graphics2D) g, getDisplayImage())); g.setFont(oldf); if (!(current instanceof Canvas) || ((Canvas) current).getWidth() != displayRectangle.width || ((Canvas) current).getHeight() != displayRectangle.height) { g.translate(-displayPaintable.x, -displayPaintable.y); } g.setClip(oldclip); }
CommandManager.getInstance().commandAction(cmd); } else { da.commandAction(cmd, da.getCurrent());
public void mouseReleased(int keyCode) { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } da.keyReleased(keyCode); }
da.keyPressed(keyCode); return true; da.keyPressed(button.getKeyCode()); return true;
da.keyRepeated(ev.keyCode);
public void pointerDragged(int x, int y) { if (DeviceFactory.getDevice().hasPointerMotionEvents()) { MIDletBridge.getMIDletAccess().getDisplayAccess().pointerDragged(x, y); } }
public void pointerPressed(int x, int y) { if (DeviceFactory.getDevice().hasPointerEvents()) { MIDletBridge.getMIDletAccess().getDisplayAccess().pointerPressed(x, y); } }
return; Displayable current = da.getCurrent(); if (current == null) { return; ma.getDisplayAccess().paint(new SwtDisplayGraphics(g, getDisplayImage())); g.setFont(oldf); if (!(current instanceof Canvas)
public void run() { if (repeatModeKeyCode != Integer.MIN_VALUE) { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } da.keyReleased(repeatModeKeyCode); eventAlreadyConsumed = false; repeatModeKeyCode = Integer.MIN_VALUE; } } };
midpKeyCode = keyCode; MIDletBridge.getMIDletAccess().getDisplayAccess().keyPressed(midpKeyCode); return true; MIDletBridge.getMIDletAccess().getDisplayAccess().keyPressed(keyCode); return true;
public int getClipWidth() { Rectangle rect = g.getClipping(); if (rect == null) { DisplayAccess da = MIDletBridge.getMIDletAccess().getDisplayAccess(); return da.getCurrent().getWidth(); } else { return rect.width; } }
public void run() { if (repeatModeKeyCode != Integer.MIN_VALUE) { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } if (clearRepeatFlag) { da.keyReleased(repeatModeKeyCode); repeatModeKeyCode = Integer.MIN_VALUE; } } } };
public boolean isFullScreenMode() { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return false; } else { DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return false; } else { return da.isFullScreenMode(); } } }
return; Displayable current = da.getCurrent(); if (current == null) { return;