< prev index next >

src/java.desktop/share/classes/javax/swing/text/View.java

Print this page




 212      *  the view is visible or not.  By default
 213      *  all views are visible.
 214      *
 215      *  @return always returns true
 216      */
 217     public boolean isVisible() {
 218         return true;
 219     }
 220 
 221 
 222     /**
 223      * Determines the preferred span for this view along an
 224      * axis.
 225      *
 226      * @param axis may be either <code>View.X_AXIS</code> or
 227      *          <code>View.Y_AXIS</code>
 228      * @return   the span the view would like to be rendered into.
 229      *           Typically the view is told to render into the span
 230      *           that is returned, although there is no guarantee.
 231      *           The parent may choose to resize or break the view

 232      */
 233     public abstract float getPreferredSpan(int axis);
 234 
 235     /**
 236      * Determines the minimum span for this view along an
 237      * axis.
 238      *
 239      * @param axis may be either <code>View.X_AXIS</code> or
 240      *          <code>View.Y_AXIS</code>
 241      * @return  the minimum span the view can be rendered into
 242      * @see View#getPreferredSpan
 243      */
 244     public float getMinimumSpan(int axis) {
 245         int w = getResizeWeight(axis);
 246         if (w == 0) {
 247             // can't resize
 248             return getPreferredSpan(axis);
 249         }
 250         return 0;
 251     }




 212      *  the view is visible or not.  By default
 213      *  all views are visible.
 214      *
 215      *  @return always returns true
 216      */
 217     public boolean isVisible() {
 218         return true;
 219     }
 220 
 221 
 222     /**
 223      * Determines the preferred span for this view along an
 224      * axis.
 225      *
 226      * @param axis may be either <code>View.X_AXIS</code> or
 227      *          <code>View.Y_AXIS</code>
 228      * @return   the span the view would like to be rendered into.
 229      *           Typically the view is told to render into the span
 230      *           that is returned, although there is no guarantee.
 231      *           The parent may choose to resize or break the view
 232      * @see View#getPreferredSpan
 233      */
 234     public abstract float getPreferredSpan(int axis);
 235 
 236     /**
 237      * Determines the minimum span for this view along an
 238      * axis.
 239      *
 240      * @param axis may be either <code>View.X_AXIS</code> or
 241      *          <code>View.Y_AXIS</code>
 242      * @return  the minimum span the view can be rendered into
 243      * @see View#getPreferredSpan
 244      */
 245     public float getMinimumSpan(int axis) {
 246         int w = getResizeWeight(axis);
 247         if (w == 0) {
 248             // can't resize
 249             return getPreferredSpan(axis);
 250         }
 251         return 0;
 252     }


< prev index next >