*/
public class DockablePropertyChangeHandler implements PropertyChangeListener {
public static final DockablePropertyChangeHandler DEFAULT_INSTANCE = new DockablePropertyChangeHandler();
public void propertyChange(PropertyChangeEvent evt) {
Dockable dockable = evt.getSource() instanceof Dockable? (Dockable)evt.getSource(): null;
if(dockable==null)
return;
if (evt.getPropertyName().equals(DockablePropertySet.TAB_ICON)
|| evt.getPropertyName().equals(DockablePropertySet.DESCRIPTION)) {
if (evt.getSource() instanceof Dockable) {
DockingPort dockingPort = dockable.getDockingPort();
if (dockingPort instanceof DefaultDockingPort) {
((DefaultDockingPort) dockingPort).updateTab(dockable);
}
}
} else if (DockablePropertySet.ACTIVE.equals(evt.getPropertyName())) {