Individual States

All state objects support the refresh() service, to force a refresh of the view. In most cases this is handled automatically by the dashboard when it detects that the display needs to be updated. All state objects also provide a getName() service, which will return the name of the state. Further to this, states which support selection allow scripted access to the selection values as described below:

CubeState
  • DataTable getDataSource()

  • List<DataRecord> getSelectedRecords()

  • BitSet getSelection()

  • boolean hasSelection()

  • void setSelection(BitSet sel)

GridState
  • boolean allSelected()

  • DataTable getDataSource()

  • List<DataRecord> getSelectedRecords()

  • String getSelectedValue()

  • BitSet getSelection()

  • String[] getValues()

  • boolean hasSelection()

  • void setSelection(BitSet sel)

TableState
  • DataTable getDataSource()

  • List<DataRecord> getSelectedRecords()

  • BitSet getSelection()

  • boolean hasSelection()

  • void setSelection(BitSet sel)

The infrastructure objects exposed by these APIs are DataTable and DataRecord, DataSchema and DataType. These are all in the com.elixirtech.data2 package. The useful services of these classes include:

DataTable
  • int getRecordCount()

  • DataRecord getRecord(int idx)

  • DataRecord[] getRecords()

  • DataSchema getSchema()

DataRecord
  • Object getData(int idx)

  • Object[] getData()

  • DataSchema getSchema()

DataSchema
  • int getColumnIndex(String columnName)

  • String getColumnName(int idx)

  • DataType getColumnType(int idx)

The following DataType constants are defined: