Warning: Parameter 1 to SyntaxHighlight_GeSHi::configureParser() expected to be a reference, value given in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/Hooks.php on line 207

Warning: Parameter 1 to SyntaxHighlight_GeSHi::resourceLoaderRegisterModules() expected to be a reference, value given in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/Hooks.php on line 207
Difference between revisions of "Main table java stuff" - Rave Documentation

Difference between revisions of "Main table java stuff"

From Rave Documentation
Jump to: navigation, search
(Renderers)
(Renderers)
 
Line 6: Line 6:
 
*The column header renderer lives in RaveTableSorter.java as SortableHeaderRenderer (very bottom of the file).  
 
*The column header renderer lives in RaveTableSorter.java as SortableHeaderRenderer (very bottom of the file).  
  
*Each "type of column" has its own renderer. Java assigns renders based on the data type of the objects displayed in the table. These do not necessarily match up with the actual objects Rave is displaying in the table. Instead, RaveTableSorter overloads getColumnClass (line 509ish) to return particular classes depending on how Rave wants the data to render. For example, [[random variables]] appear as the jawa.awt.Rectangle class (selected specifically because this class is unlikely to ever appear in a real table).
+
*Each "type of column" has its own renderer. Java assigns renderers based on the data type of the objects displayed in the table. These do not necessarily match up with the actual objects Rave is displaying in the table. Instead, RaveTableSorter overloads getColumnClass (line 509ish) to return particular classes depending on how Rave wants the data to render. For example, [[random variables]] appear as the jawa.awt.Rectangle class (selected specifically because this class is unlikely to ever appear in a real table).
  
 
;Currently the following types of columns exist:
 
;Currently the following types of columns exist:

Latest revision as of 16:42, 7 May 2014

The main table is based on the Oracle "table sorter" example file. This is in the RaveTableSorter.java file.

Renderers

  • The column header renderer lives in RaveTableSorter.java as SortableHeaderRenderer (very bottom of the file).
  • Each "type of column" has its own renderer. Java assigns renderers based on the data type of the objects displayed in the table. These do not necessarily match up with the actual objects Rave is displaying in the table. Instead, RaveTableSorter overloads getColumnClass (line 509ish) to return particular classes depending on how Rave wants the data to render. For example, random variables appear as the jawa.awt.Rectangle class (selected specifically because this class is unlikely to ever appear in a real table).
Currently the following types of columns exist
Rave Column Type Java Object Class Renderer Class (file)
Regular Numbers java.lang.Double RaveDefaultTableCellRenderer
Integers java.lang.Integer RaveIntegerTableCellRenderer
Strings java.lang.String RaveStringTableCellRenderer
Noise Variable java.awt.Rectangle RaveNoiseTableCellRenderer

Constant variables do not use a special renderer... they render with whatever their data type would be if they were not constant.

  • Renderers are set by ravedisplaymaintable.
  • Renderer colors may be changed using methods, for example the controls on the main table format tab do this.