// assert descriptor.getToolWindow().isVisible();
assert (descriptor.getToolWindow().getType() == ToolWindowType.FLOATING ||
descriptor.getToolWindow().getType() == ToolWindowType.FLOATING_FREE);
if ("active".equals(evt.getPropertyName())) {
FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
if (typeDescriptor.isTransparentMode()) {
if (evt.getNewValue() == Boolean.FALSE) {
timer = new Timer(typeDescriptor.getTransparentDelay(), this);
timer.start();
} else {
if (timer != null)
timer.stop();
synchronized (transparencyManager) {
if (transparencyManager.isAlphaModeEnabled(window)) {
transparencyAnimation.stop();
transparencyManager.setAlphaModeRatio(window, 0.0f);
}
}
}
}
} else if (evt.getPropertyName().startsWith("visible.")) {
synchronized (transparencyManager) {
if (evt.getNewValue() == Boolean.FALSE && transparencyManager.isAlphaModeEnabled(window)) {
if (timer != null)
timer.stop();
if (transparencyManager.isAlphaModeEnabled(window)) {
transparencyAnimation.stop();
transparencyManager.setAlphaModeRatio(window, 0.0f);
}
}
}
if (evt.getNewValue() == Boolean.TRUE) {
FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
if (typeDescriptor.isTransparentMode()) {
timer = new Timer(1000 + typeDescriptor.getTransparentDelay(), this);
timer.start();
}
}
}
}