leftDividerSize.addChangeListener(
new ChangeListenerAction(ToolWindowManagerDescriptor.class,
"setDividerSize",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.LEFT),
new SpinnerValueSource(leftDividerSize)
)
)
);
panel.addEntry(3, 0, "DividerSize (RIGHT) : ",
rightDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
rightDividerSize.addChangeListener(
new ChangeListenerAction(ToolWindowManagerDescriptor.class,
"setDividerSize",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.RIGHT),
new SpinnerValueSource(rightDividerSize)
)
)
);
panel.addEntry(4, 0, "DividerSize (TOP) : ",
topDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
topDividerSize.addChangeListener(
new ChangeListenerAction(ToolWindowManagerDescriptor.class,
"setDividerSize",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.TOP),
new SpinnerValueSource(topDividerSize)
)
)
);
panel.addEntry(5, 0, "DividerSize (BOTTOM) : ",
bottomDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
bottomDividerSize.addChangeListener(
new ChangeListenerAction(ToolWindowManagerDescriptor.class,
"setDividerSize",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.BOTTOM),
new SpinnerValueSource(bottomDividerSize)
)
)
);
// Column 1
pushAwayMode = new JComboBox(new Object[]{
PushAwayMode.ANTICLOCKWISE,
PushAwayMode.HORIZONTAL,
PushAwayMode.VERTICAL,
PushAwayMode.MOST_RECENT
});
pushAwayMode.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
viewContext.put(PushAwayMode.class, e.getItem());
}
});
panel.addEntry(0, 1, "pushAwayMode : ", pushAwayMode);
panel.addEntry(1, 1, "showUnavailableTools : ", showUnavailableTools = new JCheckBox());
showUnavailableTools.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
"showUnavailableTools",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new ChecBoxSelectionSource(showUnavailableTools)));
panel.addEntry(2, 1, "Agg Mode (LEFT) : ", leftAggregateMode = new JCheckBox());
leftAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
"setAggregateMode",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.LEFT),
new ChecBoxSelectionSource(leftAggregateMode)
)
));
panel.addEntry(3, 1, "Agg Mode (RIGHT) : ", rightAggregateMode = new JCheckBox());
rightAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
"setAggregateMode",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.RIGHT),
new ChecBoxSelectionSource(rightAggregateMode)
)
));
panel.addEntry(4, 1, "Agg Mode (TOP) : ", topAggregateMode = new JCheckBox());
topAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
"setAggregateMode",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.TOP),
new ChecBoxSelectionSource(topAggregateMode)
)
));
panel.addEntry(5, 1, "Agg Mode (BOTTOM) : ", bottomAggregateMode = new JCheckBox());
bottomAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
"setAggregateMode",
new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
new AndSource(
new ConstantSource(ToolWindowAnchor.BOTTOM),
new ChecBoxSelectionSource(topAggregateMode)
)
));
return panel;