Examples of addHierarchyListener()


Examples of java.awt.Component.addHierarchyListener()

      else{
        popupForModel = null;
      }
      if (popupForModel != null) {
        final ControllerPopupMenuListener popupListener = new ControllerPopupMenuListener();
        popupForModel.addHierarchyListener(popupListener);
        popup = popupForModel;
      }
      else {
        popup = modeController.getUserInputListenerFactory().getMapPopup();
      }
View Full Code Here

Examples of javax.swing.JComponent.addHierarchyListener()

            if (propertyName.equals("demoComponent")) {
                Demo demo = (Demo)e.getSource();
                JComponent demoComponent = (JComponent)e.getNewValue();
                if (demoComponent != null) {
                    demoComponent.putClientProperty("swingset3.demo", demo);
                    demoComponent.addHierarchyListener(new DemoVisibilityListener());
                    registerPopups(demoComponent);
                }
            }
        }
    }
View Full Code Here

Examples of javax.swing.JComponent.addHierarchyListener()

  public void applicationReady()
  {
    JComponent comp = getPluginComponent();
    if (comp != null)
    {
      comp.addHierarchyListener(this);
    }
  }

  /**
   * Uninstalls the plugin and all of its modules.
View Full Code Here

Examples of javax.swing.JPanel.addHierarchyListener()

    attributeValues.setMaximumSize(comboBoxMaximumSize);
    attributeValues.setPreferredSize(comboBoxMaximumSize);
    gridBagConstraints.gridx++;
    panel.add(attributeValues, gridBagConstraints);
    //set focus to attributeNames
    panel.addHierarchyListener(new HierarchyListener() {
      public void hierarchyChanged(HierarchyEvent e) {
        final Component component = e.getComponent();
        if(component.isShowing()){
          attributeNames.requestFocus();
          component.removeHierarchyListener(this);
View Full Code Here

Examples of javax.swing.JPasswordField.addHierarchyListener()

            if (credentials == null) {
                // prompt for username and password
                JTextField uField = new JTextField(15);
                uField.setText(username);
                JPasswordField pField = new JPasswordField(15);
                pField.addHierarchyListener(new HierarchyListener() {
                    public void hierarchyChanged(HierarchyEvent e) {
                        final Component c = e.getComponent();
                        if (c.isShowing() && (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) {
                            Window toplevel = SwingUtilities.getWindowAncestor(c);
                            toplevel.addWindowFocusListener(new WindowAdapter() {
View Full Code Here

Examples of javax.swing.JPopupMenu.addHierarchyListener()

        final ModeController modeController = Controller.getCurrentModeController();
        final NodeModel node = Controller.getCurrentModeController().getMapController().getSelectedNode();
        final NodeView nodeView = mapView.getNodeView(node);
        final JPopupMenu popupmenu = modeController.getUserInputListenerFactory().getNodePopupMenu();
        if (popupmenu != null) {
          popupmenu.addHierarchyListener(new ControllerPopupMenuListener());
          final MainView mainView = nodeView.getMainView();
          popupmenu.show(mainView, mainView.getX(), mainView.getY());
        }
    }
  }
View Full Code Here

Examples of javax.swing.JSplitPane.addHierarchyListener()

      getDetectorTextPanel().setPreferredSize(preferredSize);
      scrollPane.setBorder(null);
      //mainPanel.add(getDetectorTextPanel(), "1, 9, 1, 9");

      final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, detectorPanel, getDetectorTextPanel());
      splitPane.addHierarchyListener(new HierarchyListener() {
        public void hierarchyChanged(final HierarchyEvent e) {
          if (e.getChangeFlags() == HierarchyEvent.SHOWING_CHANGED) {
            if (splitPane.isShowing()) {
              splitPane.setDividerLocation(0.75);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.