com.miginfocom.calendar.activity.view
Class GridRowInteractionBroker

java.lang.Object
  extended by com.miginfocom.ashape.interaction.AbstractInteractionBroker
      extended by com.miginfocom.ashape.interaction.DefaultInteractionBroker
          extended by com.miginfocom.calendar.activity.view.GridRowInteractionBroker
All Implemented Interfaces:
InteractionBroker

public class GridRowInteractionBroker
extends DefaultInteractionBroker

An interaction broker to interact with an ActivityView.

Contains commands that can are targeted at manipulating and affecting a specific ActivityView object.


Field Summary
static PropertyKey CMD_REMOVE_PROPERTY
          A command used for removing a property on the Activity.
static PropertyKey CMD_SET_PROPERTY
          A command used for setting a property on the Activity.
static PropertyKey CMD_TOGGLE_GRID_ROW_FOLDING
          A command used for toggeling the folded state on the grid row.
protected  GridRow gridRow
          The activity view to interact with.
 
Fields inherited from class com.miginfocom.ashape.interaction.DefaultInteractionBroker
CMD_ADD_OVERRIDE, CMD_ANIMATOR_CONTROL, CMD_CONSUME, CMD_CYCLE_OVERRIDE, CMD_FIRE_INTERACTION_EVENT, CMD_REMOVE_OVERRIDE, CMD_SET_CURSOR, CMD_SET_CURSOR_FROM_ASHAPE, CMD_SET_OVERRIDE, CMD_TOGGLE_OVERRIDE
 
Constructor Summary
GridRowInteractionBroker(GridRow gridRow, javax.swing.JComponent comp, InteractionListener iListener)
          Constructor
 
Method Summary
 GridRow getGridRow()
          Returns the grid row 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.DefaultInteractionBroker
getComponent
 
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_SET_PROPERTY

public static final PropertyKey CMD_SET_PROPERTY
A command used for setting a property on the Activity.

Note that if the property set was vetoed that is silently ignored and the property will not be set.

name is the property name and value is the value to set


CMD_REMOVE_PROPERTY

public static final PropertyKey CMD_REMOVE_PROPERTY
A command used for removing a property on the Activity.

name is the property name.


CMD_TOGGLE_GRID_ROW_FOLDING

public static final PropertyKey CMD_TOGGLE_GRID_ROW_FOLDING
A command used for toggeling the folded state on the grid row.

Actually just sets the property GridRow.FOLDED to what it's not currently.

See Also:
GridRow.FOLDED

gridRow

protected final GridRow gridRow
The activity view to interact with. For instance setting/getting/removing properties to/from. Not null.

Constructor Detail

GridRowInteractionBroker

public GridRowInteractionBroker(GridRow gridRow,
                                javax.swing.JComponent comp,
                                InteractionListener iListener)
Constructor

Parameters:
gridRow - The grid row to interact with. For instance setting/getting/removing properties to/from. Not null.
comp - The component to use for setting new cursors among other things. Will be kept in a WeakReference and might be null.
iListener - The listener to InteractionEvents. Will be kept in a WeakReference and might be null.
Method Detail

handleCommand

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

Overrides:
handleCommand in class DefaultInteractionBroker
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.

getGridRow

public GridRow getGridRow()
Returns the grid row sent into the constructor.

Returns:
The grid row sent into the constructor. Never null.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.