Package com.sun.messaging.jmq.admin.apps.console.util

Examples of com.sun.messaging.jmq.admin.apps.console.util.LabelledComponent


  brokerNameTF = new JTextField(20);
  brokerGridbag.setConstraints(brokerNameTF, brokerConstraints);
  brokerPanel.add(brokerNameTF);

        LabelledComponent items[];
        items = new LabelledComponent[4];

        hostTF = new JTextField(DEFAULT_BROKER_HOST, 10);
        items[0] = new LabelledComponent(acr.getString(acr.I_BROKER_HOST), hostTF);

        portTF = new IntegerField(0, Integer.MAX_VALUE, DEFAULT_PRIMARY_PORT, 10);
        items[1] = new LabelledComponent(acr.getString(acr.I_BROKER_PORT), portTF);

        userTF = new JTextField(BrokerAdmin.DEFAULT_ADMIN_USERNAME, 10);
        items[2] = new LabelledComponent(acr.getString(acr.I_BROKER_USERNAME), userTF);

        passwdTF = new JPasswordField("", 10);
        items[3] = new LabelledComponent(acr.getString(acr.I_BROKER_PASSWD), passwdTF);

        LabelValuePanel lvp = new LabelValuePanel(items, 4, 4);

  workConstraints.gridx = 0;
  workConstraints.anchor = GridBagConstraints.WEST;
View Full Code Here


  JPanel workPanel = new JPanel();
  GridBagLayout gridbag = new GridBagLayout();
  workPanel.setLayout(gridbag);
  GridBagConstraints c = new GridBagConstraints();
  LabelledComponent items[] = new LabelledComponent[2];

  principalText = new JTextField(20);
  principalText.addActionListener(this);
  items[0] = new LabelledComponent(Context.SECURITY_PRINCIPAL + ":",
                 principalText);
  credentialsText = new JPasswordField(20);
  credentialsText.addActionListener(this);
  items[1] = new LabelledComponent(Context.SECURITY_CREDENTIALS + ":",
                 credentialsText);
 
  LabelValuePanel lvp = new LabelValuePanel(items, 5, 5);

  c.gridx = 0;
View Full Code Here

      ButtonGroup group = new ButtonGroup();
      group.add(queueButton);
      group.add(topicButton);
  }

  LabelledComponent items[] = new LabelledComponent[3];
  checkBox = new JCheckBox();
  if (propsDlg) {
      lookupLabel = new JLabel(" ");
      destLabel = new JLabel(" ");
      items[0] = new LabelledComponent(acr.getString(acr.I_OBJSTORE_LOOKUP_NAME) +
            ":", lookupLabel);
      items[1] = new LabelledComponent(acr.getString(acr.I_OBJSTORE_DEST_TYPE) +
            ":", destLabel);
  } else {
      lookupText = new JTextField(25);
      items[0] = new LabelledComponent(acr.getString(acr.I_OBJSTORE_LOOKUP_NAME) +
            ":", lookupText);
      items[1] = new LabelledComponent(acr.getString(acr.I_OBJSTORE_DEST_TYPE) +
          ":", panel2, LabelledComponent.NORTH);
  }
  items[2] = new LabelledComponent(acr.getString(acr.I_READONLY) + ":",
                 checkBox);

  LabelValuePanel lvp = new LabelValuePanel(items, 5, 5);

  c1.gridx = 0;
  c1.gridy = 0;
  c1.anchor = GridBagConstraints.NORTHWEST;
  gridbag1.setConstraints(panel1, c1);
  workPanel.add(panel1);

  c1.gridx = 0;
  c1.gridy = 1;
  c1.anchor = GridBagConstraints.WEST;
  gridbag1.setConstraints(lvp, c1);
  workPanel.add(lvp);

  JSeparator separator = new JSeparator();
  c1.gridx = 0;
  c1.gridy = 2;
  c1.ipady = 0; // reset
  c1.anchor = GridBagConstraints.CENTER; // reset
  c1.fill = GridBagConstraints.HORIZONTAL;
  c1.insets = new Insets(5, 0, 5, 0);
  gridbag1.setConstraints(separator, c1);
  workPanel.add(separator);
 
  /*
   * From here, list the properties on the destination.
   */
  AdministeredObject obj = (AdministeredObject)new com.sun.messaging.Topic();
  Properties props = obj.getConfiguration();

  LabelledComponent items2[] = new LabelledComponent[props.size()];
  textItems = new JTextField[props.size()];

  int i = 0;
  for (Enumeration e = obj.enumeratePropertyNames(); e.hasMoreElements(); i++) {
      String propName = (String)e.nextElement();
      try {
    textItems[i] = new JTextField((String)props.get(propName), 25);
    items2[i] = new LabelledComponent(obj.getPropertyLabel(propName) + ":",
              textItems[i]);
      } catch (Exception ex) {
      }
  }

View Full Code Here

    public JPanel createWorkPanel() {

        JPanel                  workPanel;
        GridBagLayout           workGridbag;
        GridBagConstraints      workConstraints;
        LabelledComponent       tmpLabelC;
        LabelledComponent       lvpItems[];
        LabelValuePanel         lvp;
        JSeparator              sep;

        workPanel = new JPanel();
        workGridbag = new GridBagLayout();
        workPanel.setLayout(workGridbag);
        workConstraints = new GridBagConstraints();

  /*
         * Initialize.
         */
        workConstraints.gridx = 0;
        workConstraints.gridy = 0;
        workConstraints.anchor = GridBagConstraints.WEST;
        workConstraints.fill = GridBagConstraints.NONE;
        workConstraints.insets = new Insets(5, 0, 5, 0);
        workConstraints.ipadx = 0;
        workConstraints.ipady = 0;
        workConstraints.weightx = 1.0;

        lvpItems = new LabelledComponent[3];

        svcName = new JLabel();
        tmpLabelC = new LabelledComponent(
    ar.getString(ar.I_JMQCMD_SVC_NAME) + ":",
    svcName);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
  lvpItems[0] = tmpLabelC;

  // for radio buttons for dynamic / static port number
  JPanel servicePanel = new JPanel();
  GridBagLayout serviceGridbag = new GridBagLayout();
  servicePanel.setLayout(serviceGridbag);
  GridBagConstraints serviceConstraints = new GridBagConstraints();

  /*
         * Initialize.
         */
        serviceConstraints.anchor = GridBagConstraints.WEST;
  serviceConstraints.insets = new Insets(0, 0, 0, 0);

  serviceConstraints.gridx = 0;
  serviceConstraints.gridy = 0;
  dynamicPortButton = new JRadioButton();
  dynamicPortButton.addActionListener(this);
  serviceGridbag.setConstraints(dynamicPortButton, serviceConstraints);
  servicePanel.add(dynamicPortButton);

  serviceConstraints.gridx = 0;
  serviceConstraints.gridy = 1;
  staticPortButton = new JRadioButton();
  staticPortButton.addActionListener(this);
  serviceGridbag.setConstraints(staticPortButton, serviceConstraints);
  servicePanel.add(staticPortButton);

  ButtonGroup servicePortGroup = new ButtonGroup();
  servicePortGroup.add(dynamicPortButton);
  servicePortGroup.add(staticPortButton);

  serviceConstraints.gridx = 1;
  serviceConstraints.gridy = 0;
  JLabel dynamicLabel = new JLabel(acr.getString(acr.I_DYNAMIC_CAP) + ":");
  serviceGridbag.setConstraints(dynamicLabel, serviceConstraints);
  servicePanel.add(dynamicLabel);

  serviceConstraints.gridx = 1;
  serviceConstraints.gridy = 1;
  JLabel staticLabel = new JLabel(acr.getString(acr.I_STATIC_CAP) + ":");
  serviceGridbag.setConstraints(staticLabel, serviceConstraints);
  servicePanel.add(staticLabel);

  serviceConstraints.gridx = 2;
  serviceConstraints.gridy = 0;
  serviceConstraints.insets = new Insets(0, 5, 0, 0);
  dynamicPortLabel = new JLabel();
  serviceGridbag.setConstraints(dynamicPortLabel, serviceConstraints);
  servicePanel.add(dynamicPortLabel);

  serviceConstraints.gridx = 2;
  serviceConstraints.gridy = 1;
  serviceConstraints.insets = new Insets(0, 5, 0, 0);
  staticPortIF = new IntegerField(0, Integer.MAX_VALUE, 15);
  staticPortIF.setEnabled(false);
  serviceGridbag.setConstraints(staticPortIF, serviceConstraints);
  servicePanel.add(staticPortIF);

        tmpLabelC = new LabelledComponent(
                ar.getString(ar.I_JMQCMD_SVC_PORT)+":",
                servicePanel, LabelledComponent.NORTH);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
        lvpItems[1] = tmpLabelC;

  // Set this so that we can enable/disable this component
  svcPortComponent = lvpItems[1];

        svcState = new JLabel();
        tmpLabelC = new LabelledComponent(
    ar.getString(ar.I_JMQCMD_SVC_STATE)+":",
    svcState);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
  lvpItems[2] = tmpLabelC;

        lvp = new LabelValuePanel(lvpItems, 4, 0);
        workGridbag.setConstraints(lvp, workConstraints);
        workPanel.add(lvp);

        workConstraints.gridy = 1;

        sep = new JSeparator();
        workConstraints.fill = GridBagConstraints.HORIZONTAL;
        workGridbag.setConstraints(sep, workConstraints);
        workPanel.add(sep);
        /*
         * Reset
         */
        workConstraints.fill = GridBagConstraints.NONE;
        workConstraints.gridy = 2;

        lvpItems = new LabelledComponent[2];

        allocatedThreads = new JLabel();
        tmpLabelC = new LabelledComponent(
    ar.getString(ar.I_JMQCMD_SVC_CUR_THREADS) + ":",
    allocatedThreads);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
  lvpItems[0] = tmpLabelC;

        numConnections = new JLabel();
        tmpLabelC = new LabelledComponent(
    ar.getString(ar.I_JMQCMD_SVC_NUM_CXN) + ":",
    numConnections);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
  lvpItems[1] = tmpLabelC;

        lvp = new LabelValuePanel(lvpItems, 4, 0);
        workGridbag.setConstraints(lvp, workConstraints);
        workPanel.add(lvp);

        workConstraints.gridy = 3;

        sep = new JSeparator();
        workConstraints.fill = GridBagConstraints.HORIZONTAL;
        workGridbag.setConstraints(sep, workConstraints);
        workPanel.add(sep);
        /*
         * Reset
         */
        workConstraints.fill = GridBagConstraints.NONE;
        workConstraints.gridy = 4;

        lvpItems = new LabelledComponent[2];

        minThreads = new IntegerField(0, Integer.MAX_VALUE, 15);
  minThreads.addActionListener(this);
        tmpLabelC = new LabelledComponent(
                ar.getString(ar.I_JMQCMD_SVC_MIN_THREADS) + ":",
                minThreads);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
        workPanel.add(tmpLabelC);
  lvpItems[0] = tmpLabelC;

  maxThreads = new IntegerField(0, Integer.MAX_VALUE, 15);
  maxThreads.addActionListener(this);
        tmpLabelC = new LabelledComponent(
                ar.getString(ar.I_JMQCMD_SVC_MAX_THREADS) + ":",
                maxThreads);
        workGridbag.setConstraints(tmpLabelC, workConstraints);
  lvpItems[1] = tmpLabelC;

View Full Code Here

  c.insets = new Insets(0, 0, 0, 0)// reset
  c.fill = GridBagConstraints.NONE; // reset c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(jndiLabel, c);
  panel1.add(jndiLabel);

  LabelledComponent items[] = new LabelledComponent[3];
  comboBox = new JComboBox(jndiPropNames);
  comboBox.addActionListener(this);
  items[0] = new LabelledComponent(acr.getString(acr.I_NAME) + ":", comboBox);
  valueText = new JTextField(40);
  valueText.getDocument().addDocumentListener(docListener);
  items[1] = new LabelledComponent(acr.getString(acr.I_VALUE) + ":", valueText);

  model = new PropsTableModel();
  table = new JTable(model);
  table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  ListSelectionModel lsm = table.getSelectionModel();
  lsm.addListSelectionListener(this);
  JScrollPane scrollPane = new JScrollPane(table);
  scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
 
  items[2] = new LabelledComponent(" ", scrollPane);

  lvp = new LabelValuePanel(items, 5, 5);
  c.gridx = 0;
  c.gridy = 4;
  c.gridwidth = 2;
View Full Code Here

  JPanel workPanel = new JPanel();
  GridBagLayout gridbag = new GridBagLayout();
  workPanel.setLayout(gridbag);
  GridBagConstraints c = new GridBagConstraints();
  LabelledComponent items[] = new LabelledComponent[2];

  username = new JTextField(20);
  username.addActionListener(this);
  items[0] = new LabelledComponent(acr.getString(acr.I_BROKER_USERNAME), username);
  password = new JPasswordField(20);
  password.addActionListener(this);
  items[1] = new LabelledComponent(acr.getString(acr.I_BROKER_PASSWD), password);
 
  LabelValuePanel lvp = new LabelValuePanel(items, 5, 5);

  c.gridx = 0;
  c.gridy = 0;
View Full Code Here

    public JPanel makeBasicTab()  {
        JPanel       workPanel;
  GridBagLayout     workGridbag;
  GridBagConstraints   workConstraints;
  LabelledComponent  tmpLabelC;
  LabelledComponent  lvpItems[];
  LabelValuePanel    lvp;

        workPanel = new JPanel();
  workGridbag = new GridBagLayout();
  workPanel.setLayout(workGridbag);
  workConstraints = new GridBagConstraints();

  workConstraints.gridx = 0;
  workConstraints.anchor = GridBagConstraints.WEST;
  workConstraints.fill = GridBagConstraints.NONE;
  workConstraints.insets = new Insets(5, 0, 5, 0);
  workConstraints.ipadx = 0;
  workConstraints.ipady = 0;
  workConstraints.weightx = 1.0;

  /*
   * Removed metric interval
  lvpItems = new LabelledComponent[6];
  */
  lvpItems = new LabelledComponent[7];

  versionLbl = new JLabel();
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_VERSION_STR),
      versionLbl);
  lvpItems[0] = tmpLabelC;

  instanceNameLbl = new JLabel();
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_INSTANCE_NAME),
      instanceNameLbl);
  lvpItems[1] = tmpLabelC;

  portTF = new IntegerField(0, Integer.MAX_VALUE, 10);
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_PORT), portTF);
  lvpItems[2] = tmpLabelC;

  autoCreateTopicCkb = new JCheckBox();
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_ACREATE_TOPICS),
        autoCreateTopicCkb);
  lvpItems[3] = tmpLabelC;

  autoCreateQueueCkb = new JCheckBox();
        autoCreateQueueCkb.addActionListener(this);
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_ACREATE_QUEUES),
        autoCreateQueueCkb);
  lvpItems[4] = tmpLabelC;

  /*
   * Active Consumers
   */
        activeConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 10);
        activeConsumerSF = new SpecialValueField(activeConsumerIF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  activeConsumerLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_AUTOCREATED_ACTIVE_CONSUMER),
       activeConsumerSF, LabelledComponent.NORTH);
  lvpItems[5] = activeConsumerLabelC;

  /*
   * Failover Consumers
   */
        failoverConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 10);
        failoverConsumerSF = new SpecialValueField(failoverConsumerIF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  failoverConsumerLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_AUTOCREATED_FAILOVER_CONSUMER),
       failoverConsumerSF, LabelledComponent.NORTH);
  lvpItems[6] = failoverConsumerLabelC;


View Full Code Here

    public JPanel makeLogTab()  {
        JPanel       workPanel;
  GridBagLayout     workGridbag;
  GridBagConstraints   workConstraints;
  LabelledComponent  tmpLabelC;
  LabelledComponent  lvpItems[];
  LabelValuePanel    lvp;

        workPanel = new JPanel();
  workGridbag = new GridBagLayout();
  workPanel.setLayout(workGridbag);
  workConstraints = new GridBagConstraints();

  workConstraints.gridx = 0;
  workConstraints.anchor = GridBagConstraints.WEST;
  workConstraints.fill = GridBagConstraints.NONE;
  workConstraints.insets = new Insets(5, 0, 5, 0);
  workConstraints.ipadx = 0;
  workConstraints.ipady = 0;
  workConstraints.weightx = 1.0;

  lvpItems = new LabelledComponent[3];

  logLevelCb = new JComboBox(BKR_LOG_LEVEL_VALID_VALUES);
  tmpLabelC = new LabelledComponent(
    acr.getString(acr.I_BROKER_LOG_LEVEL),
    logLevelCb);
  lvpItems[0] = tmpLabelC;

        logRolloverSizeBF = new BytesField(0, Integer.MAX_VALUE, "0", 10);
  logRolloverSizeSF = new SpecialValueField(logRolloverSizeBF,
      acr.getString(acr.I_BROKER_UNLIMITED));
        tmpLabelC = new LabelledComponent(
    acr.getString(acr.I_BROKER_LOG_ROLLOVER_SIZE),
                logRolloverSizeSF, LabelledComponent.NORTH);
  lvpItems[1] = tmpLabelC;

  logRolloverIntervalTF = new TimeField(Integer.MAX_VALUE, "0", 10);
  logRolloverIntervalSF = new SpecialValueField(logRolloverIntervalTF,
      acr.getString(acr.I_BROKER_UNLIMITED));
  tmpLabelC = new LabelledComponent(
    acr.getString(acr.I_BROKER_LOG_ROLLOVER_INTERVAL),
    logRolloverIntervalSF, LabelledComponent.NORTH);
  lvpItems[2] = tmpLabelC;

  lvp = new LabelValuePanel(lvpItems, 4, 5);
View Full Code Here

    public JPanel makeMsgTab()  {
        JPanel       workPanel;
  GridBagLayout     workGridbag;
  GridBagConstraints   workConstraints;
  LabelledComponent  tmpLabelC;
  LabelledComponent  lvpItems[];
  LabelValuePanel    lvp;

        workPanel = new JPanel();
  workGridbag = new GridBagLayout();
  workPanel.setLayout(workGridbag);
  workConstraints = new GridBagConstraints();

  workConstraints.gridx = 0;
  workConstraints.anchor = GridBagConstraints.WEST;
  workConstraints.fill = GridBagConstraints.NONE;
  workConstraints.insets = new Insets(5, 0, 5, 0);
  workConstraints.ipadx = 0;
  workConstraints.ipady = 0;
  workConstraints.weightx = 1.0;

  lvpItems = new LabelledComponent[3];

  maxNumMsgsInMemDskTF = new IntegerField(0, Integer.MAX_VALUE, 10);
  maxNumMsgsInMemDskSF = new SpecialValueField(maxNumMsgsInMemDskTF,
      acr.getString(acr.I_BROKER_UNLIMITED));
  tmpLabelC = new LabelledComponent(
    acr.getString(acr.I_BROKER_MAX_MSGS_IN_MEM_DSK),
    maxNumMsgsInMemDskSF, LabelledComponent.NORTH);
  lvpItems[0] = tmpLabelC;

  maxTtlSizeMsgsInMemDskBF = new BytesField(0, Integer.MAX_VALUE, "0", 10);
  maxTtlSizeMsgsInMemDskSF = new SpecialValueField(maxTtlSizeMsgsInMemDskBF,
      acr.getString(acr.I_BROKER_UNLIMITED));
  tmpLabelC = new LabelledComponent(
    acr.getString(acr.I_BROKER_MAX_TTL_SIZE_MSGS_IN_MEM_DSK),
    maxTtlSizeMsgsInMemDskSF, LabelledComponent.NORTH);
  lvpItems[1] = tmpLabelC;

  maxMsgSizeBF = new BytesField(0, Integer.MAX_VALUE, "0", 10);
  maxMsgSizeSF = new SpecialValueField(maxMsgSizeBF,
      acr.getString(acr.I_BROKER_UNLIMITED));
  tmpLabelC = new LabelledComponent(
    acr.getString(acr.I_BROKER_MAX_MSG_SIZE),
    maxMsgSizeSF, LabelledComponent.NORTH);
  lvpItems[2] = tmpLabelC;

  lvp = new LabelValuePanel(lvpItems, 4, 5);
View Full Code Here

    public JPanel createWorkPanel()  {
        JPanel       workPanel;
        GridBagLayout    workGridbag;
        GridBagConstraints  workConstraints;
  LabelledComponent  tmpLabelC;
  LabelledComponent  lvpItems[];
  LabelValuePanel    lvp;

        workPanel = new JPanel();

        tabbedPane = new JTabbedPane();
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.admin.apps.console.util.LabelledComponent

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.