window.getContentPane().add(content, "1,1,FULL,FULL");
content.setVisible(true);
// Position window
if (lastBounds == null) {
FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
// Set Size
if (typeDescriptor.getSize() == null) {
Component parentComponent = descriptor.getManager().getWindowAnchestor();
window.setSize(parentComponent.getWidth() / 2, (int) (parentComponent.getHeight() / 1.5));
} else {
window.setSize(typeDescriptor.getSize());
}
// Set Location
if (typeDescriptor.getLocation() == null) {
SwingUtil.centrePositionOnScreen(window.getWindow());
} else
window.setLocation(typeDescriptor.getLocation());
SwingUtil.validateBounds(window.getWindow());
} else {
window.setBounds(lastBounds);
lastBounds = null;
}
// Show the window
if (descriptor.getTypeDescriptor(ToolWindowType.FLOATING).isAnimating()) {
floatingAnimation.show();
} else {
FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING);
window.setModal(typeDescriptor.isModal());
window.setVisible(true);
window.getContentPane().setVisible(true);
SwingUtil.repaint(window.getWindow());
SwingUtilities.invokeLater(new Runnable() {
public void run() {