com.miginfocom.calendar.category
Class CategoryInteractionBroker

java.lang.Object
  extended by com.miginfocom.ashape.interaction.AbstractInteractionBroker
      extended by com.miginfocom.calendar.category.CategoryInteractionBroker
All Implemented Interfaces:
InteractionBroker

public class CategoryInteractionBroker
extends AbstractInteractionBroker

Extends the default broker with some specific commands for Category objects.


Field Summary
static PropertyKey CMD_TOGGLE_HIDDEN
          A command used for setting or toggeling the hidden state on the Category name is not used.
 
Constructor Summary
CategoryInteractionBroker(Category category)
          Constructor.
CategoryInteractionBroker(java.lang.Object categoryID)
           
 
Method Summary
 Category getCategory()
          Returns the category sent into the constructor.
 boolean handleCommand(Interactor interactor, Command cmd, java.awt.event.InputEvent e)
          Handels one command.
 
Methods inherited from class com.miginfocom.ashape.interaction.AbstractInteractionBroker
handleCommands
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD_TOGGLE_HIDDEN

public static final PropertyKey CMD_TOGGLE_HIDDEN
A command used for setting or toggeling the hidden state on the Category name is not used. value: If Boolean.TRUE will be hidden, if Boolean.FALSE will not be hidden and if null will toggle.

See Also:
MigUtil.isTrue(Object), Category.PROP_IS_HIDDEN
Constructor Detail

CategoryInteractionBroker

public CategoryInteractionBroker(Category category)
Constructor.

Parameters:
category - The category to manipulate. Not null.

CategoryInteractionBroker

public CategoryInteractionBroker(java.lang.Object categoryID)
Method Detail

handleCommand

public boolean handleCommand(Interactor interactor,
                             Command cmd,
                             java.awt.event.InputEvent e)
Description copied from class: AbstractInteractionBroker
Handels one command.

Specified by:
handleCommand in class AbstractInteractionBroker
Parameters:
interactor - The interactor the the interaction originated from
cmd - The command that is to be executed
e - The event that started the interaction, if any.
Returns:
IF the command was handled.

getCategory

public Category getCategory()
Returns the category sent into the constructor.

Returns:
The category sent into the constructor. Only null if the category is not in the depository any longer.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.