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; }
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 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); } } }
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); } } }
Vector buttons = DeviceFactory.getDevice().getSoftButtons(); int numOfButtons = 0; Enumeration en = buttons.elements();
public void paintControls(Graphics g) { Device device = DeviceFactory.getDevice(); g.setColor(backgroundColor); g.fillRect(0, 0, displayRectangle.width, displayPaintable.y); g.fillRect(0, displayPaintable.y, displayPaintable.x, displayPaintable.height); g.fillRect(displayPaintable.x + displayPaintable.width, displayPaintable.y, displayRectangle.width - displayPaintable.x - displayPaintable.width, displayPaintable.height); g.fillRect(0, displayPaintable.y + displayPaintable.height, displayRectangle.width, displayRectangle.height - displayPaintable.y - displayPaintable.height); g.setColor(foregroundColor); for (Enumeration s = device.getSoftButtons().elements(); s.hasMoreElements();) { ((J2SESoftButton) s.nextElement()).paint(g); } int inputMode = device.getInputMethod().getInputMode(); if (inputMode == InputMethod.INPUT_123) { g.drawImage(((J2SEImmutableImage) mode123Image.getImage()).getImage(), mode123Image.getRectangle().x, mode123Image.getRectangle().y, null); } else if (inputMode == InputMethod.INPUT_ABC_UPPER) { g.drawImage(((J2SEImmutableImage) modeAbcUpperImage.getImage()).getImage(), modeAbcUpperImage .getRectangle().x, modeAbcUpperImage.getRectangle().y, null); } else if (inputMode == InputMethod.INPUT_ABC_LOWER) { g.drawImage(((J2SEImmutableImage) modeAbcLowerImage.getImage()).getImage(), modeAbcLowerImage .getRectangle().x, modeAbcLowerImage.getRectangle().y, null); } }
Iterator it = device.getSoftButtons().iterator(); while (it.hasNext()) { SoftButton button = (SoftButton) it.next();
if (device.hasPointerEvents()) { if (!fullScreenMode) { Iterator it = device.getSoftButtons().iterator(); while (it.hasNext()) { SoftButton button = (SoftButton) it.next();
foregroundColor.getGreen(), foregroundColor.getBlue()))); for (Enumeration s = device.getSoftButtons().elements(); s.hasMoreElements();) { ((SwtSoftButton) s.nextElement()).paint(g);