return panel;
}
protected void initListeners() {
viewContext.addViewContextChangeListener(GroupKeySpace.ADD_GROUP, new ViewContextChangeListener() {
public void contextChange(ViewContextChangeEvent evt) {
String groupName = JOptionPane.showInputDialog((Component) viewContext.get("windowAnchestor"), "Group Name");
if (groupName != null)
viewContext.get(ToolWindowManager.class).getToolWindowGroup(groupName);
}
});
viewContext.addViewContextChangeListener(GroupKeySpace.REMOVE_GROUP, new ViewContextChangeListener() {
public void contextChange(ViewContextChangeEvent evt) {
evt.getViewContext().get(ToolWindowManager.class).removeToolWindowGroup(
evt.getViewContext().get(ToolWindowGroup.class)
);
}
});
viewContext.addViewContextChangeListener(GroupKeySpace.SHOW_GROUP, new ViewContextChangeListener() {
public void contextChange(ViewContextChangeEvent evt) {
ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
if (group != null)
group.setVisible(true);
}
});
viewContext.addViewContextChangeListener(GroupKeySpace.HIDE_GROUP, new ViewContextChangeListener() {
public void contextChange(ViewContextChangeEvent evt) {
ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
if (group != null)
group.setVisible(false);
}