}
protected class AnchorPropertyChangeListener implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent evt) {
ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();
ToolWindowAnchor oldAnchor = (ToolWindowAnchor) evt.getOldValue();
ToolWindowAnchor newAnchor = (ToolWindowAnchor) evt.getNewValue();
boolean force = false;
if (oldAnchor == null) {
oldAnchor = newAnchor;
force = true;
}
ToolWindowType toolType = descriptor.getToolWindow().getType();
if (toolType == ToolWindowType.FLOATING ||
toolType == ToolWindowType.FLOATING_FREE ||
toolType == ToolWindowType.FLOATING_LIVE ||
force ||
!descriptor.getToolWindow().isAvailable()) {
PropertyChangeEvent avEvent = new UserPropertyChangeEvent(evt.getSource(), "available", true, false, new Object[]{-1, true});
getBar(oldAnchor).propertyChange(avEvent);
syncPanel(oldAnchor);