|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.skin.TextPaneSkinNodeView
org.apache.pivot.wtk.skin.TextPaneSkinElementView
abstract class TextPaneSkinElementView
Abstract base class for element views.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
---|
Sequence.Tree<T> |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.text.ElementListener |
---|
ElementListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.text.NodeListener |
---|
NodeListener.Adapter |
Constructor Summary | |
---|---|
TextPaneSkinElementView(Element element)
|
Method Summary | |
---|---|
int |
add(TextPaneSkinNodeView nodeView)
Adds an item to the sequence. |
protected void |
attach()
|
void |
backgroundColorChanged(Element element,
Color previousBackgroundColor)
Called when the background color has changed. |
protected void |
detach()
|
void |
fontChanged(Element element,
Font previousFont)
Called when the font has changed. |
void |
foregroundColorChanged(Element element,
Color previousForegroundColor)
Called when the foreground color has changed. |
TextPaneSkinNodeView |
get(int index)
Retrieves the item at the given index. |
int |
getBaseline()
|
Bounds |
getCharacterBounds(int offset)
|
int |
getLength()
Returns the length of the sequence. |
int |
indexOf(TextPaneSkinNodeView nodeView)
Returns the index of an item in the sequence. |
void |
insert(TextPaneSkinNodeView nodeView,
int index)
Inserts an item into the sequence at a specific index. |
void |
invalidateDownTree()
|
Iterator<TextPaneSkinNodeView> |
iterator()
|
void |
nodeInserted(Element element,
int index)
Called when a node has been inserted into an element. |
void |
nodesRemoved(Element element,
int index,
Sequence<Node> nodes)
Called when nodes have been removed from an element. |
void |
paint(Graphics2D graphics)
|
protected void |
paintChild(Graphics2D graphics,
Bounds paintBounds,
TextPaneSkinNodeView nodeView)
|
Sequence<TextPaneSkinNodeView> |
remove(int index,
int count)
Removes one or more items from the sequence. |
int |
remove(TextPaneSkinNodeView nodeView)
Removes the first occurrence of the given item from the sequence. |
protected void |
setSkinLocation(int skinX,
int skinY)
Set location of the NodeView relative to the skin component. |
void |
strikethroughChanged(Element element)
Called when strikethrough style has changed. |
void |
underlineChanged(Element element)
Called when underline style has changed. |
TextPaneSkinNodeView |
update(int index,
TextPaneSkinNodeView nodeView)
Updates the item at the given index. |
Methods inherited from class org.apache.pivot.wtk.skin.TextPaneSkinNodeView |
---|
childLayout, getBounds, getCharacterCount, getDocumentOffset, getHeight, getInsertionPoint, getLocation, getNextInsertionPoint, getNode, getOffset, getParent, getPreferredSize, getRowAt, getRowCount, getSize, getTextPaneSkin, getWidth, getX, getY, invalidateUpTree, isValid, layout, nodeInserted, nodesRemoved, offsetChanged, parentChanged, rangeInserted, rangeRemoved, repaint, repaint, setLocation, setParent, setSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextPaneSkinElementView(Element element)
Method Detail |
---|
protected void attach()
attach
in class TextPaneSkinNodeView
protected void detach()
detach
in class TextPaneSkinNodeView
public void invalidateDownTree()
invalidateDownTree
in class TextPaneSkinNodeView
public int add(TextPaneSkinNodeView nodeView)
Sequence
add
in interface Sequence<TextPaneSkinNodeView>
nodeView
- The item to be added to the sequence.
public void insert(TextPaneSkinNodeView nodeView, int index)
Sequence
insert
in interface Sequence<TextPaneSkinNodeView>
nodeView
- The item to be added to the sequence.index
- The index at which the item should be inserted. Must be a value between
0 and getLength().public TextPaneSkinNodeView update(int index, TextPaneSkinNodeView nodeView)
Sequence
update
in interface Sequence<TextPaneSkinNodeView>
index
- The index of the item to update.nodeView
- The item that will replace any existing value at the given index.
public int remove(TextPaneSkinNodeView nodeView)
Sequence
remove
in interface Sequence<TextPaneSkinNodeView>
nodeView
- The item to remove.
Sequence.remove(int, int)
public Sequence<TextPaneSkinNodeView> remove(int index, int count)
Sequence
remove
in interface Sequence<TextPaneSkinNodeView>
index
- The starting index to remove.count
- The number of items to remove, beginning with index.
public TextPaneSkinNodeView get(int index)
Sequence
get
in interface Sequence<TextPaneSkinNodeView>
index
- The index of the item to retrieve.public int indexOf(TextPaneSkinNodeView nodeView)
Sequence
indexOf
in interface Sequence<TextPaneSkinNodeView>
nodeView
- The item to locate.
public int getLength()
Sequence
getLength
in interface Sequence<TextPaneSkinNodeView>
public int getBaseline()
getBaseline
in class TextPaneSkinNodeView
protected void setSkinLocation(int skinX, int skinY)
TextPaneSkinNodeView
setSkinLocation
in class TextPaneSkinNodeView
skinX
- the X coordinate in the skin's frame of referenceskinY
- the Y coordinate in the skin's frame of referencepublic void paint(Graphics2D graphics)
paint
in class TextPaneSkinNodeView
protected final void paintChild(Graphics2D graphics, Bounds paintBounds, TextPaneSkinNodeView nodeView)
public Bounds getCharacterBounds(int offset)
getCharacterBounds
in class TextPaneSkinNodeView
public void nodeInserted(Element element, int index)
ElementListener
nodeInserted
in interface ElementListener
public void nodesRemoved(Element element, int index, Sequence<Node> nodes)
ElementListener
nodesRemoved
in interface ElementListener
public void fontChanged(Element element, Font previousFont)
ElementListener
fontChanged
in interface ElementListener
public void backgroundColorChanged(Element element, Color previousBackgroundColor)
ElementListener
backgroundColorChanged
in interface ElementListener
public void foregroundColorChanged(Element element, Color previousForegroundColor)
ElementListener
foregroundColorChanged
in interface ElementListener
public void underlineChanged(Element element)
ElementListener
underlineChanged
in interface ElementListener
public void strikethroughChanged(Element element)
ElementListener
strikethroughChanged
in interface ElementListener
public Iterator<TextPaneSkinNodeView> iterator()
iterator
in interface Iterable<TextPaneSkinNodeView>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |