1081 |
{ |
{ |
1082 |
setColumnModel(createDefaultColumnModel()); |
setColumnModel(createDefaultColumnModel()); |
1083 |
autoCreate = true; |
autoCreate = true; |
1084 |
} |
} |
|
updateUI(); |
|
1085 |
setSelectionModel(sm == null ? createDefaultSelectionModel() : sm); |
setSelectionModel(sm == null ? createDefaultSelectionModel() : sm); |
1086 |
setModel(dm == null ? createDefaultDataModel() : dm); |
setModel(dm == null ? createDefaultDataModel() : dm); |
1087 |
setAutoCreateColumnsFromModel(autoCreate); |
setAutoCreateColumnsFromModel(autoCreate); |
1088 |
initializeLocalVars(); |
initializeLocalVars(); |
1089 |
|
// The following four lines properly set the lead selection indices. |
1090 |
|
// After this, the UI will handle the lead selection indices. |
1091 |
|
// FIXME: this should probably not be necessary, if the UI is installed |
1092 |
|
// before the TableModel is set then the UI will handle things on its |
1093 |
|
// own, but certain variables need to be set before the UI can be installed |
1094 |
|
// so we must get the correct order for all the method calls in this |
1095 |
|
// constructor. |
1096 |
|
selectionModel.setAnchorSelectionIndex(0); |
1097 |
|
selectionModel.setLeadSelectionIndex(0); |
1098 |
|
columnModel.getSelectionModel().setAnchorSelectionIndex(0); |
1099 |
|
columnModel.getSelectionModel().setLeadSelectionIndex(0); |
1100 |
|
updateUI(); |
1101 |
} |
} |
1102 |
|
|
1103 |
protected void initializeLocalVars() |
protected void initializeLocalVars() |