Custom Property Sheet Table

Article ID: 2304
Last updated: 30 May, 2018
Article ID: 2304
Last updated: 30 May, 2018
Revision: 3
Views: 696
Posted: 01 Jul, 2010
by Dean J.
Updated: 30 May, 2018
by Gargani A.

Question

How do I customize the table in the property sheet?

Answer

You will need to:

  1. Subclass the IlvDiagrammerPropertySheet class and override the setTarget method. In this method, you will construct the table model and JTable based on the properties of the target object.
     
  2. Then, return the custom IlvDiagrammerPropertySheet from step 1 in a call to IlvDiagrammerApplication.getPropertySheet().
     
  3. You can also subclass the JTable and AbstractTableModel classes depending on your criteria.
     
    • The JTable class can be extended to create a custom JTable taking a custom AbstractTableModel as a parameter.
       
    • The custom AbstractTableModel can be customized to do many things, such as (among others):
       
      • returning the number of columns
      • changing the value of table cells
      • making certain cells uneditable
      • change the value of the actual table cell

See the attachment for a sample made based on the jviews-diagrammer\samples\diagrammer\bpmnmodeler sample.

BPMModeler.java

This sample creates a custom table and shows some properties in one column along with check boxes in another column and also shows some other custom code that can be useful. The sample contains the customization at the bottom of the file.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2304
Last updated: 30 May, 2018
Revision: 3
Views: 696
Posted: 01 Jul, 2010 by Dean J.
Updated: 30 May, 2018 by Gargani A.
Attached files

Also listed in


Others in this category