/** Listen to property changes in the DockKey or the title bar */
public void propertyChange(PropertyChangeEvent e){
String pName = e.getPropertyName();
//System.out.println("property change " + pName);
if (pName.equals("dockable")){
Dockable old = (Dockable)e.getOldValue();
if (old != null){
old.getDockKey().removePropertyChangeListener(this);
}
Dockable newDockable = ((Dockable)e.getNewValue());
if (newDockable != null){
configureButtons(titleBar);
newDockable.getDockKey().addPropertyChangeListener(this);
}
} else if (pName.equals(DockKey.PROPERTY_AUTOHIDEABLE)){
boolean isAutoHideable = ((Boolean)e.getNewValue()).booleanValue();
boolean isMaximized = titleBar.getDockable()
.getDockKey().getLocation() == DockableState.Location.MAXIMIZED;