classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: JLayeredPane API fix


From: Roman Kennke
Subject: [cp-patches] FYI: JLayeredPane API fix
Date: Wed, 20 Jul 2005 11:47:28 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

2005-07-20  Roman Kennke  <address@hidden>

       * javax/swing/JLayeredPane.java:
       Fixed and extended API documentation / class description.


/Roman

Index: javax/swing/JLayeredPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JLayeredPane.java,v
retrieving revision 1.23
diff -u -r1.23 JLayeredPane.java
--- javax/swing/JLayeredPane.java       2 Jul 2005 20:32:47 -0000       1.23
+++ javax/swing/JLayeredPane.java       20 Jul 2005 09:46:02 -0000
@@ -47,20 +47,41 @@
 import javax.accessibility.Accessible;
 
 /**
- * <p>The "Layered Pane" is a container which divides its children into 6 (or
- * more) disjoint sets. the pre-defined sets are:</p>
+ * A container that adds depth to the usual <code>Container</code> semantics.
+ * Each child component of a <code>Layered Pane</code> is placed within one
+ * of several layers. <code>JLayeredPane</code> defines a set of standard
+ * layers. The pre-defined sets are (in the order from button to top):
  *
- *  <ul>
- *    <li>"Frame Content"</li>
- *    <li>"Default"</li>
- *    <li>"Palette"</li>
- *    <li>"Modal"</li>
- *    <li>"Popup"</li>
- *    <li>"Drag"</li>
- *  </ul>
+ *  <dl>
+ *    <dt>address@hidden #DEFAULT_LAYER}</dt>
+ *    <dd>The layer where most of the normal components are placed. This
+ *      is the bottommost layer.</dd>
+ *
+ *    <dt>address@hidden #PALETTE_LAYER</dt>
+ *    <dd>Palette windows are placed in this layer.</dd>
+ *
+ *    <dt>address@hidden #MODAL_LAYER}</dt>
+ *    <dd>The layer where internal modal dialog windows are placed.</dd>
+ *
+ *    <dt>address@hidden #POPUP_LAYER</dt>
+ *    <dd>The layer for popup menus</dd>
+ *
+ *    <dt>address@hidden #DRAG_LAYER}</dt>
+ *    <dd>Components that are beeing dragged are temporarily placed in
+ *       this layer.</dd>
+ *  </dl>
  *
  * <p>A child is in exactly one of these layers at any time, though there may
  * be other layers if someone creates them.</p>
+ *
+ * <p>You can add a component to a specific layer using the
+ * address@hidden Container#add(Component, Object)} method. I.e.
+ * <code>layeredPane.add(comp, JLayeredPane.MODAL_LAYER)</code> will add the
+ * component <code>comp</code> to the modal layer of <code>layeredPane</code>.
+ * </p>
+ *
+ * <p>To change the layer of a component that is already a child of
+ * a <code>JLayeredPane</code>, use the address@hidden #setLayer} method.</p>
  *
  * <p>The purpose of this class is to translate this view of "layers" into a
  * contiguous array of components: the one held in our ancestor,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]