public class DragContext extends 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.
|
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 |
ConfigurationHandle |
parse(ArooaContext parentContext)
Parse the encapsulated configuration.
|
void |
paste(int index,
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 ConfigurationHandle parse(ArooaContext parentContext) throws ArooaParseException
ArooaConfiguration
parse
in interface ArooaConfiguration
parentContext
- The parent context to use.ConfigurationHandle
.ArooaParseException
public boolean supportsPaste()
DragPoint
supportsPaste
in interface DragPoint
public boolean supportsCut()
DragPoint
supportsCut
in interface DragPoint
public String copy()
DragPoint
public void cut()
DragPoint
ComponentPool
This operation must be done within the context of a transaction.