adams.data.spreadsheet.cellfinder
Class SingleCell

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.spreadsheet.cellfinder.AbstractCellFinder
              extended by adams.data.spreadsheet.cellfinder.SingleCell
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<AbstractCellFinder>, SizeOfHandler, Serializable

public class SingleCell
extends AbstractCellFinder

Simple locator that just locates a single cell.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to 
    the console (0 = off).
    default: 0
    minimum: 0
 
-row <adams.core.Index> (property: row)
    The row to locate.
    default: first
 
-column <adams.core.Index> (property: column)
    The column to locate.
    default: first
 

Version:
$Revision: 6866 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  SpreadSheetColumnIndex m_Column
          the column.
protected  Index m_Row
          the row.
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
SingleCell()
           
 
Method Summary
 String columnTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  Iterator<CellLocation> doFindCells(SpreadSheet sheet)
          Performs the actual locating.
 SpreadSheetColumnIndex getColumn()
          Returns the column to locate.
 Index getRow()
          Returns the row to locate.
 String globalInfo()
          Returns a string describing the object.
 String rowTipText()
          Returns the tip text for this property.
 void setColumn(SpreadSheetColumnIndex value)
          Sets the column to locate.
 void setRow(Index value)
          Sets the row to locate.
 
Methods inherited from class adams.data.spreadsheet.cellfinder.AbstractCellFinder
check, findCells, forCommandLine, forName, getCellFinders, shallowCopy, shallowCopy
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Row

protected Index m_Row
the row.


m_Column

protected SpreadSheetColumnIndex m_Column
the column.

Constructor Detail

SingleCell

public SingleCell()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractOptionHandler

setRow

public void setRow(Index value)
Sets the row to locate.

Parameters:
value - the row

getRow

public Index getRow()
Returns the row to locate.

Returns:
the row

rowTipText

public String rowTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the gui

setColumn

public void setColumn(SpreadSheetColumnIndex value)
Sets the column to locate.

Parameters:
value - the column

getColumn

public SpreadSheetColumnIndex getColumn()
Returns the column to locate.

Returns:
the column

columnTipText

public String columnTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the gui

doFindCells

protected Iterator<CellLocation> doFindCells(SpreadSheet sheet)
Performs the actual locating.

Specified by:
doFindCells in class AbstractCellFinder
Parameters:
sheet - the sheet to locate the cells in
Returns:
the iterator over the locations


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.