Skip to main content
Jump to: navigation, search

Difference between revisions of "Table Developer Documentation"

(Create the new page for the table developper documentation)
 
(table label provider documentation)
Line 1: Line 1:
The Papyrus Table uses the NatTable widget. Its documentation is available [http://eclipse.org/nattable/documentation.php?page=getting_started here] and [http://eclipse.org/nattable/documentation.php?page=basics here]
+
== '''WORK IN PROGRESS'''  ==
 +
 
 +
The Papyrus Table uses the NatTable widget. Its documentation is available [http://eclipse.org/nattable/documentation.php?page=getting_started here] and [http://eclipse.org/nattable/documentation.php?page=basics here]. These new table will be available for the Papyrus Release 0.10 in June 2013.
 +
 
 +
<br>
 +
 
 +
== Label Providers  ==
 +
 
 +
For the label provider, we divided the tables into 2 areas&nbsp;:
 +
 
 +
#Headers<br>
 +
#Body<br>
 +
 
 +
<br>
 +
 
 +
for each areas we declared a label provider context (using the Papyrus Label Provider extension point):<br>
 +
 
 +
#org.eclipse.papyrus.infra.nattable.full.labelprovider&nbsp;: the context to use to find the label provider used in the table. This one calls the others label providers according to the region for which we are looking for the text/image to display.<br>
 +
#org.eclipse.papyrus.infra.nattable.body.labelprovider&nbsp;: the context to use to find the label provider used to get the text in the body of the table<br>
 +
#org.eclipse.papyrus.infra.nattable.header.labelprovider&nbsp;: the context to use to find the label provider used to get the text in the header of the table (display icon, display label)
 +
#org.eclipse.papyrus.infra.nattable.header.feature.labelprovider&nbsp;: the context to use to find the label provider used to display feature in a header. This label provider allows to define the text to display according to the configuration of the axis ( display icon, display label, display multiciplicity, display type, display a "/" for the derived feature)
 +
 
 +
These contexts are declared into the plugin org.eclipse.papyrus.infra.nattable.<br>
 +
 
 +
All label provider declared on these context must accept elements implementing ILabelProviderCellContextElement. This object encapsulate the cell for which we want display a text AND useful elements which can be used to define the text/image/color/... to display in the cell.<br>
 +
 
 +
<br>
 +
 
 +
<br>

Revision as of 05:31, 26 March 2013

WORK IN PROGRESS

The Papyrus Table uses the NatTable widget. Its documentation is available here and here. These new table will be available for the Papyrus Release 0.10 in June 2013.


Label Providers

For the label provider, we divided the tables into 2 areas :

  1. Headers
  2. Body


for each areas we declared a label provider context (using the Papyrus Label Provider extension point):

  1. org.eclipse.papyrus.infra.nattable.full.labelprovider : the context to use to find the label provider used in the table. This one calls the others label providers according to the region for which we are looking for the text/image to display.
  2. org.eclipse.papyrus.infra.nattable.body.labelprovider : the context to use to find the label provider used to get the text in the body of the table
  3. org.eclipse.papyrus.infra.nattable.header.labelprovider : the context to use to find the label provider used to get the text in the header of the table (display icon, display label)
  4. org.eclipse.papyrus.infra.nattable.header.feature.labelprovider : the context to use to find the label provider used to display feature in a header. This label provider allows to define the text to display according to the configuration of the axis ( display icon, display label, display multiciplicity, display type, display a "/" for the derived feature)

These contexts are declared into the plugin org.eclipse.papyrus.infra.nattable.

All label provider declared on these context must accept elements implementing ILabelProviderCellContextElement. This object encapsulate the cell for which we want display a text AND useful elements which can be used to define the text/image/color/... to display in the cell.



Back to the top