sub_arctic.style
Class op3_placement_rule

java.lang.Object
  |
  +--sub_arctic.style.op1_placement_rule
        |
        +--sub_arctic.style.op2_placement_rule
              |
              +--sub_arctic.style.op3_placement_rule
Direct Known Subclasses:
center_rule, far_offset_rule, max_rule, min_rule

public abstract class op3_placement_rule
extends op2_placement_rule

This abstract class provides most of the mechanism for a composition placement rule computing an equation with three referents (operands).

See Also:
composer, composition_part

Field Summary
protected  int _ref_coord3
          Designator for the coordinate value within the third referent object.
protected  int _ref_num3
          Number of the part, parameter, or constant being refered to in the third referent.
protected  int _ref_obj3
          Designator for the object our third operand refers to (third referent object).
 
Fields inherited from class sub_arctic.style.op2_placement_rule
_ref_coord2, _ref_num2, _ref_obj2
 
Fields inherited from class sub_arctic.style.op1_placement_rule
_ref_coord1, _ref_num1, _ref_obj1
 
Constructor Summary
op3_placement_rule(int referent1, int referent_num1, int referent_coord1, int referent2, int referent_num2, int referent_coord2, int referent3, int referent_num3, int referent_coord3)
          Full constructor.
 
Method Summary
abstract  int eval(composer comp_obj)
          Evaluate the rule to produce a value.
 int get_op3(composer comp_obj)
          Fetch the up-to-date value of the third referent (operand) for this rule.
 int ref_coord3()
          Designator for the coordinate value within the third referent object.
 int ref_num3()
          Number of the part, parameter, or constant being refered to in the third referent.
 int ref_obj3()
          Designator for the object our third operand refers to (third referent object).
 void set_ref_coord3(int val)
          Set the designator for the coordinate value within the third referent object.
 void set_ref_num3(int val)
          Set the number of the part, parameter, or constant being refered to in the third referent.
 void set_ref_obj3(int val)
          Set the Designator for the object our third operand refers to (third referent object).
 
Methods inherited from class sub_arctic.style.op2_placement_rule
get_op2, ref_coord2, ref_num2, ref_obj2, set_ref_coord2, set_ref_num2, set_ref_obj2
 
Methods inherited from class sub_arctic.style.op1_placement_rule
get_op1, ref_coord1, ref_num1, ref_obj1, set_ref_coord1, set_ref_num1, set_ref_obj1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ref_obj3

protected int _ref_obj3
Designator for the object our third operand refers to (third referent object). This must be one of the values PART, PARM, or CONST.

_ref_num3

protected int _ref_num3
Number of the part, parameter, or constant being refered to in the third referent.

_ref_coord3

protected int _ref_coord3
Designator for the coordinate value within the third referent object. This must be one of the values LEFT, RIGHT, TOP, BOTTOM, HCENTER, or VCENTER, or must be constucted as from a feature point number (FPN) using either: (FPN << FEATURE_SHIFT) | FEATURE_X to designate the x value of a feature point, or as (FPN << FEATURE_SHIFT) | FEATURE_Y to designate the y value of a feature point.
Constructor Detail

op3_placement_rule

public op3_placement_rule(int referent1,
                          int referent_num1,
                          int referent_coord1,
                          int referent2,
                          int referent_num2,
                          int referent_coord2,
                          int referent3,
                          int referent_num3,
                          int referent_coord3)
Full constructor.
Parameters:
int - referent1 designator for first referent object. This must be one of PART, PARM, or CONST.
int - refernent_num1 Number of part or parameter being refered to (or a constant value if referent == CONST).
int - referent_coord1 designator for which coordinate of the first referent is being refered to. This must either be one of LEFT, RIGHT, TOP, BOTTOM, HCENTER, or VCENTER, or it must be constructed from a feature point number (FPN) using either: (FPN << FEATURE_SHIFT) | FEATURE_X to designate the x value of a feature point, or as (FPN << FEATURE_SHIFT) | FEATURE_Y to designate the y value of a feature point.
int - referent2 designator for second referent object. This must be one of PART, PARM, or CONST.
int - refernent_num2 Number of part or parameter being refered to (or a constant value if referent == CONST).
int - referent_coord2 designator for which coordinate of the second referent is being refered to. This must either be one of LEFT, RIGHT, TOP, BOTTOM, HCENTER, or VCENTER, or it must be constructed from a feature point number (FPN) using either: (FPN << FEATURE_SHIFT) | FEATURE_X to designate the x value of a feature point, or as (FPN << FEATURE_SHIFT) | FEATURE_Y to designate the y value of a feature point.
int - referent3 designator for third referent object. This must be one of PART, PARM, or CONST.
int - refernent_num3 Number of part or parameter being refered to (or a constant value if referent == CONST).
int - referent_coord3 designator for which coordinate of the third referent is being refered to. This must either be one of LEFT, RIGHT, TOP, BOTTOM, HCENTER, or VCENTER, or it must be constructed from a feature point number (FPN) using either: (FPN << FEATURE_SHIFT) | FEATURE_X to designate the x value of a feature point, or as (FPN << FEATURE_SHIFT) | FEATURE_Y to designate the y value of a feature point.
Method Detail

ref_obj3

public int ref_obj3()
Designator for the object our third operand refers to (third referent object). This must be one of the values PART, PARM, or CONST.
Returns:
int the designator constant.

set_ref_obj3

public void set_ref_obj3(int val)
Set the Designator for the object our third operand refers to (third referent object). This must be one of the values PART, PARM, or CONST.
Parameters:
int - val the new designator constant.

ref_num3

public int ref_num3()
Number of the part, parameter, or constant being refered to in the third referent.
Returns:
int the number.

set_ref_num3

public void set_ref_num3(int val)
Set the number of the part, parameter, or constant being refered to in the third referent.
Parameters:
int - val the new number.

ref_coord3

public int ref_coord3()
Designator for the coordinate value within the third referent object. This must be one of the values LEFT, RIGHT, TOP, BOTTOM, HCENTER, or VCENTER, or must be constucted as from a feature point number (FPN) using either: (FPN << FEATURE_SHIFT) | FEATURE_X to designate the x value of a feature point, or as (FPN << FEATURE_SHIFT) | FEATURE_Y to designate the y value of a feature point.
Returns:
int the designator constant.

set_ref_coord3

public void set_ref_coord3(int val)
Set the designator for the coordinate value within the third referent object. This must be one of the values LEFT, RIGHT, TOP, BOTTOM, HCENTER, or VCENTER, or must be constucted as from a feature point number (FPN) using either: (FPN << FEATURE_SHIFT) | FEATURE_X to designate the x value of a feature point, or as (FPN << FEATURE_SHIFT) | FEATURE_Y to designate the y value of a feature point.
Parameters:
int - val the new designator constant.

get_op3

public int get_op3(composer comp_obj)
Fetch the up-to-date value of the third referent (operand) for this rule. This may require computing that value if it hasn't been computed yet.
Parameters:
composer - comp_obj the composer object doing the evaluation. This object provides access the referent and keeps bookkeeping regarding whether it has already been computed.
Returns:
int the up-to-date value of referent.

eval

public abstract int eval(composer comp_obj)
Evaluate the rule to produce a value. This basically just executes the function associated with the rule. Here this is still abstract.
Parameters:
composer - comp_obj the composer object doing the evaluation. This object provides access the value of other parts, and to the set of parameters to the composition. It also keeps some of the evauation bookkeeping.
Returns:
int the result of the evaluation.
Overrides:
eval in class op2_placement_rule