sub_arctic.style
Interface composition_part

All Known Subinterfaces:
blank
All Known Implementing Classes:
composition_part_base

public abstract interface composition_part

This interface provides the API for something that can be part of an interactor image composition. These objects have a size and position, and provide an operation to draw themselves on request. In addition, the object can optionally advertise one or more feature points. These are significant locations within themselves that can be used for alignment.

See Also:
composer

Method Summary
 boolean can_set_h()
          Does the object support setting it's height to externally defined values?
 boolean can_set_w()
          Does the object support setting it's width to externally defined values?
 void draw_self(drawable on_surf, int at_x, int at_y)
          Draw the object on the given drawing surface at the given location.
 java.awt.Point feature_point(int indx)
          Return the feature point corresponding to a given feature point index.
 int h()
          Current height of the object.
 int num_feature_points()
          The number of feature points that this object has.
 void set_h(int val)
          Set the height of this object to the given value.
 void set_w(int val)
          Set the width of this object to the given value.
 void set_x(int val)
          Set the current x location of the object.
 void set_y(int val)
          Set the current y location of the object.
 int w()
          Current width of the object.
 int x()
          Current x location of the object.
 int y()
          Current y location of the object.
 

Method Detail

x

public int x()
Current x location of the object. This is normally set by the composer during layout.
Returns:
int the x location of the object

set_x

public void set_x(int val)
Set the current x location of the object. This is normally set by the composer during layout.
Parameters:
int - val the new value for the x location of the object

y

public int y()
Current y location of the object. This is normally set by the composer during layout.
Returns:
int the y location of the object

set_y

public void set_y(int val)
Set the current y location of the object. This is normally set by the composer during layout.
Parameters:
int - val the new value for the y location of the object

w

public int w()
Current width of the object. This is normally intrinsic to the object.
Returns:
int the width of the object

can_set_w

public boolean can_set_w()
Does the object support setting it's width to externally defined values?
Returns:
boolean indicating whether w is setable.

set_w

public void set_w(int val)
Set the width of this object to the given value. If can_set_w() returns false, then this method will throw an error.

h

public int h()
Current height of the object. This is normally intrinsic to the object.
Returns:
int the height of the object

can_set_h

public boolean can_set_h()
Does the object support setting it's height to externally defined values?
Returns:
boolean indicating whether h is setable.

set_h

public void set_h(int val)
Set the height of this object to the given value. If can_set_h() returns false, then this method will throw an error.

num_feature_points

public int num_feature_points()
The number of feature points that this object has. A feature point is a significant location within the object that can be used for alignment. Objects need not export their top, bottom, left, or right as feature points since these are already provided by the system.
Returns:
int the number of feature points of this object

feature_point

public java.awt.Point feature_point(int indx)
Return the feature point corresponding to a given feature point index. If this point is not in the range 0 ... num_feature_points()-1, 0,0 is returned.
Parameters:
int - indx the index of the point being requested.
Returns:
Point the requested feature point.

draw_self

public void draw_self(drawable on_surf,
                      int at_x,
                      int at_y)
Draw the object on the given drawing surface at the given location.
Parameters:
drawable - on_surf the drawing surface to draw on.
int - at_x the x location to draw at.
int - at_y the y location to draw at.