com.miginfocom.ashape.interaction
Class AbstractInteractionBroker

java.lang.Object
  extended by com.miginfocom.ashape.interaction.AbstractInteractionBroker
All Implemented Interfaces:
InteractionBroker
Direct Known Subclasses:
ActivityViewInteractionBroker, AShapeAnimatorBroker, CategoryInteractionBroker, DefaultInteractionBroker

public abstract class AbstractInteractionBroker
extends java.lang.Object
implements InteractionBroker

Abstract implementation.

Breaks down the command set into Commands and calls handleCommand(Interactor, com.miginfocom.util.command.Command, java.awt.event.InputEvent) for them.

Override handleCommand(Interactor, com.miginfocom.util.command.Command, java.awt.event.InputEvent) to handle the command.


Constructor Summary
AbstractInteractionBroker()
           
 
Method Summary
abstract  boolean handleCommand(Interactor interactor, Command command, java.awt.event.InputEvent e)
          Handels one command.
 void handleCommands(Interactor interactor, CommandSet cmdSet, java.awt.event.InputEvent e)
          Handles the intended commands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInteractionBroker

public AbstractInteractionBroker()
Method Detail

handleCommands

public void handleCommands(Interactor interactor,
                           CommandSet cmdSet,
                           java.awt.event.InputEvent e)
Description copied from interface: InteractionBroker
Handles the intended commands.

Specified by:
handleCommands in interface InteractionBroker
Parameters:
interactor - The source if the interaction. If not originater from an Interactor it can be set to null.
cmdSet - The commands. Up to the implementation to interpret. Not null.
e - The event that started the chain, if available. Can be null.

handleCommand

public abstract boolean handleCommand(Interactor interactor,
                                      Command command,
                                      java.awt.event.InputEvent e)
Handels one command.

Parameters:
interactor - The interactor the the interaction originated from
command - The command that is to be executed
e - The event that started the interaction, if any.
Returns:
IF the command was handled.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.