public void mouseReleased(int keyCode) { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } da.keyReleased(keyCode); }
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 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 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 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; } } };
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 void commandAction(Command command) { if (menuList == null) { lateInit(); } previous = MIDletBridge.getMIDletAccess().getDisplayAccess().getCurrent(); MIDletBridge.getMIDletAccess().getDisplayAccess().setCurrent(menuList); }
public void pointerReleased(int x, int y) { if (DeviceFactory.getDevice().hasPointerEvents()) { MIDletBridge.getMIDletAccess().getDisplayAccess().pointerReleased(x, y); } }
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); } }
public int getClipHeight() { Rectangle rect = g.getClipping(); if (rect == null) { DisplayAccess da = MIDletBridge.getMIDletAccess().getDisplayAccess(); return da.getCurrent().getHeight(); } else { return rect.height; } }
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 buttonReleased(J2SEButton button, char keyChar) { int keyCode = keyChar; if (button != null && keyChar == '\0') { keyCode = button.getKeyCode(); } if (DeviceFactory.getDevice().hasRepeatEvents()) { repeatModeKeyCodes.remove(new Integer(keyCode)); keyReleasedDelayTimer.schedule(new KeyReleasedDelayTask(keyCode), 50); } else { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } da.keyReleased(keyCode); eventAlreadyConsumed = false; } }
public void keyReleased(KeyEvent ev) { if (DeviceFactory.getDevice().hasRepeatEvents() && inputMethodListener == null) { clearRepeatFlag = true; keyRepeatTimer.schedule(new KeyRepeatTask(), 50); } else { MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } da.keyReleased(ev.keyCode); } }
private void updateCommands() { CommandManager.getInstance().updateCommands(getCommandsUI()); MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; } da.repaint(); }
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); }
DisplayAccess da = MIDletBridge.getMIDletAccess().getDisplayAccess(); if (da != null) { da.sizeChanged();
return; DisplayAccess da = ma.getDisplayAccess(); if (da == null) { return; ma.getDisplayAccess().paint(new SwtDisplayGraphics(g, getDisplayImage())); g.setFont(oldf); if (!(current instanceof Canvas)
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); } }
public void actionPerformed(ActionEvent ev) { if (resizeDeviceDisplayDialog == null) { resizeDeviceDisplayDialog = new ResizeDeviceDisplayDialog(); } DeviceDisplayImpl deviceDisplay = (DeviceDisplayImpl) DeviceFactory.getDevice().getDeviceDisplay(); resizeDeviceDisplayDialog.setDeviceDisplaySize(deviceDisplay.getFullWidth(), deviceDisplay .getFullHeight()); if (SwingDialogWindow.show(Main.this, "Enter new size...", resizeDeviceDisplayDialog, true)) { deviceDisplay.setDisplayRectangle(new Rectangle(0, 0, resizeDeviceDisplayDialog .getDeviceDisplayWidth(), resizeDeviceDisplayDialog.getDeviceDisplayHeight())); ((SwingDisplayComponent) devicePanel.getDisplayComponent()).init(); MIDletAccess ma = MIDletBridge.getMIDletAccess(); if (ma == null) { return; } DisplayAccess da = ma.getDisplayAccess(); if (da != null) { da.sizeChanged(); deviceDisplay.repaint(0, 0, deviceDisplay.getFullWidth(), deviceDisplay.getFullHeight()); } pack(); } } });