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

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


        JPanel                  basicPanel;
        GridBagLayout           basicGridbag;
        GridBagConstraints      basicConstraints;
        LabelledComponent       tmpLabelC;
        LabelledComponent       lvpItems[];
        LabelValuePanel         lvp;
  int      i = 0;

        basicPanel = new JPanel();
        basicGridbag = new GridBagLayout();
        basicConstraints = new GridBagConstraints();
        basicPanel.setLayout(basicGridbag);

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

  /*
         * Basic destination info: name, type, state
         */
        lvpItems = new LabelledComponent[3];

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

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

        destStateValue = new JLabel();
        tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_DEST_STATE) + ":",
                                        destStateValue);
        lvpItems[2] = tmpLabelC;

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 0;
        lvp = new LabelValuePanel(lvpItems, 4, 3);
        basicGridbag.setConstraints(lvp, basicConstraints);
        basicPanel.add(lvp);

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 1;
        basicConstraints.insets = new Insets(0, 0, 0, 0);
        basicConstraints.fill = GridBagConstraints.HORIZONTAL;
        JSeparator separator = new JSeparator();
        basicGridbag.setConstraints(separator, basicConstraints);
  basicPanel.add(separator);

        /*
         * Reset
         */
        basicConstraints.gridwidth = 1;
  basicConstraints.fill = GridBagConstraints.NONE;

  /*
         * Current number or message size / bytes info
         */
        lvpItems = new LabelledComponent[5];

        curNumMesgsValue = new JLabel();
        tmpLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_DEST_NUM_MSGS),
                         curNumMesgsValue);
        lvpItems[i++] = tmpLabelC;

        curNumMesgBytesValue = new JLabel();
        tmpLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_DEST_TTL_SIZE_MSGS),
                         curNumMesgBytesValue, acr.getString(acr.I_BYTES));
        lvpItems[i++] = tmpLabelC;

  curNumProducers = new JLabel();
        curNumProducersLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_DEST_NUM_PRODUCERS),
                         curNumProducers);
        lvpItems[i++] = curNumProducersLabelC;

  curNumActive = new JLabel();
        curNumActiveLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_CUR_NUM_ACTIVE),
                         curNumActive);
        lvpItems[i++] = curNumActiveLabelC;

  curNumFailover = new JLabel();
        curNumFailoverLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_CUR_NUM_FAILOVER),
                         curNumFailover);
        lvpItems[i++] = curNumFailoverLabelC;

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 2;
        basicConstraints.insets = new Insets(10, 0, 10, 0);
        lvp = new LabelValuePanel(lvpItems, 4, 5);
        basicGridbag.setConstraints(lvp, basicConstraints);
        basicPanel.add(lvp);

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 3;
        basicConstraints.insets = new Insets(0, 0, 0, 0);
        basicConstraints.fill = GridBagConstraints.HORIZONTAL;
        separator = new JSeparator();
        basicGridbag.setConstraints(separator, basicConstraints);
        basicPanel.add(separator);

        /*
         * Reset
         */
        basicConstraints.gridwidth = 1;
  basicConstraints.fill = GridBagConstraints.NONE;
  i = 0;

  lvpItems = new LabelledComponent[6];

  /*
   * Queue message limit
   */
        mesgLimitIF = new IntegerField(0, Integer.MAX_VALUE, 11);
        mesgLimitSF = new SpecialValueField(mesgLimitIF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  mesgLimitLabelC = new LabelledComponent
        (acr.getString(acr.I_BROKER_MAX_NUM_MSGS),
         mesgLimitSF, LabelledComponent.NORTH);
  lvpItems[i++] = mesgLimitLabelC;

  /*
   * Queue size limit
   */
        mesgSizeLimitBF = new BytesField(0, Long.MAX_VALUE, 11);
        mesgSizeLimitSF = new SpecialValueField(mesgSizeLimitBF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  mesgSizeLimitLabelC = new LabelledComponent
        (acr.getString(acr.I_BROKER_MAX_TTL_SIZE_MSGS),
         mesgSizeLimitSF, LabelledComponent.NORTH);
  lvpItems[i++] = mesgSizeLimitLabelC;

        /*
         * Destination Maximum Size per Message
         */
        maxSizePerMsgBF = new BytesField(0, Long.MAX_VALUE, 11);
        maxSizePerMsgSF = new SpecialValueField(maxSizePerMsgBF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  tmpLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_MAX_SIZE_PER_MSG),
       maxSizePerMsgSF, LabelledComponent.NORTH);
  lvpItems[i++] = tmpLabelC;

  /*
   * Max Producers
   */
        maxProducerIF = new IntegerField(0, Integer.MAX_VALUE, 11);
        maxProducerSF = new SpecialValueField(maxProducerIF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  maxProducerLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_MAX_PRODUCERS),
       maxProducerSF, LabelledComponent.NORTH);
  lvpItems[i++] = maxProducerLabelC;

  /*
   * Active Consumers
   */
        activeConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 11);
        activeConsumerSF = new SpecialValueField(activeConsumerIF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  activeConsumerLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_ACTIVE_CONSUMER),
       activeConsumerSF, LabelledComponent.NORTH);
  lvpItems[i++] = activeConsumerLabelC;

  /*
   * Failover Consumers
   */
        failoverConsumerIF = new IntegerField(0, Integer.MAX_VALUE, 11);
        failoverConsumerSF = new SpecialValueField(failoverConsumerIF,
        acr.getString(acr.I_BROKER_UNLIMITED));
  failoverConsumerLabelC = new LabelledComponent
      (acr.getString(acr.I_BROKER_FAILOVER_CONSUMER),
       failoverConsumerSF, LabelledComponent.NORTH);
  lvpItems[i++] = failoverConsumerLabelC;

        lvp = new LabelValuePanel(lvpItems, 4, 5);

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 4;
        basicConstraints.insets = new Insets(10, 0, 10, 0);
        basicGridbag.setConstraints(lvp, basicConstraints);
        basicPanel.add(lvp);

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 5;
        basicConstraints.insets = new Insets(0, 0, 0, 0);
        basicConstraints.fill = GridBagConstraints.HORIZONTAL;
        separator = new JSeparator();
        basicGridbag.setConstraints(separator, basicConstraints);
        basicPanel.add(separator);

        /*
         * Reset
         */
        basicConstraints.gridwidth = 1;
  basicConstraints.fill = GridBagConstraints.NONE;
  i = 0;

  /*
   * Limit Behavior, Use Dead Message Queue
   */
        lvpItems = new LabelledComponent[2];

        limitBehaviorCb = new JComboBox(BKR_LIMIT_BEHAV_VALID_VALUES);
  tmpLabelC = new LabelledComponent(
      acr.getString(acr.I_BROKER_LIMIT_BEHAVIOR),
      limitBehaviorCb);
        lvpItems[i++] = tmpLabelC;

        useDMQCkb = new JCheckBox();
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_BROKER_USE_DMQ),
      useDMQCkb);
        lvpItems[i++] = tmpLabelC;

        basicConstraints.gridx = 0;
        basicConstraints.gridy = 6;
        basicConstraints.insets = new Insets(10, 0, 10, 0);
        lvp = new LabelValuePanel(lvpItems, 4, 2);
        basicGridbag.setConstraints(lvp, basicConstraints);
        basicPanel.add(lvp);


  return (basicPanel);
View Full Code Here


               ":", factoryCombo, LabelledComponent.NORTH);
  }
        items[2] = new LabelledComponent(acr.getString(acr.I_READONLY) + ":",
                                         checkBox);

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

  c.gridx = 0;
  c.gridy = 0;
  c.anchor = GridBagConstraints.NORTHWEST;
  gridbag.setConstraints(panel1, c);
View Full Code Here

          addExtra = false;
      }

  }

  LabelValuePanel lvp = new LabelValuePanel(items, 5, 5);
  //
  // Append items to cfProps;
  //
  for (int i = 0; i < items.length; i++) {
      cfProps.add(items[i]);
View Full Code Here

   * Destination Properties
   */
  JPanel destPropsPanel = createDestPropsPanel();
        items[2] = new LabelledComponent("", destPropsPanel);

        LabelValuePanel lvp = new LabelValuePanel(items, 5, 5);
        workConstraints.gridx = 0;
        workConstraints.gridy = 4;
        workConstraints.gridwidth = 2;
        workConstraints.anchor = GridBagConstraints.CENTER;
        workGridbag.setConstraints(lvp, workConstraints);
View Full Code Here

  JPanel      rightPanel;
  GridBagLayout    gridbag;
  GridBagConstraints  c;
  JLabel      label;
  JSeparator    sep;
  LabelValuePanel    lvp;
  LabelledComponent  lvpItems[];
  LabelledComponent  tmpLabelC;
  JTextArea    ta;
  JScrollPane     sp;
  int      gridy = 0,
        width;

  version = new Version(false);
  rightPanel = new JPanel();
  gridbag = new GridBagLayout();
  rightPanel.setLayout(gridbag);
  c = new GridBagConstraints();

  label = new JLabel(version.getProductName() + " " + version.getReleaseQID());
  c.gridx = 0;
  c.gridy = gridy++;
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(label, c);
  rightPanel.add(label);

  label = new JLabel(acr.getString(acr.I_VERSION, version.getBuildVersion()));
  c.gridx = 0;
  c.gridy = gridy++;
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(label, c);
  rightPanel.add(label);

  label = new JLabel(acr.getString(acr.I_COMPILE, version.getBuildDate()));
  c.gridx = 0;
  c.gridy = gridy++;
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(label, c);
  rightPanel.add(label);

  sep = new JSeparator();
  c.gridx = 0;
  c.gridy = gridy++;
  c.fill = GridBagConstraints.HORIZONTAL;
  c.insets = new Insets(5, 0, 5, 0);
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(sep, c);
  rightPanel.add(sep);

  /*
   * Reset
   */
  c.fill = GridBagConstraints.NONE;
  c.insets = new Insets(0, 0, 0, 0);

  label = new JLabel(acr.getString(acr.I_VERSION_INFO,
        version.getVersionPackageName()));
  c.gridx = 0;
  gridy++;
  c.gridy = gridy++;
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(label, c);
  rightPanel.add(label);

  /*
   * Reset
   */
  c.insets = new Insets(0, 0, 0, 0);

  String[] patchids = version.getPatchIds();
  if (patchids == null || patchids.length < 1)
      lvpItems = new LabelledComponent[3];
  else
      lvpItems = new LabelledComponent[4];

  tmpLabelC = new LabelledComponent(acr.getString(acr.I_IMPLEMENTATION),
        new JLabel(version.getImplementationVersion()));
  lvpItems[0] = tmpLabelC;

  tmpLabelC = new LabelledComponent(acr.getString(acr.I_PROTOCOL_VERSION),
        new JLabel(version.getProtocolVersion()));
  lvpItems[1] = tmpLabelC;

  tmpLabelC = new LabelledComponent(acr.getString(acr.I_TARGET_JMS_VERSION),
        new JLabel(version.getTargetJMSVersion()));
  lvpItems[2] = tmpLabelC;

  // Append a PatchID Item and list of patchids only if they exist.
  // The Patchids are listed in a panel on the right.
  if (patchids != null && patchids.length >= 1) {
      JPanel patchPanel = new JPanel();
      GridBagLayout gb = new GridBagLayout();
      patchPanel.setLayout(gb);

      GridBagConstraints c2 = new GridBagConstraints();
      for (int p = 0; p < patchids.length; p++) {
                c2.gridx = 0;
                c2.gridy = p;
                c2.ipadx = 0;
                c2.ipady = 0;
                c2.anchor = GridBagConstraints.WEST;
              JLabel patchLabel = new JLabel(patchids[p]);
                gb.setConstraints(patchLabel, c2);
                patchPanel.add(patchLabel);
      }
      tmpLabelC = new LabelledComponent(acr.getString(acr.I_PATCHES), patchPanel,
                LabelledComponent.NORTH);
      lvpItems[3] = tmpLabelC;
  }
           
  lvp = new LabelValuePanel(lvpItems, 4, 0);
  c.gridx = 0;
  c.gridy = gridy++;
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(lvp, c);
  rightPanel.add(lvp);
View Full Code Here

TOP

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

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.