| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private AttributeSet | attr
View Attributes. |
| private float | |
| private float | |
| private String | |
| private float | |
| private int | |
| private static final int | |
| private static final int | |
| private float | |
| private CSS. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public View | breakView(int axis, int offset, float pos, float len)
Overrides javax. Tries to break this view on the given axis. |
| 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. |
| public AttributeSet | getAttributes()
Overrides javax. Fetches the attributes to use when rendering. |
| public int | Returns: the weight, which should be a value between ForcedBreakWeight and BadBreakWeight.may be either View.X_AXIS or View.Y_AXIS axis, float the potential location of the start of the
broken view (greater than or equal to zero).
This may be useful for calculating tab
positions. pos, float specifies the relative length from pos
where a potential break is desired. The value must be greater
than or equal to zero. len)Overrides javax. Determines how attractive a break opportunity in this view is. |
| private float | |
| public float | Returns: the desired spanmay be either X_AXIS or Y_AXIS axis)Implements abstract javax. Calculates the desired shape of the rule... |
| public int | Returns: the weightmay be either X_AXIS or Y_AXIS axis)Overrides javax. Gets the resize weight for the axis. |
| public Shape | Returns: the bounding box of the given positionthe position to convert pos, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
| public void | paint(Graphics
the graphics context g, Shape the allocation region for the view a)Implements abstract javax. Paints the view. |
| protected void | |
| public int | Returns: the location within the model that best represents the given point of viewthe X coordinate x, float the Y coordinate y, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
| alignment | back to summary |
|---|---|
| private int alignment | |
| attr | back to summary |
|---|---|
| private AttributeSet attr View Attributes. | |
| bottomMargin | back to summary |
|---|---|
| private float bottomMargin | |
| leftMargin | back to summary |
|---|---|
| private float leftMargin | |
| noshade | back to summary |
|---|---|
| private String noshade | |
| rightMargin | back to summary |
|---|---|
| private float rightMargin | |
| size | back to summary |
|---|---|
| private int size | |
| SPACE_ABOVE | back to summary |
|---|---|
| private static final int SPACE_ABOVE | |
| SPACE_BELOW | back to summary |
|---|---|
| private static final int SPACE_BELOW | |
| topMargin | back to summary |
|---|---|
| private float topMargin | |
| widthValue | back to summary |
|---|---|
| private CSS. | |
| HRuleView | back to summary |
|---|---|
| public HRuleView(Element elem) Creates a new view that represents an <hr> element.
| |
| breakView | back to summary |
|---|---|
| public View breakView(int axis, int offset, float pos, float len) Overrides javax. Doc from javax. Tries to break this view on the given axis. This is called by views that try to do formatting of their children. For example, a view of a paragraph will typically try to place its children into row and views representing chunks of text can sometimes be broken down into smaller pieces. This is implemented to return the view itself, which represents the default behavior on not being breakable. If the view does support breaking, the starting offset of the view returned should be the given offset, and the end offset should be less than or equal to the end offset of the view being broken. | |
| 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:
| |
| 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. | |
| getBreakWeight | back to summary |
|---|---|
| public int getBreakWeight(int axis, float pos, float len) Overrides javax. Determines how attractive a break opportunity in this view is. This is implemented to request a forced break.
| |
| getLength | back to summary |
|---|---|
| private float getLength(CSS. | |
| getPreferredSpan | back to summary |
|---|---|
| public float getPreferredSpan(int axis) Implements abstract javax. Calculates the desired shape of the rule... this is basically the preferred size of the border.
| |
| getResizeWeight | back to summary |
|---|---|
| public int getResizeWeight(int axis) Overrides javax. Gets the resize weight for the axis. The rule is: rigid vertically and flexible horizontally.
| |
| modelToView | back to summary |
|---|---|
| public Shape modelToView(int pos, Shape a, Position. Implements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, Shape a) Implements abstract javax. Paints the view.
| |
| setPropertiesFromAttributes | back to summary |
|---|---|
| protected void setPropertiesFromAttributes() Update any cached values that come from attributes. | |
| viewToModel | back to summary |
|---|---|
| public int viewToModel(float x, float y, Shape a, Position. Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model.
| |