com.miginfocom.calendar.category
Class CategoryStaticInteractor

java.lang.Object
  extended by com.miginfocom.ashape.interaction.StaticInteractor
      extended by com.miginfocom.calendar.category.CategoryStaticInteractor
All Implemented Interfaces:
Interactor, PropertyProvider

public class CategoryStaticInteractor
extends StaticInteractor

Interactor that cane translate template text TEMPL_CATEGORY_NAME to a Category's name.


Field Summary
protected  java.lang.Object categoryID
          The category object to interact with.
static java.lang.String TEMPL_CATEGORY_NAME
          Template text (a variable) that when sent into getOverride(java.lang.String, PropertyKey, java.lang.Object) will return the category name
 
Fields inherited from interface com.miginfocom.ashape.interaction.Interactor
TEMPLATE_CHAR
 
Constructor Summary
CategoryStaticInteractor(Category category)
          Deprecated. Use the ID version.
CategoryStaticInteractor(java.lang.Object categoryID)
           
 
Method Summary
 java.lang.Object getInteracted()
          Returns the object that this interactor is currently interacting with.
 InteractionBroker getInteractionBroker()
          Returns the interaction broker for this interactor.
 java.lang.Object getOverride(java.lang.String name, PropertyKey property, java.lang.Object def)
          Returns an alternate object for an overriden name/propName combination.
 java.lang.Object getOverrideById(java.lang.Object id, java.lang.Object def)
          Returns the override for the id.
 
Methods inherited from class com.miginfocom.ashape.interaction.StaticInteractor
addInteraction, addOverride, addOverrideListener, addOverrideListener, containsProperty, getInteractions, getProperty, isOverridden, processEvent, removeInteraction, removeOverride, removeOverrideListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPL_CATEGORY_NAME

public static final java.lang.String TEMPL_CATEGORY_NAME
Template text (a variable) that when sent into getOverride(java.lang.String, PropertyKey, java.lang.Object) will return the category name

See Also:
Constant Field Values

categoryID

protected final java.lang.Object categoryID
The category object to interact with.

Constructor Detail

CategoryStaticInteractor

public CategoryStaticInteractor(Category category)
Deprecated. Use the ID version.

Parameters:
category -

CategoryStaticInteractor

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

getInteractionBroker

public InteractionBroker getInteractionBroker()
Description copied from interface: Interactor
Returns the interaction broker for this interactor. The broker is normally responsible for effectuating DefaultCommands.

Returns:
The interaction broker for this interactor. May be null if there is not broker.

getInteracted

public java.lang.Object getInteracted()
Description copied from interface: Interactor
Returns the object that this interactor is currently interacting with.

Returns:
The object that this interactor is currently interacting with. May be null.

getOverrideById

public java.lang.Object getOverrideById(java.lang.Object id,
                                        java.lang.Object def)
Description copied from interface: Interactor
Returns the override for the id.

Parameters:
id - The id of the override to return. Not null.
def - The object to return if no overrider is registered for id.
Returns:
The new object to use. Might be null.

getOverride

public java.lang.Object getOverride(java.lang.String name,
                                    PropertyKey property,
                                    java.lang.Object def)
Description copied from interface: Interactor
Returns an alternate object for an overriden name/propName combination.

Might for instance return a different color for a background. Normally an Interaction of some kind uses a DefaultCommand to set/reset/add/toggle/cucle an override.

If many overrides are added for the name/propName combination the last added will be returned.

Parameters:
name - Then name of the object (caller) that will be compared to the interaction's target.
property - The property key to return the override for. E.g. AShape.A_PAINT. Not null.
def - The object to return if no overrider is registered for name/propName combination.
Returns:
The new object to use. Might be null.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.