GP
Interface Graphic

All Superinterfaces:
Behavioral, Colorable, Movable, Orientable, Originable, Playable, Positionable, Refreshable, Scalable, Selectable, Viewable
All Known Implementing Classes:
Shape

public interface Graphic
extends Scalable, Positionable, Originable, Orientable, Colorable, Playable, Viewable, Selectable, Refreshable, Behavioral, Movable

This defines the interface for object that can be contained graphically within other objects. These objects can also have behavioral objects added to them which modify there behavioral patterns.


Method Summary
 Graphic Copy()
           
 Size GetBoxBoundedSize()
           
 Container GetContainer()
          This method should return the graphical container of the object.
 GP.Drawers.FillStyle GetFillStyle()
           
 boolean IsPositionInside(Position position)
          This methods should determine whether the position passed into it is inside the graphical boundries of the object, and return the result of that calculation.
 boolean PositionIsOnlyInsideMe(Position position)
          This method should determine whether the position passed into it is inside the graphical boundries of the object, but not within any of its sub-objects, and return the result of that calculation.
 Size PreferedSize()
           
 void SetContainer(Container container)
          This method sets which container the object is in.
 void SetFillStyle(GP.Drawers.FillStyle fillStyle)
           
 void Show(Container container)
          Show the graphical object in a new container
 
Methods inherited from interface GP.Scalable
GetSize, Scale, Scale, Scale, SetSize
 
Methods inherited from interface GP.Positionable
GetPosition, Move, Move, Move, SetPosition
 
Methods inherited from interface GP.Orientable
GetOrientation, GetPivot, SetOrientation, Turn, Turn, Turn, Turn, Turn, Turn
 
Methods inherited from interface GP.Colorable
GetColor, SetColor
 
Methods inherited from interface GP.Playable
GetCurrentTime, Pause, Play, Stop
 
Methods inherited from interface GP.Viewable
Hide, IsVisible, Show
 
Methods inherited from interface GP.Selectable
DeSelect, Select
 
Methods inherited from interface GP.Refreshable
Refresh
 
Methods inherited from interface GP.Behavioral
AddBehavior, ApplyBehaviors, ApplyInstincts, RemoveAllBehaviors, RemoveBehavior, ReplaceAllBehaviors
 
Methods inherited from interface GP.Movable
MoveBackward, MoveForward, MoveToBack, MoveToFront
 

Method Detail

GetContainer

public Container GetContainer()
This method should return the graphical container of the object.
Returns:
the graphical container

PreferedSize

public Size PreferedSize()
Returns:
the prefered drawing size

IsPositionInside

public boolean IsPositionInside(Position position)
This methods should determine whether the position passed into it is inside the graphical boundries of the object, and return the result of that calculation.
Parameters:
position - the position in question
Returns:
true if the position is inside, false otherwise

PositionIsOnlyInsideMe

public boolean PositionIsOnlyInsideMe(Position position)
This method should determine whether the position passed into it is inside the graphical boundries of the object, but not within any of its sub-objects, and return the result of that calculation. This will usually be an identaical result to IsPositionInside(GP.Attributes.Position), but may differ when dealing with composite structures such as GP.MultiManagers
Parameters:
position - the position in question
Returns:
true if the position is inside this object only, false otherwise

Show

public void Show(Container container)
Show the graphical object in a new container
Parameters:
container -  

SetContainer

public void SetContainer(Container container)
This method sets which container the object is in. Unlike Show(GP.Container), it does not effect the objects visibility status.
Parameters:
container - the new graphical container

GetBoxBoundedSize

public Size GetBoxBoundedSize()

Copy

public Graphic Copy()

SetFillStyle

public void SetFillStyle(GP.Drawers.FillStyle fillStyle)

GetFillStyle

public GP.Drawers.FillStyle GetFillStyle()