com.miginfocom.calendar.header
Class LabelOverrider

java.lang.Object
  extended by com.miginfocom.ashape.interaction.StaticInteractor
      extended by com.miginfocom.ashape.interaction.SimpleOverrider
          extended by com.miginfocom.calendar.header.LabelOverrider
All Implemented Interfaces:
Interactor, PropertyProvider

public class LabelOverrider
extends SimpleOverrider

A simple Interactor that overrides some property if a cell range overlaps the cell range (mouseover or pressed) in a DateGridHeader.


Field Summary
static java.lang.Object NO_OVERRIDE
           
 
Fields inherited from interface com.miginfocom.ashape.interaction.Interactor
TEMPLATE_CHAR
 
Constructor Summary
LabelOverrider(DateGridHeader header, DateCellRange cellRange, java.lang.String name, PropertyKey property, java.lang.Object mouseOverObj, java.lang.Object pressedObj)
          Constructor.
 
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.Object def)
          Override this method and return the overridden object If it should be overridden.
 
Methods inherited from class com.miginfocom.ashape.interaction.SimpleOverrider
getOverride, getOverrideById
 
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

NO_OVERRIDE

public static final java.lang.Object NO_OVERRIDE
Constructor Detail

LabelOverrider

public LabelOverrider(DateGridHeader header,
                      DateCellRange cellRange,
                      java.lang.String name,
                      PropertyKey property,
                      java.lang.Object mouseOverObj,
                      java.lang.Object pressedObj)
Constructor.

Parameters:
header - The header to check for mouse over and pressed cell ranges
cellRange - The cell range to react to
name - The name to react to
property - The preoperty to change
mouseOverObj - The object to return if mouse over (and not pressed, since pressed has priority). Can be null. If NO_OVERRIDE there will be no override for mouseover cell ranges.
pressedObj - The object to return if pressed. Can be null. If NO_OVERRIDE there will be no override for pressed cell ranges.
See Also:
getOverride(java.lang.Object).
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.

getOverride

public java.lang.Object getOverride(java.lang.Object def)
Description copied from class: SimpleOverrider
Override this method and return the overridden object If it should be overridden. Otherwise return def.

Specified by:
getOverride in class SimpleOverrider
Parameters:
def - The default object to return if there is no override under current conditions.
Returns:
The new object or def if no override


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.