org.apache.pivot.wtk.skin
Class TextPaneSkinTextNodeView

java.lang.Object
  extended by org.apache.pivot.wtk.skin.TextPaneSkinNodeView
      extended by org.apache.pivot.wtk.skin.TextPaneSkinTextNodeView
All Implemented Interfaces:
NodeListener, TextNodeListener

 class TextPaneSkinTextNodeView
extends TextPaneSkinNodeView
implements TextNodeListener

Text node view.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.text.NodeListener
NodeListener.Adapter
 
Constructor Summary
TextPaneSkinTextNodeView(TextNode textNode)
           
TextPaneSkinTextNodeView(TextNode textNode, int start)
           
 
Method Summary
protected  void attach()
           
 void charactersInserted(TextNode textNode, int index, int count)
          Called when characters have been inserted into a text node.
 void charactersRemoved(TextNode textNode, int index, int count)
          Called when characters have been removed from a text node.
protected  void childLayout(int breakWidth)
           
protected  void detach()
           
 int getBaseline()
           
 Bounds getCharacterBounds(int offset)
           
 int getCharacterCount()
           
 int getInsertionPoint(int x, int y)
           
 TextPaneSkinNodeView getNext()
          Used by TextPaneSkinParagraphView when it breaks child nodes into multiple views.
 int getNextInsertionPoint(int x, int from, TextPane.ScrollDirection direction)
           
 int getOffset()
           
 Dimensions getPreferredSize(int breakWidth)
           
 int getRowAt(int offset)
           
 int getRowCount()
           
 void invalidateUpTree()
           
 void paint(Graphics2D graphics)
           
protected  void setSkinLocation(int skinX, int skinY)
          Set location of the NodeView relative to the skin component.
 String toString()
           
 
Methods inherited from class org.apache.pivot.wtk.skin.TextPaneSkinNodeView
getBounds, getDocumentOffset, getHeight, getLocation, getNode, getParent, getSize, getTextPaneSkin, getWidth, getX, getY, invalidateDownTree, 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, wait, wait, wait
 

Constructor Detail

TextPaneSkinTextNodeView

public TextPaneSkinTextNodeView(TextNode textNode)

TextPaneSkinTextNodeView

public TextPaneSkinTextNodeView(TextNode textNode,
                                int start)
Method Detail

attach

protected void attach()
Overrides:
attach in class TextPaneSkinNodeView

detach

protected void detach()
Overrides:
detach in class TextPaneSkinNodeView

invalidateUpTree

public void invalidateUpTree()
Overrides:
invalidateUpTree in class TextPaneSkinNodeView

childLayout

protected void childLayout(int breakWidth)
Specified by:
childLayout in class TextPaneSkinNodeView

getPreferredSize

public Dimensions getPreferredSize(int breakWidth)
Specified by:
getPreferredSize in class TextPaneSkinNodeView

getBaseline

public int getBaseline()
Specified by:
getBaseline in class TextPaneSkinNodeView

setSkinLocation

protected void setSkinLocation(int skinX,
                               int skinY)
Description copied from class: TextPaneSkinNodeView
Set location of the NodeView relative to the skin component. This is needed by the ComponentViewNode to correctly position child Component's.

Specified by:
setSkinLocation in class TextPaneSkinNodeView
Parameters:
skinX - the X coordinate in the skin's frame of reference
skinY - the Y coordinate in the skin's frame of reference

paint

public void paint(Graphics2D graphics)
Specified by:
paint in class TextPaneSkinNodeView

getOffset

public int getOffset()
Overrides:
getOffset in class TextPaneSkinNodeView

getCharacterCount

public int getCharacterCount()
Overrides:
getCharacterCount in class TextPaneSkinNodeView

getNext

public TextPaneSkinNodeView getNext()
Used by TextPaneSkinParagraphView when it breaks child nodes into multiple views.


getInsertionPoint

public int getInsertionPoint(int x,
                             int y)
Specified by:
getInsertionPoint in class TextPaneSkinNodeView

getNextInsertionPoint

public int getNextInsertionPoint(int x,
                                 int from,
                                 TextPane.ScrollDirection direction)
Specified by:
getNextInsertionPoint in class TextPaneSkinNodeView

getRowAt

public int getRowAt(int offset)
Specified by:
getRowAt in class TextPaneSkinNodeView

getRowCount

public int getRowCount()
Specified by:
getRowCount in class TextPaneSkinNodeView

getCharacterBounds

public Bounds getCharacterBounds(int offset)
Specified by:
getCharacterBounds in class TextPaneSkinNodeView

charactersInserted

public void charactersInserted(TextNode textNode,
                               int index,
                               int count)
Description copied from interface: TextNodeListener
Called when characters have been inserted into a text node.

Specified by:
charactersInserted in interface TextNodeListener

charactersRemoved

public void charactersRemoved(TextNode textNode,
                              int index,
                              int count)
Description copied from interface: TextNodeListener
Called when characters have been removed from a text node.

Specified by:
charactersRemoved in interface TextNodeListener

toString

public String toString()
Overrides:
toString in class Object