org.bs.mdi
Interface ActionConverter


public interface ActionConverter

Provides an interface for mechanisms that convert Action to Transferable objects. This conversion is needed in order for the clipboard data transfer functionality to work.


Method Summary
 boolean canHandle(Action action)
          Indicates that this ActionConverter can convert the given Action.
 boolean canHandle(Transferable transferable)
          Indicates that this ActionConverter can convert the given Transferable.
 Action toAction(Transferable transferable)
          Converts a Transferable to an Action.
 Transferable toTransferable(Action action)
          Converts an Action to a Transferable.
 

Method Detail

canHandle

public boolean canHandle(Action action)
Indicates that this ActionConverter can convert the given Action.

Parameters:
action - the Action which could be converted later by this ActionConverter
Returns:
true if the Action can be converted, false otherwise

canHandle

public boolean canHandle(Transferable transferable)
Indicates that this ActionConverter can convert the given Transferable.

Parameters:
transferable - the Transferable which could be converted by this ActionConverter
Returns:
true if the Transferable can be converted, false otherwise

toTransferable

public Transferable toTransferable(Action action)
Converts an Action to a Transferable.

Parameters:
action - the Action to be converted
Returns:
the Transferable object created by the conversion process, or null in case of an error

toAction

public Action toAction(Transferable transferable)
Converts a Transferable to an Action.

Parameters:
transferable - the Transferable to be converted
Returns:
the Action object created by the conversion process, or null in case of an error