Lines Matching defs:layer

62  *         <DD>The standard layer, where most components go. This the bottommost
63 * layer.
65 * <DD>The palette layer sits over the default layer. Useful for floating
68 * <DD>The layer used for modal dialogs. They will appear on top of any
71 * <DD>The popup layer displays above dialogs. That way, the popup windows
75 * <DD>When dragging a component, reassigning it to the drag layer ensures
77 * finished dragging, it can be reassigned to its normal layer.
81 * to reposition a component within its layer. The <code>setLayer</code> method
82 * can also be used to change the component's current layer.
87 * layers within itself. Children in the same layer are managed exactly
92 * Each layer is a distinct integer number. The layer attribute can be set
100 * The layer attribute can also be set on a Component by calling<PRE>
102 * on the <code>JLayeredPane</code> that is the parent of component. The layer
112 * layer by calling <code>moveToFront</code> or <code>moveToBack</code>.
114 * The position of a component within a layer can also be specified directly.
116 * components in that layer. A value of -1 indicates the bottommost
117 * position. A value of 0 indicates the topmost position. Unlike layer
121 * of the layer numbering sequence. Usually though, you will use <code>moveToFront</code>,
124 * Here are some examples using the method add(Component, layer, position):
139 * layer settings.
159 /** Convenience object defining the Default layer. Equivalent to new Integer(0).*/
161 /** Convenience object defining the Palette layer. Equivalent to new Integer(100).*/
163 /** Convenience object defining the Modal layer. Equivalent to new Integer(200).*/
165 /** Convenience object defining the Popup layer. Equivalent to new Integer(300).*/
167 /** Convenience object defining the Drag layer. Equivalent to new Integer(400).*/
169 /** Convenience object defining the Frame Content layer.
170 * This layer is normally only use to positon the contentPane and menuBar
179 // Hashtable to store layer values for non-JComponent components
195 Integer layer;
198 layer = null;
202 (layer = (Integer)((JComponent)c).
205 if(layer != null && layer.equals(FRAME_CONTENT_LAYER))
220 int layer;
224 layer = ((Integer)constraints).intValue();
225 setLayer(comp, layer);
227 layer = getLayer(comp);
229 pos = insertIndexForLayer(layer, index);
284 /** Sets the layer property on a JComponent. This method does not cause
290 * @param layer an int specifying the layer to move it to
293 public static void putLayer(JComponent c, int layer) {
294 /// MAKE SURE THIS AND setLayer(Component c, int layer, int position) are SYNCED
297 layerObj = new Integer(layer);
301 /** Gets the layer property for a JComponent, it
306 * @return an int specifying the component's layer
336 /** Sets the layer attribute on the specified component,
337 * making it the bottommost component in that layer.
340 * @param c the Component to set the layer for
341 * @param layer an int specifying the layer to set, where
344 public void setLayer(Component c, int layer) {
345 setLayer(c, layer, -1);
348 /** Sets the layer attribute for the specified component and
349 * also sets its position within that layer.
351 * @param c the Component to set the layer for
352 * @param layer an int specifying the layer to set, where
355 * layer, where 0 is the topmost position and -1
358 public void setLayer(Component c, int layer, int position) {
360 layerObj = getObjectForLayer(layer);
362 if(layer == getLayer(c) && position == getPosition(c)) {
367 /// MAKE SURE THIS AND putLayer(JComponent c, int layer) are SYNCED
378 int index = insertIndexForLayer(c, layer, position);
385 * Returns the layer attribute for the specified Component.
388 * @return an int specifying the component's current layer
422 * Moves the component to the top of the components in its current layer
433 * Moves the component to the bottom of the components in its current layer
444 * Moves the component to <code>position</code> within its current layer,
445 * where 0 is the topmost position within the layer and -1 is the bottommost
449 * is the opposite of layer numbering. Lower position numbers are closer
455 * components in the component's current layer
462 * Get the relative position of the component within its layer.
467 * count of components at that layer, minus 1
491 /** Returns the highest layer value from all current children.
494 * @return an int indicating the layer of the topmost component in the
503 /** Returns the lowest layer value from all current children.
506 * @return an int indicating the layer of the bottommost component in the
517 * Returns the number of children currently in the specified layer.
519 * @param layer an int specifying the layer to check
520 * @return an int specifying the number of components in that layer
522 public int getComponentCountInLayer(int layer) {
529 if(curLayer == layer) {
532 } else if(layerCount > 0 || curLayer < layer) {
541 * Returns an array of the components in the specified layer.
543 * @param layer an int specifying the layer to check
544 * @return an array of Components contained in that layer
546 public Component[] getComponentsInLayer(int layer) {
551 results = new Component[getComponentCountInLayer(layer)];
555 if(curLayer == layer) {
558 } else if(layerCount > 0 || curLayer < layer) {
604 * Returns the Integer object associated with a specified layer.
606 * @param layer an int specifying the layer
607 * @return an Integer object for that layer
609 protected Integer getObjectForLayer(int layer) {
611 switch(layer) {
628 layerObj = new Integer(layer);
635 * insert a new child based on layer and position requests.
637 * @param layer an int specifying the layer
638 * @param position an int specifying the position within the layer
643 protected int insertIndexForLayer(int layer, int position) {
644 return insertIndexForLayer(null, layer, position);
654 * @param layer an int specifying the layer
655 * @param position an int specifying the position within the layer
660 private int insertIndexForLayer(Component comp, int layer, int position) {
677 if (layerStart == -1 && curLayer == layer) {
680 if (curLayer < layer) {
682 // layer is greater than any current layer
683 // [ ASSERT(layer > highestLayer()) ]
693 // layer requested is lower than any current layer
694 // [ ASSERT(layer < lowestLayer()) ]
699 // In the case of a single layer entry handle the degenerative cases
715 // Otherwise return the end of the layer