java.lang.Objectcom.ibm.jdg2e.msseditor.core.MiniSS
Simple model for a "mini-spreadsheet" containing text/integer cell values.
MiniSSRow,
IMiniSSListener| Field Summary | |
static int |
DEFAULT_COLUMN_COUNT
|
static int |
DEFAULT_ROW_COUNT
|
static int |
MAX_COLUMN_COUNT
|
static int |
MAX_DEFAULT_ROW_COUNT
|
| Constructor Summary | |
MiniSS(java.io.InputStream is)
Set the rows based on the content of the provided semi-colon delimited input stream. |
|
MiniSS(int rowCount,
int columnCount)
Return a mini-spreadsheet having dimensions [rows,columns]. |
|
| Method Summary | |
void |
addMiniSpreadsheetListener(IMiniSSListener listener)
Add the listener. |
void |
appendRow(int afterIndex)
Insert a new row at the end. |
void |
clearAll()
Set all rows/columns to an empty string. |
protected void |
fireCellChanged(int row,
int column,
java.lang.String value)
Notify interested parties that the mini-spreadsheet has changed. |
int |
getColumnCount()
Returns the number of columns. |
int |
getInt(int row,
int column)
Get the value at [row,column] as an integer or zero if not a value integer format. |
int |
getRowCount()
Return the number of rows. |
MiniSSRow[] |
getRows()
Return the rows. |
java.lang.String |
getString(int row,
int column)
Get the value at [row,column] as a string. |
int |
getTotal()
Return the total of all integer cells. |
void |
load(java.io.InputStream is)
Set the rows based on the content of the provided semi-colon delimited input stream. |
void |
removeMiniSpreadsheetListener(IMiniSSListener listener)
Remove the listener. |
protected void |
removeRow(MiniSSRow msr)
Remove the given row and notify listeners. |
void |
save(java.lang.StringBuffer sb)
Save the current contents in a semi-colon delimited text file. |
void |
setData(int row,
int column,
java.lang.String newValue)
Set the value at [row,column] to a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_COLUMN_COUNT
public static final int DEFAULT_ROW_COUNT
public static final int MAX_COLUMN_COUNT
public static final int MAX_DEFAULT_ROW_COUNT
| Constructor Detail |
public MiniSS(java.io.InputStream is)
throws org.eclipse.core.runtime.CoreException
public MiniSS(int rowCount,
int columnCount)
| Method Detail |
public void addMiniSpreadsheetListener(IMiniSSListener listener)
IMiniSSListenerpublic void appendRow(int afterIndex)
public void clearAll()
protected void fireCellChanged(int row,
int column,
java.lang.String value)
IMiniSSListenerpublic int getColumnCount()
public int getInt(int row,
int column)
public int getRowCount()
public MiniSSRow[] getRows()
public java.lang.String getString(int row,
int column)
public int getTotal()
public void load(java.io.InputStream is)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionpublic void removeMiniSpreadsheetListener(IMiniSSListener listener)
IMiniSSListenerprotected void removeRow(MiniSSRow msr)
public void save(java.lang.StringBuffer sb)
public void setData(int row,
int column,
java.lang.String newValue)