org.apache.pivot.wtk.skin
Class TextPaneSkinNodeView

java.lang.Object
  extended by org.apache.pivot.wtk.skin.TextPaneSkinNodeView
All Implemented Interfaces:
NodeListener
Direct Known Subclasses:
TextPaneSkinComponentNodeView, TextPaneSkinElementView, TextPaneSkinImageNodeView, TextPaneSkinTextNodeView

abstract class TextPaneSkinNodeView
extends Object
implements NodeListener

Abstract base class for node views.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.text.NodeListener
NodeListener.Adapter
 
Constructor Summary
TextPaneSkinNodeView(Node node)
           
 
Method Summary
protected  void attach()
           
protected abstract  void childLayout(int breakWidth)
           
protected  void detach()
           
abstract  int getBaseline()
           
 Bounds getBounds()
           
abstract  Bounds getCharacterBounds(int offset)
           
 int getCharacterCount()
           
 int getDocumentOffset()
           
 int getHeight()
           
abstract  int getInsertionPoint(int xArgument, int yArgument)
           
 Point getLocation()
           
abstract  int getNextInsertionPoint(int xArgument, int from, TextPane.ScrollDirection direction)
           
 Node getNode()
           
 int getOffset()
           
 TextPaneSkinElementView getParent()
           
abstract  Dimensions getPreferredSize(int breakWidth)
           
abstract  int getRowAt(int offset)
           
abstract  int getRowCount()
           
 Dimensions getSize()
           
protected  TextPaneSkin getTextPaneSkin()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 void invalidateDownTree()
           
 void invalidateUpTree()
           
 boolean isValid()
           
 void layout(int breakWidth)
           
 void nodeInserted(Node nodeArgument, int offset)
          Called when a child node has been inserted into a node.
 void nodesRemoved(Node nodeArgument, Sequence<Node> removed, int offset)
          Called when child nodes have been removed from a node.
 void offsetChanged(Node nodeArgument, int previousOffset)
          Called when a node's offset has changed within it's parent element.
abstract  void paint(Graphics2D g)
           
 void parentChanged(Node nodeArgument, Element previousParent)
          Called when a node's parent has changed, either as a result of being added to or removed from an element.
 void rangeInserted(Node nodeArgument, int offset, int span)
          Called when a text range has been inserted into a node.
 void rangeRemoved(Node nodeArgument, int offset, int characterCount)
          Called when a text range has been removed from a node.
 void repaint()
           
 void repaint(int xArgument, int yArgument, int widthArgument, int heightArgument)
           
protected  void setLocation(int x, int y)
           
protected  void setParent(TextPaneSkinElementView parent)
           
protected  void setSize(int width, int height)
           
protected abstract  void setSkinLocation(int skinX, int skinY)
          Set location of the NodeView relative to the skin component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextPaneSkinNodeView

public TextPaneSkinNodeView(Node node)
Method Detail

getNode

public Node getNode()

getParent

public TextPaneSkinElementView getParent()

setParent

protected void setParent(TextPaneSkinElementView parent)

getTextPaneSkin

protected TextPaneSkin getTextPaneSkin()

attach

protected void attach()

detach

protected void detach()

getWidth

public int getWidth()

getHeight

public int getHeight()

getBaseline

public abstract int getBaseline()

paint

public abstract void paint(Graphics2D g)

getSize

public Dimensions getSize()

setSize

protected void setSize(int width,
                       int height)

getX

public int getX()

getY

public int getY()

getLocation

public Point getLocation()

setLocation

protected void setLocation(int x,
                           int y)

setSkinLocation

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

Parameters:
skinX - the X coordinate in the skin's frame of reference
skinY - the Y coordinate in the skin's frame of reference

getBounds

public Bounds getBounds()

repaint

public void repaint()

repaint

public void repaint(int xArgument,
                    int yArgument,
                    int widthArgument,
                    int heightArgument)

isValid

public final boolean isValid()

invalidateUpTree

public void invalidateUpTree()

invalidateDownTree

public void invalidateDownTree()

layout

public final void layout(int breakWidth)

getPreferredSize

public abstract Dimensions getPreferredSize(int breakWidth)

childLayout

protected abstract void childLayout(int breakWidth)

getOffset

public int getOffset()

getDocumentOffset

public int getDocumentOffset()

getCharacterCount

public int getCharacterCount()

getInsertionPoint

public abstract int getInsertionPoint(int xArgument,
                                      int yArgument)

getNextInsertionPoint

public abstract int getNextInsertionPoint(int xArgument,
                                          int from,
                                          TextPane.ScrollDirection direction)

getRowAt

public abstract int getRowAt(int offset)

getRowCount

public abstract int getRowCount()

getCharacterBounds

public abstract Bounds getCharacterBounds(int offset)

parentChanged

public void parentChanged(Node nodeArgument,
                          Element previousParent)
Description copied from interface: NodeListener
Called when a node's parent has changed, either as a result of being added to or removed from an element.

Specified by:
parentChanged in interface NodeListener

offsetChanged

public void offsetChanged(Node nodeArgument,
                          int previousOffset)
Description copied from interface: NodeListener
Called when a node's offset has changed within it's parent element.

Specified by:
offsetChanged in interface NodeListener

rangeInserted

public void rangeInserted(Node nodeArgument,
                          int offset,
                          int span)
Description copied from interface: NodeListener
Called when a text range has been inserted into a node.

Specified by:
rangeInserted in interface NodeListener

rangeRemoved

public void rangeRemoved(Node nodeArgument,
                         int offset,
                         int characterCount)
Description copied from interface: NodeListener
Called when a text range has been removed from a node.

Specified by:
rangeRemoved in interface NodeListener

nodesRemoved

public void nodesRemoved(Node nodeArgument,
                         Sequence<Node> removed,
                         int offset)
Description copied from interface: NodeListener
Called when child nodes have been removed from a node.

Specified by:
nodesRemoved in interface NodeListener

nodeInserted

public void nodeInserted(Node nodeArgument,
                         int offset)
Description copied from interface: NodeListener
Called when a child node has been inserted into a node.

Specified by:
nodeInserted in interface NodeListener