class VisiblePropertyChangeListener implements PropertyChangeListener {
boolean showingGroupValueAdj = false;
public void propertyChange(PropertyChangeEvent evt) {
ToolWindowDescriptor descriptor = (ToolWindowDescriptor) evt.getSource();
// Fire "visible.before" to all bars
PropertyChangeEvent event = new PropertyChangeEvent(evt.getSource(), "visible.before",
evt.getOldValue(), evt.getNewValue());
for (MyDoggyToolWindowBar bar : bars)
bar.propertyChange(event);
// Fire "visible" to specific bar
getBar(descriptor.getToolWindow().getAnchor()).propertyChange(evt);
// Syncronize bars panel
syncPanel(descriptor.getToolWindow().getAnchor());
// Support for implicit group...
synchronized (sync) {
if ((showingGroup == null || showingGroup == getToolWindowGroup()) && Boolean.TRUE.equals(evt.getNewValue()) && !showingGroupValueAdj) {
showingGroupValueAdj = true;
try {
for (ToolWindowGroup group : getToolWindowGroups()) {
if (group.isImplicit() && group.containesToolWindow(descriptor.getToolWindow())) {
for (ToolWindow tool : group.getToolsWindow()) {
if (tool != descriptor.getToolWindow())
tool.aggregate();
}
break;
}
}