com.atlassian.gadgets.dashboard.spi.changes
Class AddGadgetChange

java.lang.Object
  extended by com.atlassian.gadgets.dashboard.spi.changes.AddGadgetChange
All Implemented Interfaces:
DashboardChange

public final class AddGadgetChange
extends Object
implements DashboardChange

Details of adding a gadget to a dashboard. If this add operation is inserting a gadget to the beginning or middle of a column, it is the DashboardStateStore implementation's responsibility to properly update the positions of the gadgets that come after the added gadget.

Since:
2.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.gadgets.dashboard.spi.changes.DashboardChange
DashboardChange.Visitor
 
Constructor Summary
AddGadgetChange(GadgetState state, DashboardState.ColumnIndex columnIndex, int rowIndex)
           
 
Method Summary
 void accept(DashboardChange.Visitor visitor)
          Invokes the Visitors Visitor#visit(AddGadgetChange) method.
 DashboardState.ColumnIndex getColumnIndex()
          Get the index of the column where the gadget is being added
 int getRowIndex()
          Get the index of the row where the gadget is being added
 GadgetState getState()
          Get the state of the gadget being added
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddGadgetChange

public AddGadgetChange(GadgetState state,
                       DashboardState.ColumnIndex columnIndex,
                       int rowIndex)
Method Detail

accept

public void accept(DashboardChange.Visitor visitor)
Invokes the Visitors Visitor#visit(AddGadgetChange) method.

Specified by:
accept in interface DashboardChange
Parameters:
visitor - Visitor to invoke the specific visit method on.

getState

public GadgetState getState()
Get the state of the gadget being added

Returns:
the state of the gadget being added

getColumnIndex

public DashboardState.ColumnIndex getColumnIndex()
Get the index of the column where the gadget is being added

Returns:
the index of the column where the gadget is being added

getRowIndex

public int getRowIndex()
Get the index of the row where the gadget is being added

Returns:
the index of the row where the gadget is being added


Copyright © 2011 Atlassian. All Rights Reserved.