| | | | Browse by category |
Article ID: 2304
Last updated: 30 May, 2018
Question
How do I customize the table in the property sheet?
Answer
You will need to:
- Subclass the
IlvDiagrammerPropertySheet
class and override thesetTarget
method. In this method, you will construct the table model and JTable based on the properties of the target object.
- Then, return the custom IlvDiagrammerPropertySheet from step 1 in a call to
IlvDiagrammerApplication.getPropertySheet()
.
- You can also subclass the
JTable
andAbstractTableModel
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
- The
See the attachment for a sample made based on the jviews-diagrammer\samples\diagrammer\bpmnmodeler
sample.
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: 752
Posted: 01 Jul, 2010 by
Dean J.
Updated: 30 May, 2018 by
Gargani A.
Attached files
Also listed in
Others in this category
Powered by KBPublisher (Knowledge base software)