Examples of HierarchyListener


Examples of java.awt.event.HierarchyListener

    }

    protected ComponentView(ViewContext viewContext) {
        this.viewContext = viewContext;
        this.component = initComponent();
        this.component.addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged(HierarchyEvent e) {
                if (e.getChangeFlags() == HierarchyEvent.SHOWING_CHANGED) {
                    if (!first) {
                        onVisible();
                        first = true;
View Full Code Here

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

Examples of java.awt.event.HierarchyListener

            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

Examples of java.awt.event.HierarchyListener

            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

Examples of java.awt.event.HierarchyListener

    @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

Examples of java.awt.event.HierarchyListener

     * 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

Examples of java.awt.event.HierarchyListener

     * 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

Examples of java.awt.event.HierarchyListener

     * 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

Examples of java.awt.event.HierarchyListener

        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

Examples of java.awt.event.HierarchyListener

    @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
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.