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 commandAction(Command command) { if (menuList == null) { lateInit(); } previous = MIDletBridge.getMIDletAccess().getDisplayAccess().getCurrent(); MIDletBridge.getMIDletAccess().getDisplayAccess().setCurrent(menuList); }
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());
return; Displayable d = da.getCurrent(); Command cmd = initialPressedSoftButton.getCommand(); if (cmd != null) {
CommandManager.getInstance().commandAction(cmd); } else { da.commandAction(cmd, da.getCurrent());
return; Displayable current = da.getCurrent(); if (current == null) { return;
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); } }
return; Displayable current = da.getCurrent(); if (current == null) { return;
return; Displayable current = da.getCurrent(); if (current == null) { return;