com.ibm.lab.soln.editor.core
Class MiniSpreadsheetRow

java.lang.Object
  |
  +--com.ibm.lab.soln.editor.core.MiniSpreadsheetRow
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable

public class MiniSpreadsheetRow
extends java.lang.Object
implements org.eclipse.core.runtime.IAdaptable

Represents a single row of a mini-spreadsheet.

See Also:
MiniSpreadsheet

Constructor Summary
MiniSpreadsheetRow(MiniSpreadsheet mss, int columnCount, int rowIndex)
          Create a new row.
 
Method Summary
 java.lang.Object getAdapter(java.lang.Class adapter)
          Allow instances of this class to be adapted to other interfaces.
 int getColumnCount()
          Return the number of columns.
 int getInt(int columnIndex)
          Get the value at [column] as an integer or zero if not a value integer format.
 int getRowIndex()
          Return the row number of this instance in the mini-spreadsheet.
 java.lang.String getString(int columnIndex)
          Get the value at [column] as a string.
 boolean hasInts()
          Return true if any data in this row is a valid integer.
 boolean isInt(int columnIndex)
          Return true if the data at [column] is a valid integer.
 void remove()
          Remove this instance from the mini-spreadsheet.
 void setData(int columnIndex, int value)
          Set the value at [column] to integer.
 void setData(int columnIndex, java.lang.String value)
          Set the value at [column] to string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniSpreadsheetRow

public MiniSpreadsheetRow(MiniSpreadsheet mss,
                          int columnCount,
                          int rowIndex)
Create a new row.

Method Detail

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Allow instances of this class to be adapted to other interfaces. This is required to implement action filters.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
See Also:
IAdaptable.getAdapter(Class), MiniSpreadsheetRowActionFilter, MiniSpreadsheetUIPlugin.startup()

getColumnCount

public int getColumnCount()
Return the number of columns.


getInt

public int getInt(int columnIndex)
Get the value at [column] as an integer or zero if not a value integer format.


getRowIndex

public int getRowIndex()
Return the row number of this instance in the mini-spreadsheet.


getString

public java.lang.String getString(int columnIndex)
Get the value at [column] as a string.


hasInts

public boolean hasInts()
Return true if any data in this row is a valid integer.


isInt

public boolean isInt(int columnIndex)
Return true if the data at [column] is a valid integer.


remove

public void remove()
Remove this instance from the mini-spreadsheet.


setData

public void setData(int columnIndex,
                    int value)
Set the value at [column] to integer.


setData

public void setData(int columnIndex,
                    java.lang.String value)
Set the value at [column] to string. Since the persistent data is semi-colon delimited, semi-colons are translated to underscores.