| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | TextLayoutStrategy.
Implementation of AttributedCharacterIterator that supports the GlyphView attributes for rendering the glyphs through a TextLayout. |
| Modifier and Type | Field and Description |
|---|---|
| private LineBreakMeasurer | |
| private TextLayoutStrategy. |
| Access | Constructor and Description |
|---|---|
| public | TextLayoutStrategy()
Constructs a layout strategy for paragraphs based upon java.awt.font.LineBreakMeasurer. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | adjustRow(FlowView fv, int
the row to adjust to the current layout
span. rowIndex, int the current layout span >= 0 desiredSpan, int the location r starts at. x)Overrides javax. Adjusts the given row if possible to fit within the layout span. |
| public void | changedUpdate(FlowView fv, DocumentEvent
the change information from the associated document e, Rectangle the current allocation of the view inside of the insets. alloc)Overrides javax. Gives notification from the document that attributes were changed in a location that this view is responsible for. |
| protected View | createView(FlowView
the view holding the flow fv, int the start location for the view being created startOffset, int the amount of span left to fill in the row spanLeft, int the row the view will be placed into rowIndex)Overrides javax. Creates a unidirectional view that can be used to represent the current chunk. |
| pack-priv int | getLimitingOffset(View
the logical view representing the starting offset. v, int the model location to start at. startOffset, int spanLeft, boolean requireNextWord)Calculate the limiting offset for the next view fragment. |
| public void | insertUpdate(FlowView fv, DocumentEvent
the change information from the associated document e, Rectangle the current allocation of the view inside of the insets.
This value will be null if the view has not yet been displayed. alloc)Overrides javax. Gives notification that something was inserted into the document in a location that the given flow view is responsible for. |
| public void | layout(FlowView
the view to reflow fv)Overrides javax. Does a full layout on the given View. |
| protected int | Returns: the position to start the next rowthe row to fill in with views. This is assumed
to be empty on entry. rowIndex, int The current position in the children of
this view element from which to start. p0)Overrides javax. Creates a row of views that will fit within the layout span of the row. |
| public void | removeUpdate(FlowView fv, DocumentEvent
the change information from the associated document e, Rectangle the current allocation of the view inside of the insets. alloc)Overrides javax. Gives notification that something was removed from the document in a location that the given flow view is responsible for. |
| pack-priv void |
| measurer | back to summary |
|---|---|
| private LineBreakMeasurer measurer | |
| text | back to summary |
|---|---|
| private TextLayoutStrategy. | |
| TextLayoutStrategy | back to summary |
|---|---|
| public TextLayoutStrategy() Constructs a layout strategy for paragraphs based upon java.awt.font.LineBreakMeasurer. | |
| adjustRow | back to summary |
|---|---|
| protected void adjustRow(FlowView fv, int rowIndex, int desiredSpan, int x) Overrides javax. Adjusts the given row if possible to fit within the layout span. Since all adjustments were already calculated by the LineBreakMeasurer, this is implemented to do nothing.
| |
| changedUpdate | back to summary |
|---|---|
| public void changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Overrides javax. Gives notification from the document that attributes were changed in a location that this view is responsible for.
| |
| createView | back to summary |
|---|---|
| protected View createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) Overrides javax. Creates a unidirectional view that can be used to represent the current chunk. This can be either an entire view from the logical view, or a fragment of the view.
| |
| getLimitingOffset | back to summary |
|---|---|
| pack-priv int getLimitingOffset(View v, int startOffset, int spanLeft, boolean requireNextWord) Calculate the limiting offset for the next view fragment. At most this would be the entire view (i.e. the limiting offset would be the end offset in that case). If the range contains a tab or a direction change, that will limit the offset to something less. This value is then fed to the LineBreakMeasurer as a limit to consider in addition to the remaining span.
| |
| insertUpdate | back to summary |
|---|---|
| public void insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Overrides javax. Gives notification that something was inserted into the document in a location that the given flow view is responsible for. The strategy should update the appropriate changed region (which depends upon the strategy used for repair).
| |
| layout | back to summary |
|---|---|
| public void layout(FlowView fv) Overrides javax. Does a full layout on the given View. This causes all of the rows (child views) to be rebuilt to match the given constraints for each row. This is called by FlowView.layout to update the child views in the flow.
| |
| layoutRow | back to summary |
|---|---|
| protected int layoutRow(FlowView fv, int rowIndex, int p0) Overrides javax. Creates a row of views that will fit within the layout span of the row. This is implemented to execute the superclass functionality (which fills the row with child views or view fragments) and follow that with bidi reordering of the unidirectional view fragments.
| |
| removeUpdate | back to summary |
|---|---|
| public void removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) Overrides javax. Gives notification that something was removed from the document in a location that the given flow view is responsible for.
| |
| sync | back to summary |
|---|---|
| pack-priv void sync(FlowView fv) Synchronize the strategy with its FlowView. Allows the strategy to update its state to account for changes in that portion of the model represented by the FlowView. Also allows the strategy to update the FlowView in response to these changes. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static Set | |
| private Object | |
| pack-priv View |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Set | getAllAttributeKeys()
Implements java. Returns the keys of all attributes defined on the iterator's text range. |
| public Object | getAttribute(AttributedCharacterIterator.
the key of the attribute whose value is requested. attributeImplements java. Returns the value of the named attribute for the current character. |
| public Map | getAttributes()
Implements java. Returns a map with the attributes defined on the current character. |
| pack-priv Font | |
| pack-priv int | Returns: the location in model coordinates. This is not the same as the Segment coordinates.Get a boundary position for the font. |
| public int | getRunLimit()
Implements java. Returns the index of the first character following the run with respect to all attributes containing the current character. |
| public int | getRunLimit(AttributedCharacterIterator.
Implements java. Returns the index of the first character following the run with respect to the given attribute containing the current character. |
| public int | getRunLimit(Set<? extends AttributedCharacterIterator.
Implements java. Returns the index of the first character following the run with respect to the given attributes containing the current character. |
| public int | getRunStart()
Implements java. Returns the index of the first character of the run with respect to all attributes containing the current character. |
| public int | getRunStart(AttributedCharacterIterator.
Implements java. Returns the index of the first character of the run with respect to the given attribute containing the current character. |
| public int | getRunStart(Set<? extends AttributedCharacterIterator.
Implements java. Returns the index of the first character of the run with respect to the given attributes containing the current character. |
| pack-priv View | |
| private void | |
| pack-priv void | |
| pack-priv int | |
| pack-priv int |
| keys | back to summary |
|---|---|
| pack-priv static Set<AttributedCharacterIterator. | |
| shaper | back to summary |
|---|---|
| private Object shaper | |
| v | back to summary |
|---|---|
| pack-priv View v | |
| AttributedSegment | back to summary |
|---|---|
| pack-priv AttributedSegment() | |
| getAllAttributeKeys | back to summary |
|---|---|
| public Set Implements java. Returns the keys of all attributes defined on the iterator's text range. The set is empty if no attributes are defined. | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(AttributedCharacterIterator. Implements java. Returns the value of the named attribute for the current character. Returns null if the attribute is not defined.
| |
| getAttributes | back to summary |
|---|---|
| public Map Implements java. Returns a map with the attributes defined on the current character. | |
| getFont | back to summary |
|---|---|
| pack-priv Font getFont(int childIndex) Get the font at the given child index. | |
| getFontBoundary | back to summary |
|---|---|
| pack-priv int getFontBoundary(int childIndex, int dir) Get a boundary position for the font. This is implemented to assume that two fonts are equal if their references are equal (i.e. that the font came from a cache).
| |
| getRunLimit | back to summary |
|---|---|
| public int getRunLimit() Implements java. Returns the index of the first character following the run with respect to all attributes containing the current character. | |
| getRunLimit | back to summary |
|---|---|
| public int getRunLimit(AttributedCharacterIterator. Implements java. Returns the index of the first character following the run with respect to the given attribute containing the current character. | |
| getRunLimit | back to summary |
|---|---|
| public int getRunLimit(Set<? extends AttributedCharacterIterator. Implements java. Returns the index of the first character following the run with respect to the given attributes containing the current character. | |
| getRunStart | back to summary |
|---|---|
| public int getRunStart() Implements java. Returns the index of the first character of the run with respect to all attributes containing the current character. | |
| getRunStart | back to summary |
|---|---|
| public int getRunStart(AttributedCharacterIterator. Implements java. Returns the index of the first character of the run with respect to the given attribute containing the current character. | |
| getRunStart | back to summary |
|---|---|
| public int getRunStart(Set<? extends AttributedCharacterIterator. Implements java. Returns the index of the first character of the run with respect to the given attributes containing the current character. | |
| getView | back to summary |
|---|---|
| pack-priv View getView() | |
| setShaper | back to summary |
|---|---|
| private void setShaper(Object shaper) | |
| setView | back to summary |
|---|---|
| pack-priv void setView(View v) | |
| toIteratorIndex | back to summary |
|---|---|
| pack-priv int toIteratorIndex(int pos) | |
| toModelPosition | back to summary |
|---|---|
| pack-priv int toModelPosition(int index) | |