manifold.base
Class Traversal

java.lang.Object
  |
  +--manifold.base.Traversal
Direct Known Subclasses:
FTraversal

public abstract class Traversal
extends java.lang.Object

Copyright (c) 2000 Rutgers, The State University of New Jersey

Since:
disciple %Version%
Version:
%Version%, %Time%

Field Summary
static int DRAW
          Specifies draw traversal.
protected  java.lang.Object graphics_
           
 int operation_
           
static int OTHER
          Specifies traversal for other purposes.
static int PICK_ALL
          Specifies pick traversal resulting in pick of all items which intersects with the specified pick shape.
static int PICK_ALL_SORTED
          Specifies pick traversal resulting in pick of all items which intersects with the specified pick shape.
static int PICK_ANY
          Specifies pick traversal resulting in pick of one item which intersects with the specified pick shape.
static int PICK_TOP
          Specifies pick traversal resulting in pick of the top item which intersects with the specified pick shape.
protected  java.lang.Object pickPoint_
           
protected  java.util.Stack stack_
           
protected  java.lang.Object transform_
           
 
Constructor Summary
Traversal(int operation)
           
Traversal(Traversal t)
           
 
Method Summary
 Traversal getFirstPicked()
          Returns the traversal containing the first glyph which was hit in a pick traversal of the scenegraph.
 java.lang.Object getGraphics()
           
 Traversal getLastPicked()
          Returns the traversal containing the last glyph which was hit in a pick traversal of the scenegraph.
 java.lang.Object getPickPoint()
           
 java.lang.Object getTransform()
           
 void hit()
          Mark current glyph as a hit in a pick traversal of the scenegraph.
 void setGraphics(java.lang.Object graphics)
           
 void setPickPoint(java.lang.Object pickPoint)
           
abstract  void traverseChild(Glyph g)
          Traverses to the specified Glyph.
 void visit()
          This method must be overridden by subclasses which do other traversals than draw and pick (i.e. using GlyphViewTraversal2D.OTHER as operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DRAW

public static final int DRAW
Specifies draw traversal.

See Also:
Constant Field Values

PICK_ANY

public static final int PICK_ANY
Specifies pick traversal resulting in pick of one item which intersects with the specified pick shape.

See Also:
Constant Field Values

PICK_TOP

public static final int PICK_TOP
Specifies pick traversal resulting in pick of the top item which intersects with the specified pick shape.

See Also:
Constant Field Values

PICK_ALL

public static final int PICK_ALL
Specifies pick traversal resulting in pick of all items which intersects with the specified pick shape.

See Also:
Constant Field Values

PICK_ALL_SORTED

public static final int PICK_ALL_SORTED
Specifies pick traversal resulting in pick of all items which intersects with the specified pick shape. The result is sorted with the topmost item first.

See Also:
Constant Field Values

OTHER

public static final int OTHER
Specifies traversal for other purposes.

See Also:
Constant Field Values

operation_

public int operation_

stack_

protected java.util.Stack stack_

transform_

protected java.lang.Object transform_

graphics_

protected java.lang.Object graphics_

pickPoint_

protected java.lang.Object pickPoint_
Constructor Detail

Traversal

public Traversal(int operation)

Traversal

public Traversal(Traversal t)
Method Detail

traverseChild

public abstract void traverseChild(Glyph g)
Traverses to the specified Glyph.

Parameters:
g - the Glyph to traverse to.

hit

public void hit()
Mark current glyph as a hit in a pick traversal of the scenegraph. NOTE: This method is not implemented in this class, it needs to be implemented by a pick traversal subclass.


getPickPoint

public java.lang.Object getPickPoint()

setPickPoint

public void setPickPoint(java.lang.Object pickPoint)

getLastPicked

public Traversal getLastPicked()
Returns the traversal containing the last glyph which was hit in a pick traversal of the scenegraph. NOTE: This method is not implemented in this class, it needs to be implemented by a pick traversal subclass.


getFirstPicked

public Traversal getFirstPicked()
Returns the traversal containing the first glyph which was hit in a pick traversal of the scenegraph. NOTE: This method is not implemented in this class, it needs to be implemented by a pick traversal subclass.


visit

public void visit()
This method must be overridden by subclasses which do other traversals than draw and pick (i.e. using GlyphViewTraversal2D.OTHER as operation).


getTransform

public java.lang.Object getTransform()

getGraphics

public java.lang.Object getGraphics()

setGraphics

public void setGraphics(java.lang.Object graphics)


Copyright (c) 2003 Rutgers, The State University of New Jersey