SubstanceColorScheme borderColorScheme = SubstanceColorSchemeUtilities
.getColorScheme(c, ColorSchemeAssociationKind.BORDER, state);
SubstanceColorScheme borderColorScheme2 = borderColorScheme;
float alpha = 1.0f;
FadeState fadeState = SubstanceFadeUtilities.getFadeState(c,
FadeKind.SELECTION, FadeKind.ROLLOVER);
if (fadeState != null) {
cyclePos = fadeState.getFadePosition();
if (fadeState.isFadingIn())
cyclePos = 1.0f - cyclePos;
} else {
alpha = SubstanceColorSchemeUtilities.getAlpha(c, state);
}
JTextComponent componentForTransitions = SubstanceCoreUtilities
.getTextComponentForTransitions(c);
if (componentForTransitions != null) {
ComponentUI ui = componentForTransitions.getUI();
if (ui instanceof Trackable) {
Trackable trackable = (Trackable) ui;
ButtonModel transitionModel = trackable.getTransitionModel();
state = ComponentState.getState(transitionModel,
componentForTransitions);
ComponentState prevState = (trackable == null) ? state
: SubstanceCoreUtilities
.getPrevComponentState(componentForTransitions);
if (!state.isKindActive(FadeKind.ENABLE))
state = ComponentState.DISABLED_SELECTED;
if (!prevState.isKindActive(FadeKind.ENABLE))
prevState = ComponentState.DISABLED_SELECTED;
// isEnabled ? ComponentState.DEFAULT
// : ComponentState.DISABLED_UNSELECTED;
borderColorScheme = SubstanceColorSchemeUtilities
.getColorScheme(componentForTransitions,
ColorSchemeAssociationKind.BORDER, state);
borderColorScheme2 = SubstanceColorSchemeUtilities
.getColorScheme(componentForTransitions,
ColorSchemeAssociationKind.BORDER, prevState);
alpha = 1.0f;
fadeState = SubstanceFadeUtilities.getFadeState(
componentForTransitions, FadeKind.SELECTION,
FadeKind.ROLLOVER);
// System.out.println(state + ":" + fadeState);
if (fadeState != null) {
cyclePos = fadeState.getFadePosition();
if (fadeState.isFadingIn())
cyclePos = 1.0f - cyclePos;
} else {
alpha = SubstanceColorSchemeUtilities.getAlpha(c, state);
}
}