public class DragContext extends java.lang.Object implements DragPoint
DragPoint
for an ArooaContext
.
This implementation of a DragPoint will provide drag and drop support for a component from it's context.
Constructor and Description |
---|
DragContext(ArooaContext context)
Only constructor.
|
Modifier and Type | Method and Description |
---|---|
DragTransaction |
beginChange(ChangeHow how)
Begin a change.
|
java.lang.String |
copy()
Provide a copy of the configuration at from this DragPoint
as XML.
|
void |
cut()
Remove this DragPoint from it's underlying configuration and
remove any components in the configuration from the
ComponentPool |
<P extends ParseContext<P>> |
parse(P parentContext)
Parse the encapsulated configuration.
|
void |
paste(int index,
java.lang.String config)
Parse an XML Text configuration and add the resultant component
to this DragPoint with the given index.
|
boolean |
supportsCut()
True if this DragPoint supports the cut operation.
|
boolean |
supportsPaste()
True if this DragPoint supports the paste operation.
|
public DragContext(ArooaContext context)
context
- The context of the component. Must not be null.public DragTransaction beginChange(ChangeHow how)
DragPoint
beginChange
in interface DragPoint
how
- Should an existing transaction be in progress or not.public <P extends ParseContext<P>> ConfigurationHandle<P> parse(P parentContext) throws ArooaParseException
ArooaConfiguration
parse
in interface ArooaConfiguration
P
- The type of the context in which parsing occurs.parentContext
- The context in which this configuration will be
parsed. This context will provide the
ArooaHandler
, and therefore
subsequent child contexts.ConfigurationHandle
. The handle provides access to the context created
as the result of the parse and a way of saving this context back into the configuration.ArooaParseException
- If parsing fails.public boolean supportsPaste()
DragPoint
supportsPaste
in interface DragPoint
public boolean supportsCut()
DragPoint
supportsCut
in interface DragPoint
public java.lang.String copy()
DragPoint
public void cut()
DragPoint
ComponentPool
This operation must be done within the context of a transaction.
public void paste(int index, java.lang.String config)
DragPoint
This operation must be done within the context of a transaction.