org.apache.pivot.wtk.skin
Class TextAreaSkin.NodeView

java.lang.Object
  extended by org.apache.pivot.wtk.skin.TextAreaSkin.NodeView
All Implemented Interfaces:
NodeListener, Visual
Direct Known Subclasses:
TextAreaSkin.ElementView, TextAreaSkin.ImageNodeView, TextAreaSkin.TextNodeView
Enclosing class:
TextAreaSkin

public abstract class TextAreaSkin.NodeView
extends Object
implements Visual, NodeListener

Abstract base class for node views.


Constructor Summary
TextAreaSkin.NodeView(Node node)
           
 
Method Summary
protected  void attach()
           
protected  void detach()
           
 int getBaseline()
          Returns the visual's baseline.
 Bounds getBounds()
           
 int getBreakWidth()
           
abstract  Bounds getCharacterBounds(int offset)
           
 int getCharacterCount()
           
 int getDocumentOffset()
           
 int getHeight()
          Returns the visual's height.
abstract  int getInsertionPoint(int x, int y)
           
 Point getLocation()
           
abstract  TextAreaSkin.NodeView getNext()
           
abstract  int getNextInsertionPoint(int x, int from, Direction direction)
           
 Node getNode()
           
 int getOffset()
           
 TextAreaSkin.ElementView getParent()
           
abstract  int getRowCount()
           
abstract  int getRowIndex(int offset)
           
 Dimensions getSize()
           
 int getWidth()
          Returns the visual's width.
 int getX()
           
 int getY()
           
 void invalidate()
           
 boolean isValid()
           
 void offsetChanged(Node node, int previousOffset)
          Called when a node's offset has changed within it's parent element.
 void parentChanged(Node node, 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 node, int offset, int span)
          Called when a range has been inserted into a node.
 void rangeRemoved(Node node, int offset, int span)
          Called when a range has been removed from a node.
 void repaint()
           
 void repaint(int x, int y, int width, int height)
           
 void setBreakWidth(int breakWidth)
           
protected  void setLocation(int x, int y)
           
protected  void setParent(TextAreaSkin.ElementView parent)
           
protected  void setSize(int width, int height)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.pivot.wtk.Visual
paint
 

Constructor Detail

TextAreaSkin.NodeView

public TextAreaSkin.NodeView(Node node)
Method Detail

getNode

public Node getNode()

getParent

public TextAreaSkin.ElementView getParent()

setParent

protected void setParent(TextAreaSkin.ElementView parent)

attach

protected void attach()

detach

protected void detach()

getWidth

public int getWidth()
Description copied from interface: Visual
Returns the visual's width.

Specified by:
getWidth in interface Visual

getHeight

public int getHeight()
Description copied from interface: Visual
Returns the visual's height.

Specified by:
getHeight in interface Visual

getBaseline

public int getBaseline()
Description copied from interface: Visual
Returns the visual's baseline.

Specified by:
getBaseline in interface Visual
Returns:
The baseline relative to the origin of the visual, or -1 if this visual does not have a baseline.

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)

getBounds

public Bounds getBounds()

repaint

public void repaint()

repaint

public void repaint(int x,
                    int y,
                    int width,
                    int height)

isValid

public boolean isValid()

invalidate

public void invalidate()

validate

public void validate()

getBreakWidth

public int getBreakWidth()

setBreakWidth

public void setBreakWidth(int breakWidth)

getOffset

public int getOffset()

getDocumentOffset

public int getDocumentOffset()

getCharacterCount

public int getCharacterCount()

getNext

public abstract TextAreaSkin.NodeView getNext()

getInsertionPoint

public abstract int getInsertionPoint(int x,
                                      int y)

getNextInsertionPoint

public abstract int getNextInsertionPoint(int x,
                                          int from,
                                          Direction direction)

getRowIndex

public abstract int getRowIndex(int offset)

getRowCount

public abstract int getRowCount()

getCharacterBounds

public abstract Bounds getCharacterBounds(int offset)

parentChanged

public void parentChanged(Node node,
                          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 node,
                          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 node,
                          int offset,
                          int span)
Description copied from interface: NodeListener
Called when a range has been inserted into a node.

Specified by:
rangeInserted in interface NodeListener

rangeRemoved

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

Specified by:
rangeRemoved in interface NodeListener