< prev index next >

src/java.desktop/share/classes/javax/swing/JComponent.java

Print this page




5032         paintImmediately(r.x,r.y,r.width,r.height);
5033     }
5034 
5035     /**
5036      * Returns whether this component should be guaranteed to be on top.
5037      * For example, it would make no sense for <code>Menu</code>s to pop up
5038      * under another component, so they would always return true.
5039      * Most components will want to return false, hence that is the default.
5040      *
5041      * @return always returns false
5042      */
5043     // package private
5044     boolean alwaysOnTop() {
5045         return false;
5046     }
5047 
5048     void setPaintingChild(Component paintingChild) {
5049         this.paintingChild = paintingChild;
5050     }
5051 

5052     void _paintImmediately(int x, int y, int w, int h) {
5053         Graphics g;
5054         Container c;
5055         Rectangle b;
5056 
5057         int tmpX, tmpY, tmpWidth, tmpHeight;
5058         int offsetX=0,offsetY=0;
5059 
5060         boolean hasBuffer = false;
5061 
5062         JComponent bufferedComponent = null;
5063         JComponent paintingComponent = this;
5064 
5065         RepaintManager repaintManager = RepaintManager.currentManager(this);
5066         // parent Container's up to Window or Applet. First container is
5067         // the direct parent. Note that in testing it was faster to
5068         // alloc a new Vector vs keeping a stack of them around, and gc
5069         // seemed to have a minimal effect on this.
5070         java.util.List<Component> path = new java.util.ArrayList<Component>(7);
5071         int pIndex = -1;




5032         paintImmediately(r.x,r.y,r.width,r.height);
5033     }
5034 
5035     /**
5036      * Returns whether this component should be guaranteed to be on top.
5037      * For example, it would make no sense for <code>Menu</code>s to pop up
5038      * under another component, so they would always return true.
5039      * Most components will want to return false, hence that is the default.
5040      *
5041      * @return always returns false
5042      */
5043     // package private
5044     boolean alwaysOnTop() {
5045         return false;
5046     }
5047 
5048     void setPaintingChild(Component paintingChild) {
5049         this.paintingChild = paintingChild;
5050     }
5051 
5052     @SuppressWarnings("deprecation")
5053     void _paintImmediately(int x, int y, int w, int h) {
5054         Graphics g;
5055         Container c;
5056         Rectangle b;
5057 
5058         int tmpX, tmpY, tmpWidth, tmpHeight;
5059         int offsetX=0,offsetY=0;
5060 
5061         boolean hasBuffer = false;
5062 
5063         JComponent bufferedComponent = null;
5064         JComponent paintingComponent = this;
5065 
5066         RepaintManager repaintManager = RepaintManager.currentManager(this);
5067         // parent Container's up to Window or Applet. First container is
5068         // the direct parent. Note that in testing it was faster to
5069         // alloc a new Vector vs keeping a stack of them around, and gc
5070         // seemed to have a minimal effect on this.
5071         java.util.List<Component> path = new java.util.ArrayList<Component>(7);
5072         int pIndex = -1;


< prev index next >