| Modifier and Type | Field and Description |
|---|---|
| private AttributeSet | |
| private CSS. | |
| private CSS. | |
| private StyleSheet. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected SizeRequirements | calculateMajorAxisRequirements(int axis, SizeRequirements r)
Overrides javax. Calculate the requirements of the block along the major axis (i.e. the axis along with it tiles). |
| protected SizeRequirements | calculateMinorAxisRequirements(int axis, SizeRequirements r)
Overrides javax. Calculate the requirements of the block along the minor axis (i.e. the axis orthogonal to the axis along with it tiles). |
| public void | changedUpdate(DocumentEvent changes, Shape a, ViewFactory f)
Overrides javax. Gives notification from the document that attributes were changed in a location that this view is responsible for. |
| private void | constrainSize(int axis, SizeRequirements want, SizeRequirements min)
Constrains |
| public float | Returns: the alignmentmay be either X_AXIS or Y_AXIS axis)Overrides javax. Gets the alignment. |
| public AttributeSet | getAttributes()
Overrides javax. Fetches the attributes to use when rendering. |
| public float | Returns: the span the view would like to be rendered into >= 0; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the viewmay be either axis)View.X_AXIS
or View.Y_AXISOverrides javax. Determines the maximum span for this view along an axis. |
| public float | Returns: the span the view would like to be rendered into >= 0; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the viewmay be either axis)View.X_AXIS
or View.Y_AXISOverrides javax. Determines the minimum span for this view along an axis. |
| public float | Returns: the span the view would like to be rendered into >= 0; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the viewmay be either axis)View.X_AXIS
or View.Y_AXISOverrides javax. Determines the preferred span for this view along an axis. |
| public int | Returns: the weightmay be either X_AXIS or Y_AXIS axis)Overrides javax. Gets the resize weight. |
| protected StyleSheet | |
| pack-priv boolean | |
| protected void | layoutMinorAxis(int
the total span given to the view, which
would be used to layout the children. targetSpan, int the axis being laid out axis, int[] the offsets from the origin of the view for
each of the child views; this is a return value and is
filled in by the implementation of this method offsets, int[] the span of each child view; this is a return
value and is filled in by the implementation of this method spans)Overrides javax. Performs layout for the minor axis of the box (i.e. the axis orthogonal to the axis that it represents). |
| public void | paint(Graphics
the rendering surface to use g, Shape the allocated region to render into allocation)Overrides javax. Renders using the given rendering surface and area on that surface. |
| public void | setParent(View
the new parent, or null if the view is
being removed from a parent it was previously added
to parent)Overrides javax. Establishes the parent view for this view. |
| protected void | |
| pack-priv static boolean | spanSetFromAttributes(int axis, SizeRequirements r, CSS.
Adjust the given requirements to the CSS width or height if it is specified along the applicable axis. |
| attr | back to summary |
|---|---|
| private AttributeSet attr | |
| cssHeight | back to summary |
|---|---|
| private CSS. | |
| cssWidth | back to summary |
|---|---|
| private CSS. | |
| painter | back to summary |
|---|---|
| private StyleSheet. | |
| BlockView | back to summary |
|---|---|
| public BlockView(Element elem, int axis) Creates a new view that represents an html box. This can be used for a number of elements.
| |
| calculateMajorAxisRequirements | back to summary |
|---|---|
| protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) Overrides javax. Calculate the requirements of the block along the major axis (i.e. the axis along with it tiles). This is implemented to provide the superclass behavior and then adjust it if the CSS width or height attribute is specified and applicable to the axis. | |
| calculateMinorAxisRequirements | back to summary |
|---|---|
| protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) Overrides javax. Calculate the requirements of the block along the minor axis (i.e. the axis orthogonal to the axis along with it tiles). This is implemented to provide the superclass behavior and then adjust it if the CSS width or height attribute is specified and applicable to the axis. | |
| changedUpdate | back to summary |
|---|---|
| public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Overrides javax. Doc from javax. Gives notification from the document that attributes were changed in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
| |
| constrainSize | back to summary |
|---|---|
| private void constrainSize(int axis, SizeRequirements want, SizeRequirements min) Constrains | |
| getAlignment | back to summary |
|---|---|
| public float getAlignment(int axis) Overrides javax. Gets the alignment.
| |
| getAttributes | back to summary |
|---|---|
| public AttributeSet getAttributes() Overrides javax. Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet. | |
| getMaximumSpan | back to summary |
|---|---|
| public float getMaximumSpan(int axis) Overrides javax. Determines the maximum span for this view along an axis.
| |
| getMinimumSpan | back to summary |
|---|---|
| public float getMinimumSpan(int axis) Overrides javax. Determines the minimum span for this view along an axis.
| |
| getPreferredSpan | back to summary |
|---|---|
| public float getPreferredSpan(int axis) Overrides javax. Determines the preferred span for this view along an axis.
| |
| getResizeWeight | back to summary |
|---|---|
| public int getResizeWeight(int axis) Overrides javax. Gets the resize weight.
| |
| getStyleSheet | back to summary |
|---|---|
| protected StyleSheet getStyleSheet() Convenient method to get the StyleSheet.
| |
| isPercentage | back to summary |
|---|---|
| pack-priv boolean isPercentage(int axis, AttributeSet a) | |
| layoutMinorAxis | back to summary |
|---|---|
| protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) Overrides javax. Performs layout for the minor axis of the box (i.e. the axis orthogonal to the axis that it represents). The results of the layout (the offset and span for each children) are placed in the given arrays which represent the allocations to the children along the minor axis.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, Shape allocation) Overrides javax. Renders using the given rendering surface and area on that surface. This is implemented to delegate to the css box painter to paint the border and background prior to the interior.
| |
| setParent | back to summary |
|---|---|
| public void setParent(View parent) Overrides javax. Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly.
This is implemented
to forward to the superclass as well as call the
| |
| setPropertiesFromAttributes | back to summary |
|---|---|
| protected void setPropertiesFromAttributes() Update any cached values that come from attributes. | |
| spanSetFromAttributes | back to summary |
|---|---|
| pack-priv static boolean spanSetFromAttributes(int axis, SizeRequirements r, CSS. Adjust the given requirements to the CSS width or height if it is specified along the applicable axis. Return true if the size is exactly specified, false if the span is not specified in an attribute or the size specified is a percentage. | |