congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SoftButton
Code IndexAdd Tabnine to your IDE (free)

How to use
SoftButton
in
org.microemu.device.impl

Best Java code snippets using org.microemu.device.impl.SoftButton (Showing top 16 results out of 315)

origin: org.microemu/microemu-javase

  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());
origin: org.microemu/microemu-javase-swing

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);
    }
  }
}
origin: org.microemu/microemu-javase-swing

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;
}
origin: org.microemu/microemu-javase-swing

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());
origin: org.microemu/microemu-javase-swt

    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);
origin: org.microemu/microemu-javase-swing

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);
origin: org.microemu/microemu-javase-swing

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;
origin: org.microemu/microemu-javase-swing

Command cmd = ((SoftButton) button).getCommand();
if (cmd != null) {
  MIDletAccess ma = MIDletBridge.getMIDletAccess();
origin: org.microemu/microemu-javase

while (en.hasMoreElements()) {
  SoftButton button = (SoftButton) en.nextElement();
  if (button.getType() == SoftButton.TYPE_COMMAND) {
    button.setCommand(null);
    numOfButtons++;
origin: org.microemu/microemu-javase-swt

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);
origin: org.microemu/microemu-javase-swt

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);
origin: org.microemu/microemu-javase-swt

if (pressedButton != null) {
  if (pressedButton instanceof SoftButton && !rawSoftKeys) {
    Command cmd = ((SoftButton) pressedButton).getCommand();
    if (cmd != null) {
      CommandManager.getInstance().commandAction(cmd);
origin: org.microemu/microemu-javase-swing

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);
    }
  }
}
origin: org.microemu/microemu-javase-swing

if (pressedButton != null) {
  if (pressedButton instanceof SoftButton && !fullScreenMode) {
    Command cmd = ((SoftButton) pressedButton).getCommand();
    if (cmd != null) {
      MIDletAccess ma = MIDletBridge.getMIDletAccess();
origin: org.microemu/microemu-javase-swt

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);
    }
  }
}
origin: org.microemu/microemu-javase-swt

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);
    }
  }
}
org.microemu.device.implSoftButton

Most used methods

  • getCommand
  • getPaintable
  • getType
  • getName
  • isPressed
  • isVisible
  • setPressed
  • setVisible
  • preferredCommandType
  • setCommand

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now