| Constructor and Description |
|---|
BlockView(javax.swing.text.Element elem,
int axis)
Creates a new view that represents an html box.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.SizeRequirements |
calculateMajorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
Calculates the requirements along the major axis.
|
protected javax.swing.SizeRequirements |
calculateMinorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
Calculates the requirements along the minor axis.
|
void |
changedUpdate(javax.swing.event.DocumentEvent ev,
java.awt.Shape a,
javax.swing.text.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.
|
javax.swing.text.AttributeSet |
getAttributes()
Fetches the attributes to use when painting.
|
float |
getMaximumSpan(int axis)
Determines the maximum span along the axis.
|
float |
getMinimumSpan(int axis)
Determines the minimum span along the axis.
|
float |
getPreferredSpan(int axis)
Determines the preferred span along the axis.
|
int |
getResizeWeight(int axis)
Gets the resize weight.
|
protected StyleSheet |
getStyleSheet()
Gets the default style sheet.
|
protected void |
layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
Overridden to perform additional CSS layout (absolute/relative
positioning).
|
protected void |
layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
Lays out the box along the minor axis (the axis that is
perpendicular to the axis that it represents).
|
void |
paint(java.awt.Graphics g,
java.awt.Shape a)
Paints using the given graphics configuration and shape.
|
void |
replace(int offset,
int length,
javax.swing.text.View[] views)
Overridden to fetch additional CSS layout information.
|
void |
setParent(javax.swing.text.View parent)
Creates the parent view for this.
|
protected void |
setPropertiesFromAttributes()
Updates any cached values that come from attributes.
|
baselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, modelToView, paintChild, preferenceChanged, setAxis, setSize, viewToModelgetBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsetsappend, breakView, createFragment, dump, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModelpublic BlockView(javax.swing.text.Element elem, int axis)
elem - - the element to create a view foraxis - - either View.X_AXIS or View.Y_AXISpublic void setParent(javax.swing.text.View parent)
setParent in class javax.swing.text.CompositeViewparent - - the new parent, or null if the view
is being removed from a parent it was added to.protected javax.swing.SizeRequirements calculateMajorAxisRequirements(int axis, javax.swing.SizeRequirements r)
calculateMajorAxisRequirements in class javax.swing.text.BoxViewaxis - - the axis to check the requirements for.r - - the SizeRequirements. If null, one is created.protected javax.swing.SizeRequirements calculateMinorAxisRequirements(int axis, javax.swing.SizeRequirements r)
calculateMinorAxisRequirements in class javax.swing.text.BoxViewaxis - - the axis to check the requirements for.r - - the SizeRequirements. If null, one is created.protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
layoutMinorAxis in class javax.swing.text.BoxViewtargetSpan - - the total span given to the view, also
used to layout the children.axis - - the minor axisoffsets - - the offsets from the origin of the view for
all the child views. This is a return value and is filled in by this
function.spans - - the span of each child view. This is a return value and is
filled in by this function.protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
layoutMajorAxis in class javax.swing.text.BoxViewtargetSpan - the (inner) span of the BoxView in which
to layout the childrenaxis - the axis along which the layout is performedoffsets - the array that holds the offsets of the children on exitspans - the array that holds the spans of the children on exitpublic void paint(java.awt.Graphics g, java.awt.Shape a)
paint in class javax.swing.text.BoxViewg - - Graphics configurationa - - the Shape to render into.public javax.swing.text.AttributeSet getAttributes()
getAttributes in class javax.swing.text.Viewpublic int getResizeWeight(int axis) throws java.lang.IllegalArgumentException
getResizeWeight in class javax.swing.text.BoxViewaxis - - the axis to get the resize weight for.java.lang.IllegalArgumentException - - for an invalid axispublic float getAlignment(int axis)
getAlignment in class javax.swing.text.BoxViewaxis - - the axis to get the alignment for.public void changedUpdate(javax.swing.event.DocumentEvent ev, java.awt.Shape a, javax.swing.text.ViewFactory f)
changedUpdate in class javax.swing.text.Viewev - - the change informationa - - the current shape of the viewf - - the factory to use to rebuild if the view has children.public float getPreferredSpan(int axis) throws java.lang.IllegalArgumentException
getPreferredSpan in class javax.swing.text.BoxViewaxis - - the view to get the preferred span for.java.lang.IllegalArgumentException - - for an invalid axispublic float getMinimumSpan(int axis) throws java.lang.IllegalArgumentException
getMinimumSpan in class javax.swing.text.BoxViewaxis - - the axis to get the minimum span for.java.lang.IllegalArgumentException - - for an invalid axispublic float getMaximumSpan(int axis) throws java.lang.IllegalArgumentException
getMaximumSpan in class javax.swing.text.BoxViewaxis - - the axis to get the maximum span for.java.lang.IllegalArgumentException - - for an invalid axisprotected void setPropertiesFromAttributes()
protected StyleSheet getStyleSheet()
public void replace(int offset, int length, javax.swing.text.View[] views)
replace in class javax.swing.text.BoxViewoffset - the start offset from where to remove childrenlength - the number of children to removeviews - the views that replace the removed children