dk.vajhoej.model.graphic.adv
Interface CommonGraphicWrapper

All Known Implementing Classes:
BoxGraphicWrapper, BoxPaletteGraphicWrapper, ComponentGraphicWrapper, ComponentPaletteGraphicWrapper, ConnectionGraphicWrapper, ConnectionPaletteGraphicWrapper, EmptyGraphicWrapper, ModelGraphicWrapper, ModelGraphicWrapperAdv, PictureGraphicWrapper

public interface CommonGraphicWrapper

Interface CommonGraphicWrapper describes the functionality required by all the GUI wrapper classes.


Method Summary
 boolean acceptItem(java.lang.Object item)
          Will component accept item.
 void addItem(AllGraphicConfig cfg, java.lang.Object item, java.awt.Point p)
          Add item to component.
 java.lang.Object[] createNew()
          Objects component can create.
 double getAngle()
          Get existing angle.
 double getHor()
          Get existing horizontal move.
 java.lang.Object getRealObject()
          Get model object represented by component.
 java.awt.datatransfer.Transferable getTransferableObject()
          Get tranferable object.
 double getVer()
          Get existing vertical move.
 boolean isReadonly()
          Is component readonly.
 boolean isRotating()
          Is the component a rotating component.
 void removeItem(CommonGraphicWrapper item)
          Remove item from component.
 void rotate(double angle, double hor, double ver)
          Rotate component.
 void updateState()
          Update state of component.
 

Method Detail

isReadonly

boolean isReadonly()
Is component readonly.

Returns:
readonly

acceptItem

boolean acceptItem(java.lang.Object item)
Will component accept item.

Parameters:
item - object to be added
Returns:
accept status

addItem

void addItem(AllGraphicConfig cfg,
             java.lang.Object item,
             java.awt.Point p)
Add item to component.

Parameters:
cfg - graphic configuration
item - object to be added
p - point to add it

removeItem

void removeItem(CommonGraphicWrapper item)
Remove item from component.

Parameters:
item - object to be removed

updateState

void updateState()
Update state of component.


getRealObject

java.lang.Object getRealObject()
Get model object represented by component.

Returns:
model object

getTransferableObject

java.awt.datatransfer.Transferable getTransferableObject()
Get tranferable object.

Returns:
tranferable object

isRotating

boolean isRotating()
Is the component a rotating component.

Returns:
rotating

rotate

void rotate(double angle,
            double hor,
            double ver)
Rotate component.

Parameters:
angle - rotation angle
hor - horizontal move
ver - vertical move

getAngle

double getAngle()
Get existing angle.

Returns:
angle

getHor

double getHor()
Get existing horizontal move.

Returns:
horizontal move

getVer

double getVer()
Get existing vertical move.

Returns:
vertical move.

createNew

java.lang.Object[] createNew()
Objects component can create.

Returns:
objects