Interface DragPoint

All Superinterfaces:
ArooaConfiguration
All Known Implementing Classes:
DragConfiguration, DragContext

public interface DragPoint extends ArooaConfiguration
A point in a configuration that supports drag and drop/cut and paste.
Author:
rob
  • Method Summary

    Modifier and Type
    Method
    Description
    Begin a change.
    Provide a copy of the configuration at from this DragPoint as XML.
    cut()
    Copy this DragPoints configuration and remove it.
    void
    Remove this DragPoint from it's underlying configuration and remove any components in the configuration from the ComponentPool
    void
    paste(int index, String config)
    Parse an XML Text configuration and add the resultant component to this DragPoint with the given index.
    List the possible children a Drag Point can have for Add Job functionality.
    boolean
    True if this DragPoint supports the cut operation.
    boolean
    True if this DragPoint supports the paste operation.

    Methods inherited from interface org.oddjob.arooa.ArooaConfiguration

    parse
  • Method Details

    • beginChange

      DragTransaction beginChange(ChangeHow how)
      Begin a change. Changes must happen in a transaction because when dragging a component within the same session the cut must be done before the paste otherwise duplicate IDs would occur.
      Parameters:
      how - Should an existing transaction be in progress or not.
      Returns:
      A transaction. Never null.
    • supportsCut

      boolean supportsCut()
      True if this DragPoint supports the cut operation.
      Returns:
      true/false.
    • supportsPaste

      boolean supportsPaste()
      True if this DragPoint supports the paste operation.
      Returns:
      true/false.
    • cut

      String cut()
      Copy this DragPoints configuration and remove it.

      This is used by the Web Front end. The Swing UI uses delete().

    • copy

      String copy()
      Provide a copy of the configuration at from this DragPoint as XML.
      Returns:
      Text XML.
    • delete

      void delete()
      Remove this DragPoint from it's underlying configuration and remove any components in the configuration from the ComponentPool

      This is used by the swing GUI ArooaTransferHandler to perform the CUT operation.

      This operation must be done within the context of a transaction.

    • paste

      void paste(int index, String config) throws ArooaParseException
      Parse an XML Text configuration and add the resultant component to this DragPoint with the given index.

      This operation must be done within the context of a transaction.

      Parameters:
      index - The index. -1 will append.
      config - The configuration.
      Throws:
      ArooaParseException - If the configuration could not be parsed.
    • possibleChildren

      QTag[] possibleChildren()
      List the possible children a Drag Point can have for Add Job functionality. supportsPaste() must be true for this to work.
      Returns:
      All that child tags that could be added with a paste operation.