Package net.rim.device.api.ui

Examples of net.rim.device.api.ui.Field


        public boolean execute(Object selection) {
          Boolean selectedChecked = (Boolean) selection;
          return (selectedChecked.booleanValue()) ? zoneModel.bypassZone(zoneNumber) : zoneModel.restoreZone(zoneNumber);
        }
      };
      final Field zoneField = createCheckBoxAndTextField(MessageFormat.format(OmniLinkBBClient.getString(OmniLinkClientResource.ZONE_NAME), new Object[] {new Integer(zoneNumber), zoneName}), zoneBypassed, zoneExec, zoneStatusLabel.toString());
      zoneFields[i] = zoneField;
    }
   
    return zoneFields;
  }
View Full Code Here


      Execution exec = new Execution() {       
        public boolean execute(Object selection) {
          return buttonModel.executeButton(buttonNumber);
        }
      };
      Field buttonField = createLabelAndButtonField(MessageFormat.format(OmniLinkBBClient.getString(OmniLinkClientResource.BUTTON_NAME), new Object[] {new Integer(buttonNumber), buttonName}), OmniLinkBBClient.getString(OmniLinkClientResource.BUTTON_EXECUTE), exec);
      buttonFields[i] = buttonField;
    }
   
    return buttonFields;
  }
View Full Code Here

        _padding_right = padding_right;
        _padding_top = padding_top;
    }

    protected void sublayout(int width, int height) {
        Field field;

        // Field 0 goes to the left, Field 1 to the right
        int y = _padding_top;

        if (getFieldCount() > 0) {
            field = getField(0);
            setPositionChild(field, _padding_left, y);
            layoutChild(field, field.getPreferredWidth(), field.getPreferredHeight());
        }

        if (getFieldCount() > 1) {
            field = getField(1);
            int field_width = field.getPreferredWidth();
            int x = Display.getWidth() - field_width - _padding_right;
            setPositionChild(field, x, y);
            layoutChild(field, field.getPreferredWidth(), field.getPreferredHeight());
        }

        // Set the manager's dimensions
        setExtent(width, getPreferredHeight());
    }
View Full Code Here

    width -= (hPadding << 1);
    int availableWidth = width;
    // each field reduces our available width
    int maxHeight = 0; // Calculate max height as we go
    int fieldCount = getFieldCount();
    Field child;
    for (int i = 0; i < fieldCount; i++) {
      child = getField(i);
      if (hasField(title) && child == title) {
        continue;
        // Layout title last, separately
      }
      layoutChild(child, availableWidth, height);
      XYRect childExtent = child.getExtent();
      availableWidth -= childExtent.width;
      if (hasField(icon) && child == icon) {
        // skip the interior padding loss.
      } else {
        availableWidth -= interiorPadding;
      }
      maxHeight = Math.max(maxHeight, childExtent.height);
    }
    // Layout Title with remaining space
    if (hasField(title)) {
      child = title;
      layoutChild(child, availableWidth, height);
      XYRect childExtent = child.getExtent();
      availableWidth -= childExtent.width + interiorPadding;
      maxHeight = Math.max(maxHeight, childExtent.height);
    }
    // Set Positions
    if (hasField(icon)) {
View Full Code Here

            final Manager manager = mainScreen.getMainManager();
            int availableHeight = Display.getHeight();
            final int fieldCount = manager.getFieldCount();

            for (int i = fieldCount - 1; i >= 0; --i) {
                final Field field = manager.getField(i);
                if (field != this) {
                    availableHeight -= field.getHeight();
                }
            }

            _width = Display.getWidth() - PADDING;
            _height = availableHeight - PADDING;
View Full Code Here

                _audioPlayer.close();
            }

            final Screen screen = getActiveScreen();
            if (screen instanceof MainScreen) {
                final Field field = screen.getField(0);
                if (field instanceof LabelField) {
                    final LabelField labelField = (LabelField) field;
                    invokeLater(new Runnable() {
                        public void run() {
                            labelField.setText("End of media reached.");
View Full Code Here

     * the fields is inputted.
     *
     * @see net.rim.device.api.ui.Screen#keyChar(char , int , int)
     */
    public boolean keyChar(final char key, final int status, final int time) {
        final Field focusField = getFieldWithFocus();

        if (focusField instanceof BasicEditField && !focusField.isDirty()) {
            if (key >= Characters.DIGIT_ZERO && key <= Characters.DIGIT_NINE
                    || key == Characters.BACKSPACE
                    || key == Characters.HYPHEN_MINUS) {
                final BasicEditField bef = (BasicEditField) focusField;
                bef.clear(10);
View Full Code Here

     * @see net.rim.device.api.ui.Screen#keyChar(char,int,int)
     *
     */
    protected boolean keyChar(final char key, final int status, final int time) {
        if (key == Characters.ENTER) {
            final Field fieldWithFocus = getFieldWithFocus();

            if (fieldWithFocus == _useDirectTcpField) {
                if (_useDirectTcpField.getChecked()) {
                    _useDirectTcpField.setChecked(false);
                } else {
View Full Code Here

            _effectControl =
                    (ImageEffectControl) _player
                            .getControl("javax.microedition.amms.control.imageeffect.ImageEffectControl");

            // Initialize the video display
            final Field videoField =
                    (Field) _videoControl.initDisplayMode(
                            GUIControl.USE_GUI_PRIMITIVE,
                            "net.rim.device.api.ui.Field");

            try {
View Full Code Here

            }
        });

        // Set up the playback
        _videoControl = (VideoControl) _videoPlayer.getControl("VideoControl");
        final Field vField =
                (Field) _videoControl.initDisplayMode(
                        GUIControl.USE_GUI_PRIMITIVE,
                        "net.rim.device.api.ui.Field");
        add(vField);
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.Field

Copyright © 2018 www.massapicom. 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.