JTable table = this.header.getTable();
if (table != null) {
toEnable = toEnable && table.isEnabled();
}
StateTransitionTracker tracker = this.stateTransitionMultiTracker
.getTracker(columnIndex);
if (tracker == null) {
boolean isRollover = false;
TableColumnModel columnModel = header.getColumnModel();
boolean isSelected = false;
if (columnModel.getColumnSelectionAllowed()) {
isSelected = columnModel.getSelectionModel().isSelectedIndex(
columnIndex);
if ((table != null)
&& (table.getUI() instanceof SubstanceTableUI)) {
SubstanceTableUI tableUI = (SubstanceTableUI) table.getUI();
int rolledOverIndex = tableUI.getRolloverColumnIndex();
isRollover = (rolledOverIndex >= 0)
&& (rolledOverIndex == columnIndex);
boolean hasSelectionAnimations = tableUI
.hasSelectionAnimations();
if (hasSelectionAnimations
&& AnimationConfigurationManager.getInstance()
.isAnimationAllowed(
AnimationFacet.SELECTION, table))
isSelected = this.selectedIndices
.containsKey(columnIndex);
}
}
return ComponentState.getState(toEnable, isRollover, isSelected);
} else {
ComponentState fromTracker = tracker.getModelStateInfo()
.getCurrModelState();
return ComponentState.getState(toEnable, fromTracker
.isFacetActive(ComponentStateFacet.ROLLOVER), fromTracker
.isFacetActive(ComponentStateFacet.SELECTION));
}