Great article, it took years to realise what you've summerised in a couple of pages, though I would make one suggestion. To follow the standard practices of Swing I would change:
[code]
public void updateUI() {
if (UIManager.get(getUIClassID()) != null) {
setUI((FlexiSliderUI) UIManager.getUI(this));
} else {
setUI(new BasicFlexiSliderUI());
}
}
[/code]
to
[code]
public void updateUI() {
if (UIManager.get(getUIClassID()) != null) {
setUI((FlexiSliderUI) UIManager.getUI(this));
} else {
setUI(BasicFlexiSliderUI.createUI(this));
}
}
[/code]
It doesn't really add much in this case but does follow the standard practices of the rest of swing and allows for singleton delegate creation. |