* @param act
*/
private void configureTools(MyDoggyToolWindowManager toolWindowManager) {
// tool1 - unactive
if (MAction.MYDOGGY_UNACTIV.equals(act)) {
ToolWindow tool1 = toolWindowManager.registerToolWindow("1", "Tool 1", null, new JButton("Tool 1"), ToolWindowAnchor.LEFT);
tool1.setAvailable(true);
}
// tool2 - active
if (MAction.MYDOGGY_ACTIV.equals(act)) {
JPanel pane2 = new JPanel(new BorderLayout());
pane2.add(new JComboBox(new String[] { "coucou1", "coucou2", "taratata1", "taratata2" }), BorderLayout.NORTH);
pane2.add(new JButton("Tool 2"), BorderLayout.CENTER);
final ToolWindow tool2 = toolWindowManager.registerToolWindow("2", "Tool 2", null, pane2, ToolWindowAnchor.LEFT);
tool2.setAvailable(true);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
tool2.setType(ToolWindowType.SLIDING);
tool2.setActive(true);
}
});
}
// tool3 - flashing
if (MAction.MYDOGGY_FLASHING.equals(act)) {
final ToolWindow tool3 = toolWindowManager.registerToolWindow("3", "Tool 3", null, new JButton("Tool 3"), ToolWindowAnchor.TOP);
tool3.setAvailable(true);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
tool3.setFlashing(true);
}
});
}
}