Package com.sun.messaging.jmq

Examples of com.sun.messaging.jmq.Version


 
  return leftPanel;
    }

    private JPanel makeRightPanel() {
  Version      version;
  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);

  label = new JLabel(acr.getString(acr.I_JAVA_VERSION)
             + System.getProperty("java.version") + " "
        + System.getProperty("java.vendor") + " "
        + System.getProperty("java.home"));
  c.gridx = 0;
  c.gridy = gridy++;
  c.insets = new Insets(5, 0, 0, 0);
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(label, c);
  rightPanel.add(label);

  String  classpathStr = System.getProperty("java.class.path");
  classpathStr = classpathStr.replace(File.pathSeparatorChar, '\n');
  ta = new JTextArea(classpathStr);
  ta.setEditable(false);
  ta.setLineWrap(true);
  ta.setWrapStyleWord(true);
  Color bgColor = rightPanel.getBackground();
  ta.setBackground(bgColor);
  Color fgColor = label.getForeground();
  ta.setForeground(fgColor);
  ta.setFont(label.getFont());
  width = label.getPreferredSize().width;
  ta.setSize(width, 1);
  tmpLabelC = new LabelledComponent(acr.getString(acr.I_JAVA_CLASSPATH),
        ta, LabelledComponent.NORTH);
  c.gridx = 0;
  c.gridy = gridy++;
  c.insets = new Insets(0, 0, 0, 0);
  c.anchor = GridBagConstraints.WEST;
  gridbag.setConstraints(tmpLabelC, c);
  rightPanel.add(tmpLabelC);

  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);

  ta = new JTextArea(version.getCopyright(Version.SHORT_COPYRIGHT), 8, 0);
  ta.setEditable(false);
  ta.setLineWrap(true);
  ta.setWrapStyleWord(true);
  bgColor = rightPanel.getBackground();
  ta.setBackground(bgColor);
View Full Code Here


                  oldVal, newVal));
    }

    private void initProps() {
  brokerProps = Globals.getConfig().toProperties();
  Version version = Globals.getVersion();
  brokerProps.putAll(version.getProps());
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.Version

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.