|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.View | +--javax.swing.text.CompositeView | +--javax.swing.text.BoxView | +--javax.swing.text.html.BlockView
A view implementation to display a block (as a box) with CSS specifications.
Fields inherited from class javax.swing.text.View |
BadBreakWeight,
ExcellentBreakWeight,
ForcedBreakWeight,
GoodBreakWeight,
X_AXIS,
Y_AXIS |
Constructor Summary | |
BlockView(Element elem,
int axis)
Creates a new view that represents an html box. |
Method Summary | |
protected SizeRequirements |
calculateMajorAxisRequirements(int axis,
SizeRequirements r)
Calculate the requirements of the block along the major axis (i.e. |
protected SizeRequirements |
calculateMinorAxisRequirements(int axis,
SizeRequirements r)
Calculate the requirements of the block along the minor axis (i.e. |
void |
changedUpdate(DocumentEvent changes,
Shape a,
ViewFactory f)
Gives notification from the document that attributes were changed in a location that this view is responsible for. |
float |
getAlignment(int axis)
Gets the alignment. |
AttributeSet |
getAttributes()
Fetches the attributes to use when rendering. |
int |
getResizeWeight(int axis)
Gets the resize weight. |
protected StyleSheet |
getStyleSheet()
|
void |
paint(Graphics g,
Shape allocation)
Renders using the given rendering surface and area on that surface. |
protected void |
setPropertiesFromAttributes()
Update any cached values that come from attributes. |
Methods inherited from class javax.swing.text.BoxView |
baselineLayout,
baselineRequirements,
childAllocation,
flipEastAndWestAtEnds,
getChildAllocation,
getHeight,
getMaximumSpan,
getMinimumSpan,
getOffset,
getPreferredSpan,
getSpan,
getViewAtPoint,
getWidth,
isAfter,
isAllocationValid,
isBefore,
layout,
layoutMajorAxis,
layoutMinorAxis,
modelToView,
paintChild,
preferenceChanged,
replace,
setSize,
viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
append,
getBottomInset,
getInsideAllocation,
getLeftInset,
getNextEastWestVisualPositionFrom,
getNextNorthSouthVisualPositionFrom,
getNextVisualPositionFrom,
getRightInset,
getTopInset,
getView,
getViewAtPosition,
getViewCount,
getViewIndexAtPosition,
insert,
insertUpdate,
loadChildren,
modelToView,
removeAll,
removeUpdate,
setInsets,
setParagraphInsets,
setParent |
Methods inherited from class javax.swing.text.View |
breakView,
createFragment,
getBreakWeight,
getContainer,
getDocument,
getElement,
getEndOffset,
getParent,
getStartOffset,
getViewFactory,
isVisible,
modelToView,
viewToModel |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public BlockView(Element elem, int axis)
elem
- the element to create a view foraxis
- either View.X_AXIS or View.Y_AXISMethod Detail |
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r)
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
public void paint(Graphics g, Shape allocation)
g
- the rendering surface to useallocation
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
public AttributeSet getAttributes()
public int getResizeWeight(int axis)
axis
- may be either X_AXIS or Y_AXISpublic float getAlignment(int axis)
axis
- may be either X_AXIS or Y_AXISpublic void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
e
- the change information from the associated documenta
- the current allocation of the viewf
- the factory to use to rebuild if the view has childrenView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
protected void setPropertiesFromAttributes()
protected StyleSheet getStyleSheet()
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |