sub_arctic.lib
Class bounds_sem_draw_context

java.lang.Object
  |
  +--sub_arctic.lib.sem_draw_context
        |
        +--sub_arctic.lib.bounds_sem_draw_context
Direct Known Subclasses:
focus_sem_draw_context

public class bounds_sem_draw_context
extends sem_draw_context

This class provides a traversal "parameters" object that encapsulates the context of a draw done from inside a semantic lens. In particular, this class tracks current and target depths, useful for determining lens behavior based on an interactor's depth or child number in the interactor tree.

See Also:
sem_draw_to_child, sub_arctic.lib.sem_draw_cont, base_interactor.traverse_and_collect(int, int, sub_arctic.lib.interactor_pred, sub_arctic.lib.interactor_pred, sub_arctic.lib.traversal_xform, java.lang.Object, sub_arctic.input.pick_collector)

Field Summary
protected static int _current_child
          The current child number
protected  int _current_depth
          The current depth
protected  int _target_child_end
          The end of the target child number
protected  int _target_child_start
          The start of the target child number
protected  int _target_depth_end
          The end of the target depth
protected  int _target_depth_start
          The start of the target depth
 
Fields inherited from class sub_arctic.lib.sem_draw_context
_lens, _surface, draw_kind
 
Constructor Summary
bounds_sem_draw_context(bounds_sem_draw_context other)
          Construct from another object.
bounds_sem_draw_context(int drw_knd, drawable surf)
          Constructor.
bounds_sem_draw_context(int drw_knd, drawable surf, semantic_lens lens, int target_depth_start, int target_depth_end, int target_child_start, int target_child_end)
          Constructor, initializes the current depth and child number to zero.
bounds_sem_draw_context(int drw_knd, drawable surf, semantic_lens lens, int current_depth, int target_depth_start, int target_depth_end, int current_child, int target_child_start, int target_child_end)
          Full constructor.
 
Method Summary
 int current_child()
          Returns the current child number in this context's traversal of the interactor tree.
 int current_depth()
          Returns the current depth of this context in the interactor tree.
protected  void set_current_child(int current_child)
          Sets this context's current child number in the interactor tree.
protected  void set_current_depth(int current_depth)
          Sets this context's current depth in the interactor tree.
protected  void set_target_child_end(int target_child_end)
          Sets the end of this context's target child number in the interactor tree.
protected  void set_target_child_start(int target_child_start)
          Sets the start of this context's target child number in the interactor tree.
protected  void set_target_depth_end(int target_depth_end)
          Sets the end of this context's target depth in the interactor tree.
protected  void set_target_depth_start(int target_depth_start)
          Sets the start of this context's target depth in the interactor tree.
 int target_child_end()
          Returns the end of the target child number for this context in the interactor tree.
 int target_child_start()
          Returns the start of the target child number for this context in the interactor tree.
 int target_depth_end()
          Returns the end of the target depth for this context in the interactor tree.
 int target_depth_start()
          Returns the start of the target depth for this context in the interactor tree.
 
Methods inherited from class sub_arctic.lib.sem_draw_context
lens, set_lens, set_surface, surface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_current_depth

protected int _current_depth
The current depth

_current_child

protected static int _current_child
The current child number

_target_depth_start

protected int _target_depth_start
The start of the target depth

_target_depth_end

protected int _target_depth_end
The end of the target depth

_target_child_start

protected int _target_child_start
The start of the target child number

_target_child_end

protected int _target_child_end
The end of the target child number
Constructor Detail

bounds_sem_draw_context

public bounds_sem_draw_context(int drw_knd,
                               drawable surf)
Constructor.
Parameters:
ind - drw_kind a value for draw_kind.
drawable - surf a value for surface.

bounds_sem_draw_context

public bounds_sem_draw_context(int drw_knd,
                               drawable surf,
                               semantic_lens lens,
                               int target_depth_start,
                               int target_depth_end,
                               int target_child_start,
                               int target_child_end)
Constructor, initializes the current depth and child number to zero.
Parameters:
ind - drw_kind a value for draw_kind.
drawable - surf a value for surface.

bounds_sem_draw_context

public bounds_sem_draw_context(int drw_knd,
                               drawable surf,
                               semantic_lens lens,
                               int current_depth,
                               int target_depth_start,
                               int target_depth_end,
                               int current_child,
                               int target_child_start,
                               int target_child_end)
Full constructor.
Parameters:
int - drw_kind a value for draw_kind.
drawable - surf a value for surface.
semantic_lens - lens the lens whose draw context we are.

bounds_sem_draw_context

public bounds_sem_draw_context(bounds_sem_draw_context other)
Construct from another object.
Parameters:
child_pos_sem_draw_context - other the object we make a copy of.
Method Detail

current_depth

public int current_depth()
Returns the current depth of this context in the interactor tree.
Returns:
int The current depth in the interactor tree.

set_current_depth

protected void set_current_depth(int current_depth)
Sets this context's current depth in the interactor tree.
Parameters:
boolean - b the desired boolean value.

current_child

public int current_child()
Returns the current child number in this context's traversal of the interactor tree.
Returns:
int The current child number in the interactor tree.

set_current_child

protected void set_current_child(int current_child)
Sets this context's current child number in the interactor tree.
Parameters:
boolean - b the desired boolean value.

target_depth_start

public int target_depth_start()
Returns the start of the target depth for this context in the interactor tree.
Returns:
int The start of the target depth in the interactor tree.

set_target_depth_start

protected void set_target_depth_start(int target_depth_start)
Sets the start of this context's target depth in the interactor tree.
Parameters:
boolean - b the desired boolean value.

target_depth_end

public int target_depth_end()
Returns the end of the target depth for this context in the interactor tree.
Returns:
int The end of the target depth in the interactor tree.

set_target_depth_end

protected void set_target_depth_end(int target_depth_end)
Sets the end of this context's target depth in the interactor tree.
Parameters:
boolean - b the desired boolean value.

target_child_start

public int target_child_start()
Returns the start of the target child number for this context in the interactor tree.
Returns:
int The start of the target child number in the interactor tree.

set_target_child_start

protected void set_target_child_start(int target_child_start)
Sets the start of this context's target child number in the interactor tree.
Parameters:
boolean - b the desired boolean value.

target_child_end

public int target_child_end()
Returns the end of the target child number for this context in the interactor tree.
Returns:
int The end of the target child number in the interactor tree.

set_target_child_end

protected void set_target_child_end(int target_child_end)
Sets the end of this context's target child number in the interactor tree.
Parameters:
boolean - b the desired boolean value.