Package java.awt.event

Examples of java.awt.event.HierarchyListener


        }
        frame.addPropertyChangeListener(propertyChangeListener);

        // propertyChangeListener will be uninstalled
        // when title pane is removed from internal frame
        addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(final HierarchyEvent e) {
                if (e.getChanged() == BasicInternalFrameTitlePane.this
                        && (e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0
                        && !frame.isAncestorOf(BasicInternalFrameTitlePane.this)) {
                    uninstallListeners();
View Full Code Here


            public void actionPerformed(final ActionEvent e) {
                approveButton.getAction().actionPerformed(e);
            }
        });

        fc.addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(final HierarchyEvent e) {
                if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0
                    && fc.isShowing()) {
                    fileNameField.requestFocus();
                    fileNameField.selectAll();
View Full Code Here

            public void actionPerformed(final ActionEvent e) {
                approveButton.getAction().actionPerformed(e);
            }
        });

        fc.addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(final HierarchyEvent e) {
                if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0
                    && fc.isShowing()) {
                    fileNameField.requestFocus();
                    fileNameField.selectAll();
View Full Code Here

    @Override
    protected void installListeners() {
        if (WindowsLookAndFeel.isOnVista()) {
            installWindowListener();
            hierarchyListener =
                new HierarchyListener() {
                    public void hierarchyChanged(HierarchyEvent e) {
                        if ((e.getChangeFlags()
                                & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0) {
                            if (menuBar.isDisplayable()) {
                                installWindowListener();
View Full Code Here

     * is displayed, we need to invoke the isEnabled method on the action to enable / disable the menu
     * @param menuCmd
     */
    private static void monitor(final JMenuItem menuCmd) {
      installMonitorForParent(menuCmd);
      menuCmd.addHierarchyListener(new HierarchyListener() {
        public void hierarchyChanged(HierarchyEvent e) {
          if (e.getID() == HierarchyEvent.HIERARCHY_CHANGED && (e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
            installMonitorForParent(menuCmd);
          }
        }
View Full Code Here

     * is displayed, we need to invoke the isEnabled method on the action to enable / disable the menu
     * @param menuCmd
     */
    private static void monitor(final JMenuItem menuCmd) {
      installMonitorForParent(menuCmd);
      menuCmd.addHierarchyListener(new HierarchyListener() {
        public void hierarchyChanged(HierarchyEvent e) {
          if (e.getID() == HierarchyEvent.HIERARCHY_CHANGED && (e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
            installMonitorForParent(menuCmd);
          }
        }
View Full Code Here

     * is displayed, we need to invoke the isEnabled method on the action to enable / disable the menu
     * @param menuCmd
     */
    private static void monitor(final JMenuItem menuCmd) {
      installMonitorForParent(menuCmd);
      menuCmd.addHierarchyListener(new HierarchyListener() {
        public void hierarchyChanged(HierarchyEvent e) {
          if (e.getID() == HierarchyEvent.HIERARCHY_CHANGED && (e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
            installMonitorForParent(menuCmd);
          }
        }
View Full Code Here

        final DropTarget dt = new DropTarget();
        dt.addDropTargetListener(dropListener);

        // Listen for hierarchy changes and remove the
        // drop target when the parent gets cleared out.
        c.addHierarchyListener(new HierarchyListener()
        {
            public void hierarchyChanged(HierarchyEvent evt)
            {
                final Component parent = c.getParent();
                if (parent == null) {
View Full Code Here

    @Override
    protected void installListeners() {
        if (WindowsLookAndFeel.isOnVista()) {
            installWindowListener();
            hierarchyListener =
                new HierarchyListener() {
                    public void hierarchyChanged(HierarchyEvent e) {
                        if ((e.getChangeFlags()
                                & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0) {
                            if (menuBar.isDisplayable()) {
                                installWindowListener();
View Full Code Here

                          final boolean addStyleBox) throws HeadlessException {
    super();
    this.modeController = modeController;
    this.addStyleBox = addStyleBox;
    this.uiFactory = uiFactory;
    addHierarchyListener(new HierarchyListener() {
     
      public void hierarchyChanged(HierarchyEvent e) {
        if(isDisplayable()){
          removeHierarchyListener(this);
          init();
View Full Code Here

TOP

Related Classes of java.awt.event.HierarchyListener

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.