javatools.util
Interface Clippable

All Known Implementing Classes:
IndexedTypedTreeNode

public interface Clippable

It is an interface to be used in things that can be clipped (i.e. cut, copied, pasted).


Method Summary
 void attach(Clippable newSon)
          Attaches another object into this one.
 boolean canBeAttached(Clippable newSon)
          Checks whether the passed object can be attached into this one.
 boolean canBeCopied()
          Checks whether this object can be copied or not.
 boolean canBeCut()
          Checks whether this object can be cut or not.
 Clippable copy()
          Copies this object.
 Clippable cut()
          Cuts the object.
 Clippable duplicate()
          Duplicates (clones) this object.
 java.lang.Object getPlace()
          Returns the place that contains this object.
 java.lang.String getType()
          Returns the type of the object.
 java.lang.Object getValue()
          Returns the value of the object.
 void paste(Clippable newFather)
          Pastes the object into another.
 void setPlace(java.lang.Object place)
          Sets the place where the object is put.
 void unclip()
          It means that the status of the object must be reset.
 

Method Detail

getType

public java.lang.String getType()
Returns the type of the object.

Returns:
The type of the object.

getValue

public java.lang.Object getValue()
Returns the value of the object.

Returns:
The value.

getPlace

public java.lang.Object getPlace()
Returns the place that contains this object.

Returns:
The object that contains this object.

setPlace

public void setPlace(java.lang.Object place)
Sets the place where the object is put.

Parameters:
place - The object that contains this object.

cut

public Clippable cut()
Cuts the object.

Returns:
The cut object.

copy

public Clippable copy()
Copies this object.

Returns:
The copied object.

unclip

public void unclip()
It means that the status of the object must be reset.


paste

public void paste(Clippable newFather)
Pastes the object into another.

Parameters:
newFather - The object to paste this object into.

attach

public void attach(Clippable newSon)
Attaches another object into this one.

Parameters:
newSon - The object to be pasted into this object.

canBeCut

public boolean canBeCut()
Checks whether this object can be cut or not.

Returns:
true: the object can be cut; false: otherwise.

canBeCopied

public boolean canBeCopied()
Checks whether this object can be copied or not.

Returns:
true: the object can be copied; false: otherwise.

canBeAttached

public boolean canBeAttached(Clippable newSon)
Checks whether the passed object can be attached into this one.

Parameters:
newSon - The new object that is going to be attached into this one.
Returns:
true: the object can be attached; false: otherwise.

duplicate

public Clippable duplicate()
Duplicates (clones) this object.

Returns:
The newly created object.