sub_arctic.style
Class far_offset_rule

java.lang.Object
  |
  +--sub_arctic.style.op1_placement_rule
        |
        +--sub_arctic.style.op2_placement_rule
              |
              +--sub_arctic.style.op3_placement_rule
                    |
                    +--sub_arctic.style.far_offset_rule

public class far_offset_rule
extends op3_placement_rule

This class provides a composition placement rule for setting the width or height of something so that its a fixed distance from something else. For the 3 parameters A, B, C we compute B + C - A. Where A is normally the right/top edge of the object we are computing the width/height of.

See Also:
composer, composition_part

Fields inherited from class sub_arctic.style.op3_placement_rule
_ref_coord3, _ref_num3, _ref_obj3
 
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
far_offset_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
 int eval(composer comp_obj)
          Evaluate the rule to produce a value.
 
Methods inherited from class sub_arctic.style.op3_placement_rule
get_op3, ref_coord3, ref_num3, ref_obj3, set_ref_coord3, set_ref_num3, set_ref_obj3
 
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
 

Constructor Detail

far_offset_rule

public far_offset_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. Constraint computes ref2 + ref3 - ref1, where ref1 is normally the top or left edge of the object whose width is being computed, ref2 is the offset distance, and ref3 is the position offset from.
Parameters:
int - referent1 Designator for value used as x/y position of thing we are computing the width/height of.
int - refernent_num1 Number of part or parameter for referent1.
int - referent_coord1 designator for coordinate of the referent1.
int - referent2 designator for offest value.
int - refernent_num2 Number of part or parameter for referent2
int - referent_coord2 designator for coordinate of referent2.
int - referent3 designator for position we are offest from.
int - refernent_num3 Number of part or parameter for referent3.
int - referent_coord3 designator for coordinate of referent3.
Method Detail

eval

public int eval(composer comp_obj)
Evaluate the rule to produce a value. This basically just executes the function associated with the rule.
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 op3_placement_rule