Package java.awt.peer

Examples of java.awt.peer.ContainerPeer


            Component component[] = this.component;
            for (int i = 0 ; i < ncomponents ; i++) {
                component[i].addNotify();
            }
            // Update stacking order if native platform allows
            ContainerPeer cpeer = (ContainerPeer)peer;
            if (cpeer.isRestackSupported()) {
                cpeer.restack();
            }


        }
    }
View Full Code Here


            }


            // Update stacking order
            if (parent != null && parent.peer != null) {
                ContainerPeer parentContPeer = (ContainerPeer) parent.peer;
                // if our parent is lightweight and we are not
                // we should call restack on nearest heavyweight
                // container.
                if (parentContPeer instanceof LightweightPeer
                    && ! (peer instanceof LightweightPeer))
                {
                    Container hwParent = getNativeContainer();
                    if (hwParent != null && hwParent.peer != null) {
                        parentContPeer = (ContainerPeer) hwParent.peer;
                    }
                }
                if (parentContPeer.isRestackSupported()) {
                    parentContPeer.restack();
                }
            }

            if (!isAddNotifyComplete) {
                addPropertyChangeListener("opaque", opaquePropertyChangeListener);
View Full Code Here

  public void validate()
  {
    ComponentPeer p = peer;
    if (! valid && p != null)
      {
        ContainerPeer cPeer = null;
        if (p instanceof ContainerPeer)
          cPeer = (ContainerPeer) peer;
        synchronized (getTreeLock ())
          {
            if (cPeer != null)
              cPeer.beginValidate();
            validateTree();
            valid = true;
            if (cPeer != null)
              cPeer.endValidate();
          }
      }
  }
View Full Code Here

   */
  protected void validateTree()
  {
    if (!valid)
      {
        ContainerPeer cPeer = null;
        if (peer instanceof ContainerPeer)
          {
            cPeer = (ContainerPeer) peer;
            cPeer.beginLayout();
          }

        doLayout ();
        for (int i = 0; i < ncomponents; ++i)
          {
            Component comp = component[i];

            if (comp instanceof Container && ! (comp instanceof Window)
                && ! comp.valid)
              {
                ((Container) comp).validateTree();
              }
            else
              {
                comp.validate();
              }
          }

        if (cPeer != null)
          {
            cPeer = (ContainerPeer) peer;
            cPeer.endLayout();
          }
      }

    /* children will call invalidate() when they are layed out. It
       is therefore important that valid is not set to true
View Full Code Here

   
    if (isLightweight && visible) {
        // Get HW ancestor peer
        Container hwAncestor = parent;
        for(; hwAncestor != null && hwAncestor.isLightweight(); hwAncestor = hwAncestor.parent);
        ContainerPeer hwAncestorPeer = (hwAncestor != null) &&
      hwAncestor.peer instanceof ContainerPeer ?
      (ContainerPeer)hwAncestor.peer : null;

        needRepaint = (hwAncestorPeer != null && hwAncestor.visible
           && !hwAncestorPeer.isPaintPending());
    }
                }
      if (needRepaint) {
    // Have the parent redraw the area this component occupied.
    parent.repaint(oldX, oldY, oldWidth, oldHeight);       
View Full Code Here

      peerFont = getFont();

            // Update stacking order
            if (parent != null && parent.peer != null) {
                ContainerPeer parentContPeer = (ContainerPeer)parent.peer;
                if (parentContPeer.isRestackSupported()) {
                    parentContPeer.restack();
                }
            }

            if (hierarchyListener != null ||
                (eventMask & AWTEvent.HIERARCHY_EVENT_MASK) != 0 ||
View Full Code Here

     * @deprecated As of JDK version 1.1,
     * replaced by <code>getInsets()</code>.
     */
    public Insets insets() {
  if (this.peer != null && this.peer instanceof ContainerPeer) {
      ContainerPeer peer = (ContainerPeer)this.peer;
      return (Insets)peer.insets().clone();
  }
  return new Insets(0, 0, 0, 0);
    }
View Full Code Here

        /* Avoid grabbing lock unless really necessary. */
  if (!valid) {
      boolean updateCur = false;
      synchronized (getTreeLock()) {
    if (!valid && peer != null) {
        ContainerPeer p = null;
        if (peer instanceof ContainerPeer) {
      p = (ContainerPeer) peer;
        }
        if (p != null) {
      p.beginValidate();
        }
        validateTree();
        valid = true;
        if (p != null) {
      p.endValidate();
      updateCur = isVisible();
        }
    }
      }     
      if (updateCur) {
View Full Code Here

            Component component[] = this.component;
      for (int i = 0 ; i < ncomponents ; i++) {
          component[i].addNotify();
      }
            // Update stacking order if native platform allows
            ContainerPeer cpeer = (ContainerPeer)peer;
            if (cpeer.isRestackSupported()) {
                cpeer.restack();
            }


        }
    }
View Full Code Here

     */
    @Deprecated
    public Insets insets() {
        ComponentPeer peer = this.peer;
        if (peer instanceof ContainerPeer) {
            ContainerPeer cpeer = (ContainerPeer)peer;
            return (Insets)cpeer.getInsets().clone();
        }
        return new Insets(0, 0, 0, 0);
    }
View Full Code Here

TOP

Related Classes of java.awt.peer.ContainerPeer

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.