while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_COMMAND && button.getCommand() == null && button.preferredCommandType((Command) commandsTable.elementAt(i))) { button.setCommand((Command) commandsTable.elementAt(i)); commandsTable.removeElementAt(i); i--; while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_COMMAND && button.getCommand() == null) { button.setCommand((Command) commandsTable.elementAt(i)); commandsTable.removeElementAt(i); i--; while (hiddenEn.hasMoreElements()) { SoftButton hiddenButton = (SoftButton) hiddenEn.nextElement(); if (hiddenButton.getType() == SoftButton.TYPE_COMMAND && hiddenButton.getPaintable() == null && hiddenButton.getCommand() != null) { Enumeration en = buttons.elements(); while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_COMMAND && button.getPaintable() != null && button.getCommand() == null) { button.setCommand(hiddenButton.getCommand());
public void setScrollDown(boolean state) { Enumeration en = DeviceFactory.getDevice().getSoftButtons().elements(); while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_ICON && button.getName().equals("down")) { button.setVisible(state); } } }
public static SoftButton getSoftButton(MouseEvent ev) { Iterator it = DeviceFactory.getDevice().getSoftButtons().iterator(); while (it.hasNext()) { SoftButton button = (SoftButton) it.next(); if (button.isVisible()) { org.microemu.device.impl.Rectangle pb = button.getPaintable(); if (pb != null && pb.contains(ev.getX(), ev.getY())) { return button; } } } return null; }
if (device.hasPointerEvents()) { if (!fullScreenMode) { if (initialPressedSoftButton != null && initialPressedSoftButton.isPressed()) { initialPressedSoftButton.setPressed(false); org.microemu.device.impl.Rectangle pb = initialPressedSoftButton.getPaintable(); if (pb != null) { repaintRequest(pb.x, pb.y, pb.width, pb.height); Command cmd = initialPressedSoftButton.getCommand(); if (cmd != null) { if (cmd.equals(CommandManager.CMD_MENU)) { if (initialPressedSoftButton.getName().equals("up")) { da.keyPressed(getButtonByButtonName(ButtonName.UP).getKeyCode()); } else if (initialPressedSoftButton.getName().equals("down")) { da.keyPressed(getButtonByButtonName(ButtonName.DOWN).getKeyCode());
while (it.hasNext()) { SoftButton button = (SoftButton) it.next(); if (button.isVisible()) { org.microemu.device.impl.Rectangle pb = button.getPaintable(); if (pb != null && pb.contains(e.x - rect.x, e.y - rect.y)) { initialPressedSoftButton = button; button.setPressed(true); dc.repaintRequest(pb.x, pb.y, pb.width, pb.height); break; if (pressedButton != null) { if (pressedButton instanceof SoftButton && !fullScreenMode) { Command cmd = ((SoftButton) pressedButton).getCommand(); if (cmd != null) { CommandManager.getInstance().commandAction(cmd);
if (!fullScreenMode) { if (initialPressedSoftButton != null) { org.microemu.device.impl.Rectangle pb = initialPressedSoftButton.getPaintable(); if (pb != null) { if (pb.contains(e.getX(), e.getY())) { if (!initialPressedSoftButton.isPressed()) { initialPressedSoftButton.setPressed(true); repaintRequest(pb.x, pb.y, pb.width, pb.height); if (initialPressedSoftButton.isPressed()) { initialPressedSoftButton.setPressed(false); repaintRequest(pb.x, pb.y, pb.width, pb.height);
while (it.hasNext()) { SoftButton button = (SoftButton) it.next(); if (button.isVisible()) { org.microemu.device.impl.Rectangle pb = button.getPaintable(); if (pb != null && pb.contains(e.getX(), e.getY())) { initialPressedSoftButton = button; button.setPressed(true); repaintRequest(pb.x, pb.y, pb.width, pb.height); break;
Command cmd = ((SoftButton) button).getCommand(); if (cmd != null) { MIDletAccess ma = MIDletBridge.getMIDletAccess();
while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_COMMAND) { button.setCommand(null); numOfButtons++;
if (device.hasPointerEvents()) { if (!fullScreenMode) { if (initialPressedSoftButton != null && initialPressedSoftButton.isPressed()) { initialPressedSoftButton.setPressed(false); org.microemu.device.impl.Rectangle pb = initialPressedSoftButton.getPaintable(); if (pb != null) { dc.repaintRequest(pb.x, pb.y, pb.width, pb.height); if (pb.contains(e.x - rect.x, e.y - rect.y)) { Command cmd = initialPressedSoftButton.getCommand(); if (cmd != null) { CommandManager.getInstance().commandAction(cmd);
if (!fullScreenMode) { if (initialPressedSoftButton != null) { org.microemu.device.impl.Rectangle pb = initialPressedSoftButton.getPaintable(); if (pb != null) { if (pb.contains(e.x - rect.x, e.y - rect.y)) { if (!initialPressedSoftButton.isPressed()) { initialPressedSoftButton.setPressed(true); dc.repaintRequest(pb.x, pb.y, pb.width, pb.height); if (initialPressedSoftButton.isPressed()) { initialPressedSoftButton.setPressed(false); dc.repaintRequest(pb.x, pb.y, pb.width, pb.height);
if (pressedButton != null) { if (pressedButton instanceof SoftButton && !rawSoftKeys) { Command cmd = ((SoftButton) pressedButton).getCommand(); if (cmd != null) { CommandManager.getInstance().commandAction(cmd);
public void setScrollUp(boolean state) { Enumeration en = DeviceFactory.getDevice().getSoftButtons().elements(); while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_ICON && button.getName().equals("up")) { button.setVisible(state); } } }
if (pressedButton != null) { if (pressedButton instanceof SoftButton && !fullScreenMode) { Command cmd = ((SoftButton) pressedButton).getCommand(); if (cmd != null) { MIDletAccess ma = MIDletBridge.getMIDletAccess();
public void setScrollDown(boolean state) { Enumeration en = DeviceFactory.getDevice().getSoftButtons().elements(); while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_ICON && button.getName().equals("down")) { button.setVisible(state); } } }
public void setScrollUp(boolean state) { Enumeration en = DeviceFactory.getDevice().getSoftButtons().elements(); while (en.hasMoreElements()) { SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_ICON && button.getName().equals("up")) { button.setVisible(state); } } }