Package dk.vajhoej.model.graphic.adv
Interface CommonGraphicWrapper
-
- All Known Implementing Classes:
BoxGraphicWrapper,BoxPaletteGraphicWrapper,ComponentGraphicWrapper,ComponentPaletteGraphicWrapper,ConnectionGraphicWrapper,ConnectionPaletteGraphicWrapper,EmptyGraphicWrapper,ModelGraphicWrapper,ModelGraphicWrapperAdv,PictureGraphicWrapper
public interface CommonGraphicWrapperInterface CommonGraphicWrapper describes the functionality required by all the GUI wrapper classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacceptItem(java.lang.Object item)Will component accept item.voidaddItem(AllGraphicConfig cfg, java.lang.Object item, java.awt.Point p)Add item to component.java.lang.Object[]createNew()Objects component can create.doublegetAngle()Get existing angle.doublegetHor()Get existing horizontal move.java.lang.ObjectgetRealObject()Get model object represented by component.java.awt.datatransfer.TransferablegetTransferableObject()Get tranferable object.doublegetVer()Get existing vertical move.booleanisReadonly()Is component readonly.booleanisRotating()Is the component a rotating component.voidremoveItem(CommonGraphicWrapper item)Remove item from component.voidrotate(double angle, double hor, double ver)Rotate component.voidupdateState()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 configurationitem- object to be addedp- 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 anglehor- horizontal movever- 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
-
-