Package javax.swing

Examples of javax.swing.JSeparator$AccessibleJSeparator


   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)
  {
    BasicSeparatorUI ui = new BasicSeparatorUI();
    JSeparator h = new JSeparator(JSeparator.HORIZONTAL);
    harness.check(ui.getPreferredSize(h), new Dimension(0, 2));
    JSeparator v = new JSeparator(JSeparator.VERTICAL);
    harness.check(ui.getPreferredSize(v), new Dimension(2, 0));
  }
View Full Code Here


    harness.checkPoint("testJSeparator");
    JPanel container = new JPanel();
    container.setSize(100, 200);
    BoxLayout layout = new BoxLayout(container, BoxLayout.Y_AXIS);
    container.setLayout(layout);
    JSeparator s1 = new JSeparator();
    container.add(s1);
    container.doLayout();
    harness.check(layout.preferredLayoutSize(container), new Dimension(0, 2));
  }
View Full Code Here

   
    JMenuItem mntmPasteFqn = new JMenuItem("Paste fqn");
    mntmPasteFqn.setName("paste-fqn-btn");
    popupMenu.add(mntmPasteFqn);
   
    JSeparator separator = new JSeparator();
    popupMenu.add(separator);
   
    JRadioButtonMenuItem rdbtnmntmOnline = new JRadioButtonMenuItem("Online");
    rdbtnmntmOnline.setName("online-rb");
    popupMenu.add(rdbtnmntmOnline);
   
    JRadioButtonMenuItem rdbtnmntmOffline = new JRadioButtonMenuItem("Offline");
    rdbtnmntmOffline.setName("offline-btn");
    popupMenu.add(rdbtnmntmOffline);
   
    JSeparator separator_1 = new JSeparator();
    popupMenu.add(separator_1);
   
    JMenuItem mntmUpdateOfflineRepo = new JMenuItem("Update offline repo");
    mntmUpdateOfflineRepo.setName("update-offline-repo-btn");
    popupMenu.add(mntmUpdateOfflineRepo);
View Full Code Here

  gridbag.setConstraints(checkBox, c);
/*
  panel1.add(checkBox);
*/
 
  JSeparator separator = new JSeparator();
  c.gridx = 0;
  c.gridy = 2;
  c.anchor = GridBagConstraints.CENTER;
  c.fill = GridBagConstraints.HORIZONTAL;
  c.insets = new Insets(5, 0, 5, 0);
View Full Code Here

  purgeItem = addMenuItem(actionsMenu, ActionManager.PURGE);
  purgeItem.setText(acr.getString(acr.I_MENU_PURGE_BROKER_DEST));
        purgeItem.setMnemonic(acr.getChar(acr.I_PURGE_MNEMONIC));


  actionsMenu.add(new JSeparator());

  connectItem = addMenuItem(actionsMenu, ActionManager.CONNECT);
  connectItem.setText(acr.getString(acr.I_MENU_CONNECT));
  connectItem.setMnemonic(acr.getChar(acr.I_CONNECT_MNEMONIC));

  disconnectItem = addMenuItem(actionsMenu, ActionManager.DISCONNECT);
  disconnectItem.setText(acr.getString(acr.I_MENU_DISCONNECT));
  disconnectItem.setMnemonic(acr.getChar(acr.I_DISCONNECT_MNEMONIC));

  actionsMenu.add(new JSeparator());

  queryBrokerItem = addMenuItem(actionsMenu, ActionManager.QUERY_BROKER);
  queryBrokerItem.setText(acr.getString(acr.I_MENU_QUERY_BROKER));
  queryBrokerItem.setMnemonic(acr.getChar(acr.I_QUERY_BROKER_MNEMONIC));

  pauseItem = addMenuItem(actionsMenu, ActionManager.PAUSE);
  pauseItem.setText(acr.getString(acr.I_MENU_PAUSE));
  pauseItem.setMnemonic(acr.getChar(acr.I_PAUSE_MNEMONIC));

  resumeItem = addMenuItem(actionsMenu, ActionManager.RESUME);
  resumeItem.setText(acr.getString(acr.I_MENU_RESUME));
  resumeItem.setMnemonic(acr.getChar(acr.I_RESUME_MNEMONIC));

  restartBrokerItem = addMenuItem(actionsMenu, ActionManager.RESTART);
  restartBrokerItem.setText(acr.getString(acr.I_MENU_RESTART_BROKER));
  restartBrokerItem.setMnemonic(acr.getChar(acr.I_RESTART_MNEMONIC));

  shutdownBrokerItem = addMenuItem(actionsMenu, ActionManager.SHUTDOWN);
  shutdownBrokerItem.setText(acr.getString(acr.I_MENU_SHUTDOWN_BROKER));
  shutdownBrokerItem.setMnemonic(acr.getChar(acr.I_SHUTDOWN_MNEMONIC));

  actionsMenu.add(new JSeparator());

  propsItem = addMenuItem(actionsMenu, ActionManager.PROPERTIES);
  propsItem.setText(acr.getString(acr.I_MENU_PROPERTIES));
  propsItem.setMnemonic(acr.getChar(acr.I_PROPERTIES_MNEMONIC));


  /*
   * View menu
   */
  viewMenu = (JMenu) this.add(new JMenu(acr.getString(acr.I_MENU_VIEW)));
  viewMenu.setMnemonic(acr.getChar(acr.I_VIEW_MNEMONIC));

  expandItem = addMenuItem(viewMenu, ActionManager.EXPAND_ALL);
  expandItem.setText(acr.getString(acr.I_MENU_EXPAND_ALL));
  expandItem.setMnemonic(acr.getChar(acr.I_EXPAND_ALL_MNEMONIC));

  collapseItem = addMenuItem(viewMenu, ActionManager.COLLAPSE_ALL);
  collapseItem.setText(acr.getString(acr.I_MENU_COLLAPSE_ALL));
  collapseItem.setMnemonic(acr.getChar(acr.I_COLLAPSE_ALL_MNEMONIC));

  viewMenu.add(new JSeparator());

  refreshItem = addMenuItem(viewMenu, ActionManager.REFRESH);
  refreshItem.setText(acr.getString(acr.I_MENU_REFRESH));
  refreshItem.setMnemonic(acr.getChar(acr.I_REFRESH_MNEMONIC));

  /*
   * Workaround for bug:
   * 4087846 - JMenuBar.setHelpMenu() => "not yet implemented"
   */
  this.add(Box.createGlue());

  /*
   * Help menu
   */
  helpMenu = (JMenu) this.add(new JMenu(acr.getString(acr.I_MENU_HELP)));
  helpMenu.setMnemonic(acr.getChar(acr.I_HELP_MNEMONIC))

  overviewItem = new JMenuItem(acr.getString(acr.I_OVERVIEW));
  overviewItem.setText(acr.getString(acr.I_MENU_OVERVIEW));
  helpMenu.add(overviewItem);
  if (ConsoleHelp.helpLoaded())  {
      HelpBroker hb = ConsoleHelp.hb[ConsoleHelp.CONSOLE_HELP];
      HelpSet hs = ConsoleHelp.hs[ConsoleHelp.CONSOLE_HELP];
      overviewItem.addActionListener(ConsoleHelp.hl[ConsoleHelp.CONSOLE_HELP]);
      // go to a specific area of overview.
      hb.enableHelp(overviewItem, ConsoleHelpID.INTRO, hs);
  } else {
      overviewItem.setEnabled(false);
  }

  helpMenu.add(new JSeparator());

  aboutItem = addMenuItem(helpMenu, ActionManager.ABOUT);
  aboutItem.setText(acr.getString(acr.I_MENU_ABOUT));
  aboutItem.setMnemonic(acr.getChar(acr.I_ABOUT_MNEMONIC));

View Full Code Here

  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;
View Full Code Here

 
  private JComponent createVSep()
  {
    final Box b = Box.createVerticalBox();
    b.add( Box.createVerticalStrut( 8 ));
    b.add( new JSeparator() );
    b.add( Box.createVerticalStrut( 8 ));
    return b;
  }
View Full Code Here

      gbc.gridy++;
    }

    if (!this.queryResult_succeeding.isEmpty()) {
      if (!this.queryResult_preceding.isEmpty()) {
        contentPanel.add(new JSeparator(), gbc);

        gbc.gridy++;
      }

      contentPanel
View Full Code Here

    gbc.gridx++;
    panel.add(jB_targetPath, gbc);
    gbc.gridx = 0;
    gbc.gridy++;
    gbc.gridwidth = 3;
    panel.add(new JSeparator(), gbc);
    gbc.gridy++;
    gbc.gridwidth = 1;
    panel.add(new JLabel("Documentation title:"), gbc);
    gbc.gridx++;
    gbc.gridwidth = 2;
    panel.add(jTF_documentationTitle, gbc);
    gbc.gridx = 0;
    gbc.gridy++;
    gbc.gridwidth = 3;
    panel.add(new JSeparator(), gbc);
    gbc.gridy++;
    gbc.gridwidth = 1;
    gbc.insets = new Insets(5, 5, 0, 5);
    panel.add(jRB_noImage, gbc);
    gbc.gridy++;
View Full Code Here

    gbc.gridx++;
    panel.add(jB_targetPath, gbc);
    gbc.gridx = 0;
    gbc.gridy++;
    gbc.gridwidth = 3;
    panel.add(new JSeparator(), gbc);
    gbc.gridx = 0;
    gbc.gridy++;
    gbc.gridwidth = 1;
    panel.add(new JLabel("Java Package:"), gbc);
    gbc.gridx++;
    gbc.gridwidth = 2;
    panel.add(jTF_package, gbc);
    gbc.gridx = 0;
    gbc.gridy++;
    gbc.gridwidth = 3;
    panel.add(new JSeparator(), gbc);
    gbc.gridx = 0;
    gbc.gridy++;
    gbc.gridwidth = 1;
    panel.add(new JLabel("generate start node map?"), gbc);
    gbc.gridx++;
View Full Code Here

TOP

Related Classes of javax.swing.JSeparator$AccessibleJSeparator

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.