|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A model for the clipboard.
Method Summary | |
boolean |
canCopy(Component srcComponent)
Returns true if the given component can be copied. |
boolean |
canCut(Component srcComponent)
Returns true if the given component can be cut. |
boolean |
canPaste(Component dstComponent)
Returns true if the clipboard's content can be pasted into the given component. |
boolean |
canPasteAsShared(Component dstComponent)
Returns true if the clipboard's content can be pasted into the given component as a shared component. |
void |
copy(Component srcComponent,
GraphModel srcGraph,
Factory srcFactory)
Copies the given component. |
void |
cut(Component srcComponent,
GraphModel srcGraph,
Factory srcFactory)
Cuts the given component. |
void |
paste(Component dstComponent,
GraphModel dstGraph,
Factory dstFactory)
Pastes the clipboard's content into the given component. |
void |
pasteAsShared(Component dstComponent,
GraphModel dstGraph,
Factory dstFactory)
Pastes the clipboard's content into the given component, as a shared component. |
Method Detail |
public boolean canCut(Component srcComponent)
srcComponent
- the component to be cut.
public void cut(Component srcComponent, GraphModel srcGraph, Factory srcFactory)
srcComponent
- the component to be cut.srcGraph
- the graph model that contains the coordinates of the
component.srcFactory
- the factory to be used to create a clone of the given
component. This clone is then stored in the clipboard.public boolean canCopy(Component srcComponent)
srcComponent
- the component to be copied.
public void copy(Component srcComponent, GraphModel srcGraph, Factory srcFactory)
srcComponent
- the component to be copied.srcGraph
- the graph model that contains the coordinates of the
component.srcFactory
- the factory to be used to create a clone of the given
component. This clone is then stored in the clipboard.public boolean canPaste(Component dstComponent)
dstComponent
- the component into which the clipboard's content must
be pasted.
public void paste(Component dstComponent, GraphModel dstGraph, Factory dstFactory)
dstComponent
- the component into which the clipboard's content must
be pasted.dstGraph
- the graph model into which the coordinates of the
clipboard's component must be pasted.dstFactory
- the factory to be used to create a clone of the
clipboard's content. This clone is then added as a sub component of
the given component.public boolean canPasteAsShared(Component dstComponent)
dstComponent
- the component into which the clipboard's content must
be pasted as a shared component.
public void pasteAsShared(Component dstComponent, GraphModel dstGraph, Factory dstFactory)
dstComponent
- the component into which the clipboard's content must
be pasted.dstGraph
- the graph model into which the coordinates of the
clipboard's component must be pasted.dstFactory
- the factory to be used to create a slave component of the
clipboard's content. This slave component is then added as a sub
component of the given component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |