All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.text.JLabelView
java.lang.Object
|
+----com.sun.java.swing.text.JView
|
+----com.sun.java.swing.text.JLabelView
- public class JLabelView
- extends JView
Styled chunk of text that represents a view mapped over a
text model.
-
JLabelView(Element)
-
-
JLabelView(Element, Range)
-
-
breakView(int, float, Shape)
-
-
changedUpdate(DocumentEvent, Shape, ViewFactory)
-
-
getBreakPenalty(int, float)
-
-
getPreferredShape(Shape, ViewFactory)
- Calculates the shape of the paragraph.
-
getRange()
-
-
insertUpdate(DocumentEvent, Shape, ViewFactory)
-
-
modelToView(Position, Shape, ViewFactory)
-
-
nextTabStop(int, FontMetrics)
- Returns the next tab stop position given a reference position
-
paint(Graphics, Shape, ViewFactory)
- Render a portion of a text style run
-
removeUpdate(DocumentEvent, Shape, ViewFactory)
-
-
shouldNotHappen(String)
-
-
viewToModel(Point, Shape, ViewFactory)
-
JLabelView
public JLabelView(Element elem,
Range rng)
JLabelView
public JLabelView(Element elem)
paint
public void paint(Graphics g,
Shape a,
ViewFactory f)
- Render a portion of a text style run
- Overrides:
- paint in class JView
getPreferredShape
public Shape getPreferredShape(Shape candidate,
ViewFactory f)
- Calculates the shape of the paragraph. The width is basically
whatever was given, but the height is calculated based upon
the width. If the width has changed, a new height is calculated,
otherwise the answer to the size request is cheap as it is
simply whatever the last layout produced.
- Overrides:
- getPreferredShape in class JView
- See Also:
- getPreferredShape
getRange
public Range getRange()
- Overrides:
- getRange in class JView
- See Also:
- getRange
modelToView
public Shape modelToView(Position pos,
Shape a,
ViewFactory f) throws BadLocation
- Throws: BadLocation
- If the given position does not represent a
valid location in the associated document.
- Overrides:
- modelToView in class JView
- See Also:
- modelToView
viewToModel
public Position viewToModel(Point pt,
Shape a,
ViewFactory f)
- Overrides:
- viewToModel in class JView
- See Also:
- viewToModel
insertUpdate
public void insertUpdate(DocumentEvent evnt,
Shape a,
ViewFactory f)
- Overrides:
- insertUpdate in class JView
- See Also:
- insertUpdate
removeUpdate
public void removeUpdate(DocumentEvent evnt,
Shape a,
ViewFactory f)
- Overrides:
- removeUpdate in class JView
- See Also:
- removeUpdate
changedUpdate
public void changedUpdate(DocumentEvent e,
Shape a,
ViewFactory f)
- Overrides:
- changedUpdate in class JView
- See Also:
- changedUpdate
getBreakPenalty
public int getBreakPenalty(int axis,
float len)
- Overrides:
- getBreakPenalty in class JView
- See Also:
- getBreakPenalty
breakView
public View breakView(int axis,
float span,
Shape a)
- Overrides:
- breakView in class JView
- See Also:
- breakView
nextTabStop
protected int nextTabStop(int x,
FontMetrics metrics)
- Returns the next tab stop position given a reference position
shouldNotHappen
protected void shouldNotHappen(String msg)
All Packages Class Hierarchy This Package Previous Next Index