|
www.sdmetrics.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--sdmetrics.app.RelMatrixAdapter
This class is an adapter to start the calculation of a set of relation
matrices and present them via the DataTable interface. The adapter
hides empty relation matrices.
Use this class as follows:
RelationMatrix object.
setMessageHandler(sdmetrics.app.SDMessageHandler)) to report progress and
errors to.
calculateMatrices(int, int) to start the matrices calculation.
The class will notify you of completion by calling either
SDMessageHandler.finishedComputation() or SDMessageHandler.error(java.lang.String)
on your message handler.
| Constructor Summary | |
RelMatrixAdapter(sdmetrics.metrics.RelationMatrix rm)
|
|
| Method Summary | |
boolean |
calculateMatrices(int progStart,
int totalProg)
Start the calculation of the relation matrices. |
java.lang.String |
getColumnDescription(int index,
int col)
Returns an empty string (descriptions of target design elements in the columns not supported). |
java.lang.String |
getColumnName(int index,
int col)
Get the fully qualified name for a target element in specific column. |
java.lang.String |
getMatrixDescription(int index)
Get a description string for a matrix. |
int |
getNumberOfColumns(int index)
Get the number of target design elements (columns) in a table. |
int |
getNumberOfRows(int index)
Get the number of source design elements (rows) in a table. |
int |
getNumberOfTables()
Returns the number of available tables. |
java.lang.String |
getRowName(int index,
int row)
Get the fully qualified name for a source element in specific row. |
java.lang.String |
getTableName(int index)
Returns the names of a relation matrix. |
int |
getTypeID(int index)
This method is not meaningful for relation matrices. |
java.lang.Object |
getValueAt(int index,
int row,
int col)
Get the number of relationships from a specific source element to a target element. |
boolean |
hasMatrices()
Check if there are relation matrices defined in the metric definition file at all. |
boolean |
needsCalculation()
Check if matrices still need to be calculated. |
void |
setMessageHandler(SDMessageHandler mh)
Register message handler for progress report. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RelMatrixAdapter(sdmetrics.metrics.RelationMatrix rm)
rm - A RelationMatrix object to perform the actual
calculation and storage of the relation matrices.| Method Detail |
public void setMessageHandler(SDMessageHandler mh)
mh - The message handler.public boolean needsCalculation()
true if matrices still need to be calculated, else false
public boolean calculateMatrices(int progStart,
int totalProg)
progStart - The percentage of work completed on the progress bar at the beginning of this job.totalProg - The total percentage alloted to this job.
true if the matrices were calculated successfully,
false if an error occurred.public java.lang.String getMatrixDescription(int index)
index - Index of the matrix.
public boolean hasMatrices()
public int getNumberOfTables()
DataTable
getNumberOfTables in interface DataTablepublic java.lang.String getTableName(int index)
getTableName in interface DataTableindex - Index of the table to access.
public int getNumberOfRows(int index)
getNumberOfRows in interface DataTableindex - Index of the table to access.
public int getNumberOfColumns(int index)
getNumberOfColumns in interface DataTableindex - Index of the table to access.
public java.lang.Object getValueAt(int index,
int row,
int col)
getValueAt in interface DataTableindex - Index of the table to access.row - Index of the row to access.col - Index of the column to access.
public java.lang.String getRowName(int index,
int row)
getRowName in interface DataTableindex - Index of the table to access.row - Index of the row.
public java.lang.String getColumnName(int index,
int col)
getColumnName in interface DataTableindex - Index of the table to access.col - Index of the column.
public java.lang.String getColumnDescription(int index,
int col)
getColumnDescription in interface DataTableindex - Index of the table to access.col - Index of the column.
public int getTypeID(int index)
getTypeID in interface DataTableindex - Index of the table to access.
|
www.sdmetrics.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||