Package java.awt.event

Examples of java.awt.event.HierarchyListener


                });
            }
            else {
                // Hierarchy events are fired in direct response to
                // displayability changes
                w.addHierarchyListener(new HierarchyListener() {
                    public void hierarchyChanged(HierarchyEvent e) {
                        if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0
                            && e.getComponent().isDisplayable()) {
                            e.getComponent().removeHierarchyListener(this);
                            action.run();
View Full Code Here


  NativeComponentProxyPanel(NativeComponentWrapper nativeComponentWrapper, boolean isVisibilityConstrained, boolean isDestructionOnFinalization, boolean isProxiedFiliation) {
    super(nativeComponentWrapper);
    this.isDestructionOnFinalization = isDestructionOnFinalization;
    this.isVisibilityConstrained = isVisibilityConstrained;
    hierarchyListener = new HierarchyListener() {
      public void hierarchyChanged(HierarchyEvent e) {
        long changeFlags = e.getChangeFlags();
        if((changeFlags & (HierarchyEvent.SHOWING_CHANGED)) != 0) {
          if(NativeComponentProxyPanel.this.isVisibilityConstrained) {
            adjustEmbeddedPanelShape();
View Full Code Here

                });
            }
            else {
                // Hierarchy events are fired in direct response to
                // displayability changes
                w.addHierarchyListener(new HierarchyListener() {
                    public void hierarchyChanged(HierarchyEvent e) {
                        if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0
                            && e.getComponent().isDisplayable()) {
                            e.getComponent().removeHierarchyListener(this);
                            action.run();
View Full Code Here

  public NativeComponentWrapper(Component nativeComponent) {
    this.nativeComponent = nativeComponent;
    // Check that it does not have already a parent
    checkParent();
    // Add a check to ensure that its parent is an embeddable component.
    nativeComponent.addHierarchyListener(new HierarchyListener() {
      public void hierarchyChanged(HierarchyEvent e) {
        long changeFlags = e.getChangeFlags();
        if((changeFlags & HierarchyEvent.PARENT_CHANGED) != 0) {
          checkParent();
        }
View Full Code Here

    /**
     * Lets this controller know about the panel that it is controlling.
     */
    public void setControlledPanel (final JComponent panel)
    {
        panel.addHierarchyListener(new HierarchyListener() {
            public void hierarchyChanged (HierarchyEvent e) {
                boolean nowShowing = panel.isDisplayable();
                //System.err.println("Controller." + Controller.this +
                //    "  nowShowing=" + nowShowing +
                //    ", wasShowing=" + _showing);
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.