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; }
SoftButton hiddenButton = (SoftButton) hiddenEn.nextElement(); if (hiddenButton.getType() == SoftButton.TYPE_COMMAND && hiddenButton.getPaintable() == null && hiddenButton.getCommand() != null) { Enumeration en = buttons.elements(); SoftButton button = (SoftButton) en.nextElement(); if (button.getType() == SoftButton.TYPE_COMMAND && button.getPaintable() != null && button.getCommand() == null) { button.setCommand(hiddenButton.getCommand());
if (!fullScreenMode) { if (initialPressedSoftButton != null) { org.microemu.device.impl.Rectangle pb = initialPressedSoftButton.getPaintable(); if (pb != null) { if (pb.contains(e.getX(), e.getY())) {
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;
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);
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;
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 != 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);