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.
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()