Home » openjdk-7 » javax » swing » text » [javadoc | source]
public class: IconView [javadoc | source]

All Implemented Interfaces:

Icon decorator that implements the view interface. The entire element is used to represent the icon. This acts as a gateway from the display-only View implementations to interactive lightweight icons (that is, it allows icons to be embedded into the View hierarchy. The parent of the icon is the container that is handed out by the associated view factory.
Fields inherited from javax.swing.text.View:
BadBreakWeight,  GoodBreakWeight,  ExcellentBreakWeight,  ForcedBreakWeight,  X_AXIS,  Y_AXIS,  sharedBiasReturn
 public IconView(Element elem) 
    Creates a new icon view that represents an element.
    elem - the element to create a view for
Method from javax.swing.text.IconView Summary:
getAlignment,   getPreferredSpan,   modelToView,   paint,   viewToModel
Methods from javax.swing.text.View:
append,   breakView,   changedUpdate,   createFragment,   forwardUpdate,   forwardUpdateToView,   getAlignment,   getAttributes,   getBreakWeight,   getChildAllocation,   getContainer,   getDocument,   getElement,   getEndOffset,   getGraphics,   getMaximumSpan,   getMinimumSpan,   getNextVisualPositionFrom,   getParent,   getPreferredSpan,   getResizeWeight,   getStartOffset,   getToolTipText,   getView,   getViewCount,   getViewFactory,   getViewIndex,   getViewIndex,   insert,   insertUpdate,   isVisible,   modelToView,   modelToView,   modelToView,   paint,   preferenceChanged,   remove,   removeAll,   removeUpdate,   replace,   setParent,   setSize,   updateChildren,   updateLayout,   viewToModel,   viewToModel
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.IconView Detail:
 public float getAlignment(int axis) 
    Determines the desired alignment for this view along an axis. This is implemented to give the alignment to the bottom of the icon along the y axis, and the default along the x axis.
 public float getPreferredSpan(int axis) 
    Determines the preferred span for this view along an axis.
 public Shape modelToView(int pos,
    Shape a,
    Bias b) throws BadLocationException 
    Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
 public  void paint(Graphics g,
    Shape a) 
    Paints the icon. The real paint behavior occurs naturally from the association that the icon has with its parent container (the same container hosting this view), so this simply allows us to position the icon properly relative to the view. Since the coordinate system for the view is simply the parent containers, positioning the child icon is easy.
 public int viewToModel(float x,
    float y,
    Shape a,
    Bias[] bias) 
    Provides a mapping from the view coordinate space to the logical coordinate space of the model.