Package org.nasutekds.quicksetup.ui

Examples of org.nasutekds.quicksetup.ui.LabelFieldDescriptor


   * {@inheritDoc}
   */
  protected JPanel createFieldsPanel() {
    JPanel p = UIFactory.makeJPanel();

    LabelFieldDescriptor serverDescriptor = new LabelFieldDescriptor(
      INFO_UPGRADE_REVIEW_PANEL_SERVER_LABEL.get(),
      INFO_UPGRADE_REVIEW_PANEL_SERVER_TOOLTIP.get(),
      LabelFieldDescriptor.FieldType.READ_ONLY,
      LabelFieldDescriptor.LabelType.PRIMARY,
      0
    );

    LabelFieldDescriptor oldVersionDescriptor = new LabelFieldDescriptor(
      INFO_UPGRADE_REVIEW_PANEL_OLD_VERSION_LABEL.get(),
      INFO_UPGRADE_REVIEW_PANEL_OLD_VERSION_TOOLTIP.get(),
      LabelFieldDescriptor.FieldType.READ_ONLY,
      LabelFieldDescriptor.LabelType.PRIMARY,
      0
    );

    LabelFieldDescriptor newVersionDescriptor = new LabelFieldDescriptor(
      INFO_UPGRADE_REVIEW_PANEL_NEW_VERSION_LABEL.get(),
      INFO_UPGRADE_REVIEW_PANEL_NEW_VERSION_TOOLTIP.get(),
      LabelFieldDescriptor.FieldType.READ_ONLY,
      LabelFieldDescriptor.LabelType.PRIMARY,
      0
View Full Code Here


  private void populateLabelAndFieldMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();

    hm.put(FieldName.GLOBAL_ADMINISTRATOR_UID, new LabelFieldDescriptor(
        INFO_GLOBAL_ADMINISTRATOR_UID_LABEL.get(),
        INFO_GLOBAL_ADMINISTRATOR_UID_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.UID_FIELD_SIZE));

    hm.put(FieldName.GLOBAL_ADMINISTRATOR_PWD, new LabelFieldDescriptor(
        INFO_GLOBAL_ADMINISTRATOR_PWD_LABEL.get(),
        INFO_GLOBAL_ADMINISTRATOR_PWD_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.PASSWORD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.PASSWORD_FIELD_SIZE));

    hm.put(FieldName.GLOBAL_ADMINISTRATOR_PWD_CONFIRM,
        new LabelFieldDescriptor(
        INFO_GLOBAL_ADMINISTRATOR_PWD_CONFIRM_LABEL.get(),
        INFO_GLOBAL_ADMINISTRATOR_PWD_CONFIRM_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.PASSWORD,
        LabelFieldDescriptor.LabelType.PRIMARY,
        UIFactory.PASSWORD_FIELD_SIZE));

    for (FieldName fieldName : hm.keySet())
    {
      LabelFieldDescriptor desc = hm.get(fieldName);
      String defaultValue = getDefaultValue(fieldName);
      JTextComponent field = UIFactory.makeJTextComponent(desc, defaultValue);
      JLabel label = UIFactory.makeJLabel(desc);

      hmFields.put(fieldName, field);
View Full Code Here

  private void populateLabelAndFieldMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();

    hm.put(FieldName.HOST_NAME, new LabelFieldDescriptor(
        INFO_HOST_NAME_LABEL.get(),
        INFO_HOST_NAME_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.HOST_FIELD_SIZE));

    hm.put(FieldName.SERVER_PORT, new LabelFieldDescriptor(
        INFO_SERVER_PORT_LABEL.get(),
        INFO_SERVER_PORT_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.PORT_FIELD_SIZE));

    hm.put(FieldName.ADMIN_CONNECTOR_PORT, new LabelFieldDescriptor(
        INFO_ADMIN_CONNECTOR_PORT_LABEL.get(),
        INFO_ADMIN_CONNECTOR_PORT_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.PORT_FIELD_SIZE));

    hm.put(FieldName.SECURITY_OPTIONS, new LabelFieldDescriptor(
        INFO_SERVER_SECURITY_LABEL.get(),
        INFO_SERVER_SECURITY_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.READ_ONLY,
        LabelFieldDescriptor.LabelType.PRIMARY, 0));

    hm.put(FieldName.DIRECTORY_MANAGER_DN, new LabelFieldDescriptor(
        INFO_SERVER_DIRECTORY_MANAGER_DN_LABEL.get(),
        INFO_SERVER_DIRECTORY_MANAGER_DN_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.DN_FIELD_SIZE));

    hm.put(FieldName.DIRECTORY_MANAGER_PWD, new LabelFieldDescriptor(
        INFO_SERVER_DIRECTORY_MANAGER_PWD_LABEL.get(),
        INFO_SERVER_DIRECTORY_MANAGER_PWD_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.PASSWORD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.PASSWORD_FIELD_SIZE));

    hm.put(FieldName.DIRECTORY_MANAGER_PWD_CONFIRM,
        new LabelFieldDescriptor(
        INFO_SERVER_DIRECTORY_MANAGER_PWD_CONFIRM_LABEL.get(),
        INFO_SERVER_DIRECTORY_MANAGER_PWD_CONFIRM_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.PASSWORD,
        LabelFieldDescriptor.LabelType.PRIMARY,
        UIFactory.PASSWORD_FIELD_SIZE));

    for (FieldName fieldName : hm.keySet())
    {
      LabelFieldDescriptor desc = hm.get(fieldName);
      String defaultValue = getDefaultValue(fieldName);

      JLabel label = UIFactory.makeJLabel(desc);

      if (fieldName != FieldName.SECURITY_OPTIONS)
      {
        JTextComponent field = UIFactory.makeJTextComponent(desc, defaultValue);
        hmFields.put(fieldName, field);
        label.setLabelFor(field);
      }
      else
      {
        lSecurity = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
                Message.raw(defaultValue),
                UIFactory.TextStyle.SECONDARY_FIELD_VALID);
      }

      hmLabels.put(fieldName, label);
    }

    /* Create the elements for the location */
    LabelFieldDescriptor desc =
        new LabelFieldDescriptor(INFO_SERVER_LOCATION_LABEL.get(),
            INFO_SERVER_LOCATION_PARENT_TOOLTIP.get(),
            LabelFieldDescriptor.FieldType.TEXTFIELD,
            LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.PATH_FIELD_SIZE);
    lServerLocation = UIFactory.makeJLabel(desc);
    tfServerLocationParent = UIFactory.makeJTextComponent(desc, "");
    lServerLocation.setLabelFor(tfServerLocationParent);
    hmLabels.put(FieldName.SERVER_LOCATION, lServerLocation);

    desc =
        new LabelFieldDescriptor(INFO_SERVER_LOCATION_LABEL.get(),
            INFO_SERVER_LOCATION_RELATIVE_TOOLTIP.get(),
            LabelFieldDescriptor.FieldType.TEXTFIELD,
            LabelFieldDescriptor.LabelType.PRIMARY,
            UIFactory.RELATIVE_PATH_FIELD_SIZE);
    tfServerLocationRelativePath = UIFactory.makeJTextComponent(desc, "");
View Full Code Here

  private void populateComponentMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();

    hm.put(FieldName.DIRECTORY_BASE_DN, new LabelFieldDescriptor(
        INFO_BASE_DN_LABEL.get(), INFO_BASE_DN_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.PRIMARY, UIFactory.DN_FIELD_SIZE));

    hm.put(FieldName.LDIF_PATH, new LabelFieldDescriptor(
        INFO_IMPORT_PATH_LABEL.get(), INFO_IMPORT_PATH_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.SECONDARY, UIFactory.PATH_FIELD_SIZE));

    hm.put(FieldName.NUMBER_ENTRIES, new LabelFieldDescriptor(
        INFO_NUMBER_ENTRIES_LABEL.get(), INFO_NUMBER_ENTRIES_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.SECONDARY,
        UIFactory.NUMBER_ENTRIES_FIELD_SIZE));

    for (FieldName fieldName : hm.keySet())
    {
      JTextComponent field;
      LabelFieldDescriptor desc = hm.get(fieldName);

      String defaultValue = getDefaultStringValue(fieldName);
      field = UIFactory.makeJTextComponent(desc, defaultValue);

      hmFields.put(fieldName, field);
View Full Code Here

  private void populateComponentMaps()
  {
    HashMap<FieldName, LabelFieldDescriptor> hm =
        new HashMap<FieldName, LabelFieldDescriptor>();

    hm.put(FieldName.REPLICATION_PORT, new LabelFieldDescriptor(
        INFO_REPLICATION_PORT_LABEL.get(),
        INFO_REPLICATION_PORT_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.SECONDARY,
        UIFactory.PORT_FIELD_SIZE));

    hm.put(FieldName.REMOTE_SERVER_DN, new LabelFieldDescriptor(
        INFO_REMOTE_SERVER_DN_LABEL.get(),
        INFO_REMOTE_SERVER_DN_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.SECONDARY, UIFactory.DN_FIELD_SIZE));

    hm.put(FieldName.REMOTE_SERVER_PWD, new LabelFieldDescriptor(
        INFO_REMOTE_SERVER_PWD_LABEL.get(),
        INFO_REMOTE_SERVER_PWD_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.PASSWORD,
        LabelFieldDescriptor.LabelType.SECONDARY,
        UIFactory.PASSWORD_FIELD_SIZE));

    hm.put(FieldName.REMOTE_SERVER_HOST, new LabelFieldDescriptor(
        INFO_REMOTE_SERVER_HOST_LABEL.get(),
        INFO_REMOTE_SERVER_HOST_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.SECONDARY,
        UIFactory.HOST_FIELD_SIZE));

    hm.put(FieldName.REMOTE_SERVER_PORT, new LabelFieldDescriptor(
        INFO_REMOTE_SERVER_PORT_LABEL.get(),
        INFO_REMOTE_SERVER_PORT_TOOLTIP.get(),
        LabelFieldDescriptor.FieldType.TEXTFIELD,
        LabelFieldDescriptor.LabelType.SECONDARY,
        UIFactory.PORT_FIELD_SIZE));

    for (FieldName fieldName : hm.keySet())
    {
      JTextComponent field;
      LabelFieldDescriptor desc = hm.get(fieldName);

      String defaultValue = getDefaultStringValue(fieldName);
      field = UIFactory.makeJTextComponent(desc, defaultValue);

      hmFields.put(fieldName, field);
View Full Code Here

        }
        else
        {
          serverDisplay = server.getHostPort(true);
        }
        LabelFieldDescriptor desc = new LabelFieldDescriptor(
                Message.raw(serverDisplay),
                INFO_REPLICATION_PORT_TOOLTIP.get(),
                LabelFieldDescriptor.FieldType.TEXTFIELD,
                LabelFieldDescriptor.LabelType.PRIMARY,
                UIFactory.PORT_FIELD_SIZE);
View Full Code Here

TOP

Related Classes of org.nasutekds.quicksetup.ui.LabelFieldDescriptor

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.