Examples of PopupScreen


Examples of net.rim.device.api.ui.container.PopupScreen

      } else{
        statusField.setText("Last known location not available! Please acquire a single location or a tracking session first.");
      }
    } else if(field==satellitesField){
      if(location!=null){
        final PopupScreen satPopup = new PopupScreen(new VerticalFieldManager()){

          protected boolean keyDown(int keycode, int time) {
            int key = Keypad.key(keycode);
            if(key==Keypad.KEY_ESCAPE){
              Screen screen = getScreen();                                     
              UiApplication.getUiApplication().popScreen(screen);             
            }
            return true;
          }         
        };
        EditField satField = new EditField("", "");
        satPopup.add(satField);
        StringBuffer buffer = new StringBuffer();
        Enumeration satEnum = location.getSatelliteInfo();
        if(satEnum!=null && satEnum.hasMoreElements()){
          buffer.append("ID\tAzimuth\tElevation\tSignal\n");
          while(satEnum.hasMoreElements()){
View Full Code Here

Examples of net.rim.device.api.ui.container.PopupScreen

                    final Object context) {
                if (_testField.getText().length() == 0) {
                    Dialog.alert("Test field cannot be empty");
                } else {
                    final VerticalFieldManager vfm = new VerticalFieldManager();
                    _popUp = new PopupScreen(vfm);
                    final LabelField popUpLabel =
                            new LabelField("Correction for "
                                    + _testField.getText() + ":");
                    _correction = new EditField();
                    _popUp.add(popUpLabel);
View Full Code Here

Examples of net.rim.device.api.ui.container.PopupScreen

             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                final VerticalFieldManager vfm = new VerticalFieldManager();
                _popUp = new PopupScreen(vfm);
                _addAttendeeField = new EditField("Enter Name: ", "");
                _popUp.add(_addAttendeeField);
                final HorizontalFieldManager hfm =
                        new HorizontalFieldManager(Field.FIELD_HCENTER);
                hfm.add(new AddButton());
View Full Code Here

Examples of net.rim.device.api.ui.container.PopupScreen

            // Make sure that step size is at least one
            _stepSize = Math.max(_max / 100, 1);

            _manager = new DialogFieldManager();
            _popupScreen = new PopupScreen(_manager);
            _gaugeField = new GaugeField(null, 0, max, 0, GaugeField.PERCENT);
            _lbfield = new LabelField(title, Field.USE_ALL_WIDTH);

            _manager.addCustomField(_lbfield);
            _manager.addCustomField(_gaugeField);
View Full Code Here

Examples of org.getspout.spoutapi.gui.PopupScreen

  }

  public void run(int playerId) {
    SpoutPlayer p = SpoutManager.getPlayerFromId(playerId);
    InGameHUD mainScreen = p.getMainScreen();
    PopupScreen popup = mainScreen.getActivePopup();
    Screen current = p.getCurrentScreen();

    Screen in = null;
    if (mainScreen != null && screen.equals(mainScreen.getId())) {
      in = mainScreen;
    }
    if (popup != null && screen.equals(popup.getId())) {
      in = popup;
    }
    if (current != null && screen.equals(current.getId())) {
      in = current;
    }
View Full Code Here

Examples of org.getspout.spoutapi.gui.PopupScreen

        break;
      case Open:
        event = new ScreenOpenEvent(player, player.getMainScreen().getActivePopup(), ScreenType.getType(this.screen));
        Bukkit.getServer().getPluginManager().callEvent(event);
        if (event.isCancelled()) {
          PopupScreen screen = player.getMainScreen().getActivePopup();
          if (screen != null) {
            screen.setDirty(true);
            player.sendImmediatePacket(new PacketWidget(screen, screen.getId()));
          }
        } else {
          player.openScreen(ScreenType.getType(this.screen), false);
        }
        break;
View Full Code Here

Examples of org.getspout.spoutapi.gui.PopupScreen

    }
  }

  private void handleScreenCloseCancelled(SpoutPlayer player, ScreenCloseEvent e, boolean update) {
    this.action = (byte) ScreenAction.Close.getId();
    PopupScreen screen = player.getMainScreen().getActivePopup();
    if (screen != null) {
      if (update) {
        screen.onScreenClose(e);
      }
      if (!e.isCancelled() && ScreenType.getType(this.screen) == ScreenType.CUSTOM_SCREEN) {
        handleScreenClose(player, e, false);
        return;
      }
      screen.setDirty(true);
      player.sendImmediatePacket(new PacketWidget(screen, screen.getId()));
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.gui.PopupScreen

      player.sendImmediatePacket(new PacketWidget(screen, screen.getId()));
    }
  }

  private void handleScreenClose(SpoutPlayer player, ScreenCloseEvent e, boolean update) {
    PopupScreen p = player.getMainScreen().getActivePopup();
    if (update && p != null){
      p.onScreenClose(e);
    }
    if (e.isCancelled()) {
      handleScreenCloseCancelled(player, e, false);
      return;
    }
    player.getMainScreen().closePopup();
    if (player.getItemOnCursor() != null && p != null) {
      p.handleItemOnCursor(player.getItemOnCursor());
      player.setItemOnCursor(null);
    }
  }
View Full Code Here

Examples of org.getspout.spoutapi.gui.PopupScreen

  @Override
  public void run(int playerId) {
    SpoutPlayer player = SpoutManager.getPlayerFromId(playerId);
    if (player != null) {
      PopupScreen popup = player.getMainScreen().getActivePopup();
      if (popup != null) {
        Widget w = popup.getWidget(widgetId);
        if (w != null && w instanceof Control) {
          ((Control) w).setFocus(focus);
        }
      }
    }
View Full Code Here

Examples of org.spoutcraft.api.gui.PopupScreen

      e.printStackTrace();
    }
    if (widget != null) {
      allWidgets.put(widgetId, widget);
      InGameHUD mainScreen = SpoutClient.getInstance().getActivePlayer().getMainScreen();
      PopupScreen popup = mainScreen.getActivePopup();
      Screen overlay = null;

      if (SpoutClient.getHandle().currentScreen != null) {
        overlay = SpoutClient.getHandle().currentScreen.getScreen();
      }
      // Determine if this is a popup screen and if we need to update it
      if (widget instanceof PopupScreen) {
        if (popup != null) {
          if (widget.getId().equals(popup.getId())) {
            if (SpoutClient.getHandle().currentScreen instanceof CustomScreen) {
              ((CustomScreen)SpoutClient.getHandle().currentScreen).update((PopupScreen)widget);
            }
          } else {
            mainScreen.closePopup();
            mainScreen.attachPopupScreen((PopupScreen)widget);
          }
        } else {
          mainScreen.attachPopupScreen((PopupScreen)widget);
        }
      } else if (widget instanceof OverlayScreen) { // Determine if this screen overrides another screen
        if (SpoutClient.getHandle().currentScreen != null) {
          SpoutClient.getHandle().currentScreen.update((OverlayScreen)widget);
          overlay = (OverlayScreen)widget;
        }
      } else if (screen.equals(mainScreen.getId())) { // Determine if this is a widget on the main screen
        if (mainScreen.containsWidget(widget.getId())) {
          mainScreen.updateWidget(widget);
          widget.setScreen(mainScreen);
        } else {
          widget.setScreen(mainScreen);
          mainScreen.attachWidget(widget.getAddon(), widget);
        }
      } else if (popup != null && screen.equals(popup.getId())) { // Determine if this is a widget on the popup screen
        if (popup.containsWidget(widget.getId())) {
          popup.updateWidget(widget);
          widget.setScreen(popup);
        } else {
          widget.setScreen(popup);
          popup.attachWidget(widget.getAddon(), widget);
        }
      } else if (overlay != null && screen.equals(overlay.getId())) { // Determine if this is a widget on an overlay screen
        if (overlay.containsWidget(widget.getId())) {
          overlay.updateWidget(widget);
          widget.setScreen(overlay);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.