Пример #1
0
  public ProfileScreen(ProfileInfoScreenManager _profileInfo) {
    super(Manager.USE_ALL_HEIGHT | Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR);
    profileInfo = _profileInfo;
    Manager mainManager = getMainManager();
    mainManager.setBackground(BackgroundFactory.createBitmapBackground(Images.screen_background));
    backButton = new TabbedButton("Back", 6, 100, 36);
    backButton.setRVAlue(10);
    backButton.setChangeListener(AirCrewApp.backButtonListener);
    homeButton = new TabbedButton("Home", 6, 100, 36);
    homeButton.setRVAlue(10);

    setTitle(new ScreenBannar("My Profile", 40, backButton, homeButton));

    mvrm = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
    nameField = new CompositeTextBox("Username", "", true);
    emailIdField = new CompositeTextBox("email", "", true);
    passwordField = new CompositePasswordBox("Password", "", true);
    confirmPasswordField = new CompositePasswordBox("Confirm Password", "", true);
    airlineField = new CompositeObjectChoiceField("Airlines", airlines, 0);
    designationField = new CompositeTextBox("Designation", "", true);
    genderField = new CompositeObjectChoiceField("Gender", gender, 0);
    locationField = new CompositeTextBox("Location", "", true);

    CompositeFieldManager manager =
        new CompositeFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);

    manager.add(nameField);
    manager.add(emailIdField);
    manager.add(passwordField);
    manager.add(confirmPasswordField);
    manager.add(airlineField);
    manager.add(designationField);
    manager.add(genderField);
    manager.add(locationField);

    mvrm.add(manager);
    saveButton = new TabbedButton("Save", 7, 470, 40);
    saveButton.setRVAlue(12);
    mvrm.add(saveButton);
    mvrm.add(new SpaceField(10));
    add(mvrm);
  }
Пример #2
0
  /**
   * Applies a visual style to a Manager to make it appear like a distinct group.
   *
   * @param manager The Manager to transform.
   * @param title The title of the group. If null or empty, no label will be added.
   * @return Reference to the same Manager object that was passed as the manager parameter.
   */
  public static Manager makeGroup(Manager manager, String title) {
    if ((title != null) && (title != "")) {
      manager.add(createGroupLabel(title));
    }

    manager.setMargin(new XYEdges(3, 3, 0, 3));
    manager.setPadding(new XYEdges(5, 5, 5, 5));
    manager.setBackground(BackgroundFactory.createSolidBackground(Color.WHITE));
    manager.setBorder(
        BorderFactory.createBevelBorder(
            new XYEdges(2, 2, 2, 2),
            new XYEdges(
                COLOR_GROUP_BEZEL_OUTER,
                COLOR_GROUP_BEZEL_OUTER,
                COLOR_GROUP_BEZEL_OUTER,
                COLOR_GROUP_BEZEL_OUTER),
            new XYEdges(
                COLOR_GROUP_BEZEL_INNER,
                COLOR_GROUP_BEZEL_INNER,
                COLOR_GROUP_BEZEL_INNER,
                COLOR_GROUP_BEZEL_INNER)));

    return manager;
  }