protected void initToolWindowManager() {
MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager(frame);
this.toolWindowManager = myDoggyToolWindowManager;
FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) toolWindowManager.getTypeDescriptorTemplate(ToolWindowType.FLOATING);
typeDescriptor.setTransparentDelay(0);
JPanel panel = new JPanel(new TableLayout(new double[][]{{20, -1, 20}, {20, -1, 20}}));
panel.add(new JButton("Hello World 2"), "1,1,FULL,FULL");
toolWindowManager.registerToolWindow("1", "Title 1", null, new JButton("Hello World 1"), ToolWindowAnchor.LEFT);
toolWindowManager.registerToolWindow("2", "Title 2", null, panel, ToolWindowAnchor.RIGHT);
toolWindowManager.registerToolWindow("3", "Title 3", null, new JButton("Hello World 3"), ToolWindowAnchor.LEFT);
toolWindowManager.registerToolWindow("4", "Title 4", null, new JButton("Hello World 4"), ToolWindowAnchor.TOP);
toolWindowManager.registerToolWindow("5", "Title 5", null, new JButton("Hello World 5"), ToolWindowAnchor.TOP);
toolWindowManager.registerToolWindow("6", "Title 6", null, new JButton("Hello World 6"), ToolWindowAnchor.BOTTOM);
toolWindowManager.registerToolWindow("7", "Title 7", null, new JButton("Hello World 7"), ToolWindowAnchor.TOP);
toolWindowManager.registerToolWindow("8", "Title 8", null, new JButton("Hello World 8"), ToolWindowAnchor.RIGHT);
toolWindowManager.registerToolWindow("9", "Title 9", null, new JButton("Hello World 9"), ToolWindowAnchor.RIGHT);
toolWindowManager.registerToolWindow("10", "Title 10", null, new JButton("Hello World 10"), ToolWindowAnchor.RIGHT);
toolWindowManager.registerToolWindow("11", "Title 11", null, new JButton("Hello World 11"), ToolWindowAnchor.RIGHT);
toolWindowManager.registerToolWindow("12", "Title 12", null, new JButton("Hello World 12"), ToolWindowAnchor.RIGHT);
toolWindowManager.registerToolWindow("13", "Title 13", null, new JButton("Hello World 13"), ToolWindowAnchor.RIGHT);
for (ToolWindow window : toolWindowManager.getToolWindows())
window.setAvailable(true);
// Create two groups
ToolWindowGroup mainGroup = toolWindowManager.getToolWindowGroup("Main");
ToolWindowGroup submainGroup = toolWindowManager.getToolWindowGroup("SubMain");
// Set TypeDescriptor properties for tool window 1
ToolWindow toolWindow = toolWindowManager.getToolWindow("1");
DockedTypeDescriptor dockedTypeDescriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);
dockedTypeDescriptor.setPopupMenuEnabled(false);
dockedTypeDescriptor.setDockLength(300);
mainGroup.addToolWindow(toolWindow);
// Set properties for tool window 2
toolWindow = toolWindowManager.getToolWindow("2");
dockedTypeDescriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);
dockedTypeDescriptor.getToolsMenu().add(new JMenuItem("Prova"));
toolWindow.setType(ToolWindowType.FLOATING_FREE);
FloatingTypeDescriptor descriptor = (FloatingTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.FLOATING_FREE);
descriptor.setLocation(100, 100);
descriptor.setSize(250, 250);
submainGroup.addToolWindow(toolWindow);
toolWindow = toolWindowManager.getToolWindow("3");
dockedTypeDescriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);
JMenuItem menuItem = new JMenuItem("Hello World!!!");
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(frame, "Hello World!!!");
}
});
dockedTypeDescriptor.getToolsMenu().add(menuItem);
mainGroup.addToolWindow(toolWindow);
// Set properties for tool window 4
toolWindow = toolWindowManager.getToolWindow("4");
toolWindow.setType(ToolWindowType.FLOATING_FREE);
submainGroup.addToolWindow(toolWindow);
// Set properties for tool window 5
toolWindow = toolWindowManager.getToolWindow("5");
toolWindow.setType(ToolWindowType.FLOATING_FREE);
submainGroup.addToolWindow(toolWindowManager.getToolWindow("6"));
// Set properties for tool window 7
toolWindow = toolWindowManager.getToolWindow("7");
toolWindow.setType(ToolWindowType.FLOATING);
FloatingTypeDescriptor floatingTypeDescriptor = (FloatingTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.FLOATING);
floatingTypeDescriptor.setModal(true);
toolsContent = initToolsContent();
groupEditorContent = initGroupEditorContent();
contentsContent = initContentsContent();