static class JXLabel.Renderer extends WrappedPlainView
Modifier and Type | Field and Description |
---|---|
private ViewFactory |
factory |
private float |
height |
(package private) JXLabel |
host |
(package private) boolean |
invalidated |
private View |
view |
private float |
width |
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Constructor and Description |
---|
Renderer(JXLabel c,
ViewFactory f,
View v,
boolean wordWrap) |
Modifier and Type | Method and Description |
---|---|
AttributeSet |
getAttributes()
Fetches the attributes to use when rendering.
|
Container |
getContainer()
Fetches the container hosting the view.
|
Document |
getDocument()
Returns the document model underlying the view.
|
int |
getHeight() |
float |
getPreferredSpan(int axis) |
View |
getView(int n)
Gets the n-th view in this container.
|
int |
getViewCount()
Returns the number of views in this view.
|
ViewFactory |
getViewFactory()
Fetches the factory to be used for building the various view fragments that make up the view that represents
the model.
|
int |
getWidth() |
void |
paint(Graphics g,
Shape allocation)
Renders the view.
|
void |
preferenceChanged(View child,
boolean width,
boolean height) |
void |
setParent(View parent)
Sets the view parent.
|
void |
setSize(float width,
float height)
Sets the view size.
|
protected void |
updateLayout(DocumentEvent.ElementChange ec,
DocumentEvent e,
Shape a) |
calculateBreakPosition, changedUpdate, drawLine, drawSelectedText, drawUnselectedText, getLineBuffer, getMaximumSpan, getMinimumSpan, getTabSize, insertUpdate, loadChildren, nextTabStop, removeUpdate
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getOffset, getResizeWeight, getSpan, getViewAtPoint, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, replace, setAxis, viewToModel
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getViewAtPosition, getViewIndex, getViewIndexAtPosition, modelToView, setInsets, setParagraphInsets
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, viewToModel
boolean invalidated
private float width
private float height
private ViewFactory factory
Renderer(JXLabel c, ViewFactory f, View v, boolean wordWrap)
protected void updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a)
updateLayout
in class View
public void preferenceChanged(View child, boolean width, boolean height)
preferenceChanged
in class BoxView
public AttributeSet getAttributes()
getAttributes
in class View
public void paint(Graphics g, Shape allocation)
paint
in class WrappedPlainView
g
- the graphics contextallocation
- the region to render intopublic void setParent(View parent)
setParent
in class CompositeView
parent
- the parent viewpublic int getViewCount()
getViewCount
in class CompositeView
getView(int)
public View getView(int n)
getView
in class CompositeView
n
- the number of the view to getpublic Document getDocument()
getDocument
in class View
public void setSize(float width, float height)
setSize
in class WrappedPlainView
width
- the widthheight
- the heightpublic float getPreferredSpan(int axis)
getPreferredSpan
in class WrappedPlainView
public Container getContainer()
getContainer
in class View
public ViewFactory getViewFactory()
getViewFactory
in class View
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses