sub_arctic.style
Interface comp_placement_rule

All Known Implementing Classes:
op1_placement_rule

public abstract interface comp_placement_rule
extends composer_consts

This interface describes the API for composition placement rules. These rules determine one coordinate (x or y) of the position of a composition_part placed in a composition by a composer object. This is essentially a simple constraint function.

See Also:
composer, composition_part

Fields inherited from class sub_arctic.style.composer_consts
BOTTOM, CONST, DESIGNATOR_MASK, FEATURE_SHIFT, FEATURE_X, FEATURE_Y, HCENTER, HEIGHT, INTERIOR_HEIGHT, INTERIOR_WIDTH, INTERIOR_X, INTERIOR_Y, LAST_TYPE, LEFT, MAX_REFERENT, MK_PART_BLANK, MK_PART_COPY, MK_PART_IMAGE, MK_PART_INT_H_BLANK, MK_PART_INT_W_BLANK, MK_PART_INT_WH_BLANK, MK_PART_LAST, MK_PART_POINT, MK_PART_TEXT, parameter_type_names, PARM, PART, part_type_names, RIGHT, TOP, TYPE_BLANK, TYPE_BOOL, TYPE_COMP_PART, TYPE_IMAGE, TYPE_INT, TYPE_POINT, TYPE_STRING, TYPE_TEXT_REND, VCENTER, WIDTH
 
Method Summary
 int eval(composer comp_obj)
          Evaluate the rule to produce a value.
 

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.