plugins.big.bigsnake.keeper
Class KeepersList

java.lang.Object
  extended by plugins.big.bigsnake.keeper.KeepersList

public class KeepersList
extends java.lang.Object

Class that encapsulates a list of Snake2DKeepers.

Version:
May 3, 2014
Author:
Nicolas Chenouard (nicolas.chenouard@gmail.com), Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Emrah Bostan (emrah.bostan@gmail.com)

Constructor Summary
KeepersList()
          Default constructor.
 
Method Summary
 boolean activateSnakeKeeper(int i)
          Activates the i-th SnakeKeeper form the internal list.
 boolean activateSnakeKeeper(SnakeKeeper keeper)
          If the SnakeKeeper passed as a parameter is in the list, it becomes activated and the method returns true.
 void addAndActivateKeeper(SnakeKeeper keeper)
          Adds a SnakeKeeper at the end of the list, and sets it to selected.
 void convertAllSnakesToROIs()
          Transforms all ROIs present on the list to standard ROIs for Icy.
 void deactivateActiveSnakeKeeper()
          Deactivates the active SnakeKeeper if any.
 boolean deactivateSnakeKeeper(SnakeKeeper keeper)
          If the SnakeKeeper passed as a parameter is in the list, it becomes deactivated and the method returns true.
 SnakeKeeper getActiveSnakeKeeper()
          Returns the active SnakeKeeper.
 int getNumKeepers()
          Returns the number of SnakeKeeper in the internal list.
 boolean isActiveSnakeKeeper(SnakeKeeper keeper)
          Returns true if the SnakeKeeper passed as a parameters if the active one.
 boolean isEmpty()
          Returns true is the list contains no elements.
 void removeActiveSnakeKeeper()
          Removes the active SnakeKeeper from the list and sets to active the next one in the list.
 void removeAllSnakeKeepers()
          Removes all of the elements from the list, and removes the SnakeKeeper from the associated images.
 void setSnakeEditMode(SnakeEditMode editingMode)
          Sets the SnakeEditMode to all elements of SnakeKeeper contained in the list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepersList

public KeepersList()
Default constructor.

Method Detail

activateSnakeKeeper

public boolean activateSnakeKeeper(SnakeKeeper keeper)
If the SnakeKeeper passed as a parameter is in the list, it becomes activated and the method returns true. If the element is not in the list, the method returns false.


activateSnakeKeeper

public boolean activateSnakeKeeper(int i)
Activates the i-th SnakeKeeper form the internal list. If the list have less than i-th elements, the method returns false, otherwise it returns true.


addAndActivateKeeper

public void addAndActivateKeeper(SnakeKeeper keeper)
Adds a SnakeKeeper at the end of the list, and sets it to selected.


convertAllSnakesToROIs

public void convertAllSnakesToROIs()
Transforms all ROIs present on the list to standard ROIs for Icy.


deactivateActiveSnakeKeeper

public void deactivateActiveSnakeKeeper()
Deactivates the active SnakeKeeper if any.


deactivateSnakeKeeper

public boolean deactivateSnakeKeeper(SnakeKeeper keeper)
If the SnakeKeeper passed as a parameter is in the list, it becomes deactivated and the method returns true. If the element is not in the list, the method returns false.


getActiveSnakeKeeper

public SnakeKeeper getActiveSnakeKeeper()
Returns the active SnakeKeeper.


getNumKeepers

public int getNumKeepers()
Returns the number of SnakeKeeper in the internal list.


isActiveSnakeKeeper

public boolean isActiveSnakeKeeper(SnakeKeeper keeper)
Returns true if the SnakeKeeper passed as a parameters if the active one.


isEmpty

public boolean isEmpty()
Returns true is the list contains no elements.


removeActiveSnakeKeeper

public void removeActiveSnakeKeeper()
Removes the active SnakeKeeper from the list and sets to active the next one in the list. If the removed keeper is the last one in the list.


removeAllSnakeKeepers

public void removeAllSnakeKeepers()
Removes all of the elements from the list, and removes the SnakeKeeper from the associated images.


setSnakeEditMode

public void setSnakeEditMode(SnakeEditMode editingMode)
Sets the SnakeEditMode to all elements of SnakeKeeper contained in the list.