int width; int height; if (((DeviceDisplayImpl) device.getDeviceDisplay()).isResizable()) { width = device.getDeviceDisplay().getFullWidth(); height = device.getDeviceDisplay().getFullHeight();
public Dimension getPreferredSize() { Device device = DeviceFactory.getDevice(); if (device == null) { return new Dimension(0, 0); } DeviceDisplayImpl deviceDisplay = (DeviceDisplayImpl) DeviceFactory.getDevice().getDeviceDisplay(); if (deviceDisplay.isResizable()) { return new Dimension(deviceDisplay.getFullWidth(), deviceDisplay.getFullHeight()); } else { javax.microedition.lcdui.Image img = device.getNormalImage(); return new Dimension(img.getWidth(), img.getHeight()); } }
protected void updateDevice() { devicePanel.init(); if (((DeviceDisplayImpl) DeviceFactory.getDevice().getDeviceDisplay()).isResizable()) { setResizable(true); resizeButton.setVisible(true); } else { setResizable(false); resizeButton.setVisible(false); } pack(); devicePanel.requestFocus(); }
app.deviceEntry = app.selectDevicePanel.getSelectedDeviceEntry(); DeviceDisplayImpl deviceDisplay = (DeviceDisplayImpl) DeviceFactory.getDevice().getDeviceDisplay(); if (deviceDisplay.isResizable()) { Rectangle size = Config.getDeviceEntryDisplaySize(app.deviceEntry); if (size != null) {
private void parseInput(XMLElement tmp) { DeviceDisplayImpl deviceDisplay = (DeviceDisplayImpl) getDeviceDisplay(); boolean resizable = deviceDisplay.isResizable();
if (tmp.getName().equals("system-properties")) { parseSystemProperties(tmp); } else if (tmp.getName().equals("img") && !((DeviceDisplayImpl) getDeviceDisplay()).isResizable()) { try { if (tmp.getStringAttribute("name").equals("normal")) {
return; if (((DeviceDisplayImpl) device.getDeviceDisplay()).isResizable()) { return;
if (deviceDisplay.isResizable()) { Rectangle size = Config.getDeviceEntryDisplaySize(entry); if (size != null) {
if (((DeviceDisplayImpl) device.getDeviceDisplay()).isResizable()) { resize(device.getDeviceDisplay().getFullWidth(), device.getDeviceDisplay().getFullHeight()); } else {
} else if (tmp_display.getName().equals("rectangle")) { Rectangle rect = getRectangle(tmp_display); if (deviceDisplay.isResizable()) { rect.x = 0; rect.y = 0;
public void componentResized(ComponentEvent e) { count++; DeviceDisplayImpl deviceDisplay = (DeviceDisplayImpl) DeviceFactory.getDevice().getDeviceDisplay(); if (deviceDisplay.isResizable()) { deviceDisplay.setDisplayRectangle(new Rectangle(0, 0, devicePanel.getWidth(), devicePanel.getHeight())); ((SwingDisplayComponent) devicePanel.getDisplayComponent()).init();