Class tred.Item
All Packages Class Hierarchy This Package Previous Next Index
Class tred.Item
java.lang.Object
|
+----tred.EditorObject
|
+----tred.Item
- public class Item
- extends EditorObject
- implements Cloneable
abstract class Item to items
-
delete(int, int)
- This methid is implemented to be overridden.
-
getSlot()
-
-
isInfinite()
-
-
move(EditorObject, int, int)
-
This method changes the objects slot reference to new location.
-
move(int, int)
-
This method changes the objects x and y coordinates to new location.
-
move(Trash, int, int)
-
-
paint(Graphics)
-
Generic paint method for Items.
-
setInfinite()
-
-
toString()
-
setInfinite
public void setInfinite()
isInfinite
public boolean isInfinite()
getSlot
protected Slot getSlot()
- Returns:
- the slot this item is attached to.
- See Also:
- Slot
move
public void move(int x,
int y)
- This method changes the objects x and y coordinates to new location.
- Overrides:
- move in class EditorObject
delete
public boolean delete(int x,
int y)
- This methid is implemented to be overridden.
- Overrides:
- delete in class EditorObject
move
public void move(Trash trash,
int x,
int y)
move
public void move(EditorObject object,
int x,
int y)
- This method changes the objects slot reference to new location. If
there was any previous location where this object was attached to
the item reference of the old slot is set empty by invoking
putItem(null) for the old slot.
If reference to origSlot is null it is set to point to the new slot.
- Overrides:
- move in class EditorObject
paint
public boolean paint(Graphics g)
- Generic paint method for Items. The items movement after the release
(MouseUp) is handled here.
- Returns:
- true if the place this object is moving to is reached; false
if the movement is not completed.
- Overrides:
- paint in class EditorObject
toString
public String toString()
- Overrides:
- toString in class EditorObject
All Packages Class Hierarchy This Package Previous Next Index