API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. LabelView View Source
Author(s)
Timothy Prinzing
Since
Version
1.70 04/07/06
Serial
Hierarchy
 Object
      View
          GlyphView
              LabelView
Implements
 TabableView
Subclasses
Description
public class LabelView
  A LabelView is a styled chunk of text that represents a view mapped over an element in the text model.
See also:   
Constructors
public LabelView (Element elem)
  Constructs a new view wrapped on an element.
Methods
Hide/Show inherited methods
public void append (View v) [Inherited From View]
  Appends a single child view.
public View breakView (int axis, int p0, float pos, float len) [Inherited From GlyphView]
  Breaks this view on the given axis at the given length.
public void changedUpdate (DocumentEvent e, Shape a, ViewFactory f) [Overrides GlyphView]
  Gives notification from the document that attributes were changed in a location that this view is responsible for.
protected void checkPainter () [Inherited From GlyphView]
  Check to see that a glyph painter exists.
protectedfinal Object clone () [Inherited From GlyphView]
  Creates a shallow copy.
public View createFragment (int p0, int p1) [Inherited From GlyphView]
  Creates a view that represents a portion of the element.
protected void forwardUpdate (ElementChange ec, DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Forwards the given DocumentEvent to the child views that need to be notified of the change to the model.
protected void forwardUpdateToView (View v, DocumentEvent e, Shape a, ViewFactory f) [Inherited From View]
  Forwards the DocumentEvent to the give child view.
public float getAlignment (int axis) [Inherited From GlyphView]
  Determines the desired alignment for this view along an axis.
public AttributeSet getAttributes () [Inherited From View]
  Fetches the attributes to use when rendering.
public Color getBackground () [Overrides GlyphView]
  Fetches the background color to use to render the glyphs.
public int getBreakWeight (int axis, float pos, float len) [Inherited From GlyphView]
  Determines how attractive a break opportunity in this view is.
public Shape getChildAllocation (int index, Shape a) [Inherited From View]
  Fetches the allocation for the given child view.
public Container getContainer () [Inherited From View]
  Fetches the container hosting the view.
public Document getDocument () [Inherited From View]
  Fetches the model associated with the view.
public Element getElement () [Inherited From View]
  Fetches the structural portion of the subject that this view is mapped to.
public int getEndOffset () [Inherited From GlyphView]
  Fetches the portion of the model that this view is responsible for.
public Font getFont () [Overrides GlyphView]
  Fetches the font that the glyphs should be based upon.
@Deprecated
protected FontMetrics getFontMetrics ()
Fetches the FontMetrics used for this view.
public Color getForeground () [Overrides GlyphView]
  Fetches the foreground color to use to render the glyphs.
public GlyphPainter getGlyphPainter () [Inherited From GlyphView]
  Fetch the currently installed glyph painter.
public Graphics getGraphics () [Inherited From View]
  Fetch a Graphics for rendering.
pack-private JustificationInfo getJustificationInfo (int rowStartOffset) [Inherited From GlyphView]
public float getMaximumSpan (int axis) [Inherited From View]
  Determines the maximum span for this view along an axis.
public float getMinimumSpan (int axis) [Inherited From View]
  Determines the minimum span for this view along an axis.
public int getNextVisualPositionFrom (int pos, Bias b, Shape a, int direction, Bias biasRet) throws BadLocationException [Inherited From GlyphView]
  Provides a way to determine the next visually represented model location that one might place a caret.
public View getParent () [Inherited From View]
  Returns the parent of the view.
public float getPartialSpan (int p0, int p1) [Inherited From GlyphView]
  Determines the span along the same axis as tab expansion for a portion of the view.
public float getPreferredSpan (int axis) [Inherited From GlyphView] [Specified in View]
  Determines the preferred span for this view along an axis.
public int getResizeWeight (int axis) [Inherited From View]
  Determines the resizability of the view along the given axis.
public int getStartOffset () [Inherited From GlyphView]
  Fetches the portion of the model that this view is responsible for.
public float getTabbedSpan (float x, TabExpander e) [Inherited From GlyphView]
  Determines the desired span when using the given tab expansion implementation.
public TabExpander getTabExpander () [Inherited From GlyphView]
Fetch the TabExpander to use if tabs are present in this view.
public Segment getText (int p0, int p1) [Inherited From GlyphView]
  Fetch a reference to the text that occupies the given range.
public String getToolTipText (float x, float y, Shape allocation) [Inherited From View]
  Returns the tooltip text at the specified location.
public View getView (int n) [Inherited From View]
  Gets the nth child view.
public int getViewCount () [Inherited From View]
  Returns the number of views in this view.
public ViewFactory getViewFactory () [Inherited From View]
  Fetches the ViewFactory implementation that is feeding the view hierarchy.
public int getViewIndex (float x, float y, Shape allocation) [Inherited From View]
  Returns the child view index representing the given position in the view.
public int getViewIndex (int pos, Bias b) [Inherited From View]
  Returns the child view index representing the given position in the model.
public void insert (int offs, View v) [Inherited From View]
  Inserts a single child view.
public void insertUpdate (DocumentEvent e, Shape a, ViewFactory f) [Inherited From GlyphView]
  Gives notification that something was inserted into the document in a location that this view is responsible for.
public boolean isStrikeThrough () [Overrides GlyphView]
  Determines if the glyphs should have a strikethrough line.
public boolean isSubscript () [Overrides GlyphView]
  Determines if the glyphs should be rendered as superscript.
public boolean isSuperscript () [Overrides GlyphView]
  Determines if the glyphs should be rendered as subscript.
public boolean isUnderline () [Overrides GlyphView]
  Determines if the glyphs should be underlined.
public boolean isVisible () [Inherited From View]
  Returns a boolean that indicates whether the view is visible or not.
public Shape modelToView (int p0, Bias b0, int p1, Bias b1, Shape a) throws BadLocationException [Inherited From View]
  Provides a mapping, for a given region, from the document model coordinate space to the view coordinate space.
@Deprecated
public Shape modelToView (int pos, Shape a) throws BadLocationException [Inherited From View]
  Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
public Shape modelToView (int pos, Shape a, Bias b) throws BadLocationException [Inherited From GlyphView] [Specified in View]
  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) [Inherited From GlyphView] [Specified in View]
  Renders a portion of a text style run.
pack-privatefinal void paintTextUsingColor (Graphics g, Shape a, Color c, int p0, int p1) [Inherited From GlyphView]
Paints the specified region of text in the specified color.
public void preferenceChanged (View child, boolean width, boolean height) [Inherited From View]
  Child views can call this on the parent to indicate that the preference has changed and should be reconsidered for layout.
public void remove (int i) [Inherited From View]
  Removes one of the children at the given position.
public void removeAll () [Inherited From View]
  Removes all of the children.
public void removeUpdate (DocumentEvent e, Shape a, ViewFactory f) [Inherited From GlyphView]
  Gives notification that something was removed from the document in a location that this view is responsible for.
public void replace (int offset, int length, View views) [Inherited From View]
  Replaces child views.
protected void setBackground (Color bg)
  Sets the background color for the view.
public void setGlyphPainter (GlyphPainter p) [Inherited From GlyphView]
Sets the painter to use for rendering glyphs.
public void setParent (View parent) [Inherited From View]
  Establishes the parent view for this view.
protected void setPropertiesFromAttributes ()
Sets the cached properties from the attributes.
public void setSize (float width, float height) [Inherited From View]
  Sets the size of the view.
protected void setStrikeThrough (boolean s)
  Sets whether or not the view has a strike/line through it.
protected void setSubscript (boolean s)
  Sets whether or not the view represents a subscript.
protected void setSuperscript (boolean s)
  Sets whether or not the view represents a superscript.
protected void setUnderline (boolean u)
  Sets whether or not the view is underlined.
pack-privatefinal void sync ()
  Synchronize the view's cached values with the model.
protected boolean updateChildren (ElementChange ec, DocumentEvent e, ViewFactory f) [Inherited From View]
  Updates the child views in response to receiving notification that the model changed, and there is change record for the element this view is responsible for.
protected void updateLayout (ElementChange ec, DocumentEvent e, Shape a) [Inherited From View]
  Updates the layout in response to receiving notification of change from the model.
@Deprecated
public int viewToModel (float x, float y, Shape a) [Inherited From View]
  Provides a mapping from the view coordinate space to the logical coordinate space of the model.
public int viewToModel (float x, float y, Shape a, Bias biasReturn) [Inherited From GlyphView] [Specified in View]
  Provides a mapping from the view coordinate space to the logical coordinate space of the model.
Fields
Hide/Show inherited fields
publicfinalstatic int BadBreakWeight = "0" [Inherited From View]
  The weight to indicate a view is a bad break opportunity for the purpose of formatting.
pack-privatestatic GlyphPainter defaultPainter [Inherited From GlyphView]
The prototype painter used by default.
publicfinalstatic int ExcellentBreakWeight = "2000" [Inherited From View]
  The weight to indicate a view supports breaking, and this represents a very attractive place to break.
pack-private TabExpander expander [Inherited From GlyphView]
how to expand tabs
publicfinalstatic int ForcedBreakWeight = "3000" [Inherited From View]
  The weight to indicate a view supports breaking, and must be broken to be represented properly when placed in a view that formats its children by breaking them.
publicfinalstatic int GoodBreakWeight = "1000" [Inherited From View]
  The weight to indicate a view supports breaking, but better opportunities probably exist.
pack-private boolean impliedCR [Inherited From GlyphView]
pack-private int length [Inherited From GlyphView]
pack-private int offset [Inherited From GlyphView]
pack-private GlyphPainter painter [Inherited From GlyphView]
Glyph rendering functionality.
pack-privatefinalstatic Bias sharedBiasReturn [Inherited From View]
pack-private boolean skipWidth [Inherited From GlyphView]
pack-private int x [Inherited From GlyphView]
location for determining tab expansion against.
publicfinalstatic int X_AXIS = "0" [Inherited From View]
Axis for format/break operations.
publicfinalstatic int Y_AXIS = "1" [Inherited From View]
Axis for format/break operations.
Nested Classes
  GlyphView.JustificationInfo
Class to hold data needed to justify this GlyphView in a PargraphView.Row
  GlyphView.GlyphPainter
A class to perform rendering of the glyphs.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar