}
private void fillLayoutAction(MenuManager layoutMenu) {
Action nullLayoutAction = new NullLayoutAction((JPanelAdapter)adaptable);
JPanel jpanel = (JPanel) adaptable.getWidget();
LayoutManager layout = jpanel.getLayout();
if (layout == null)
nullLayoutAction.setChecked(true);
layoutMenu.add(nullLayoutAction);
for (String layoutClass : LayoutAdapter.getLayoutClasses()) {
IConfigurationElement config = LayoutAdapter
.getLayoutConfig(layoutClass);
SetLayoutAction action = new SetLayoutAction((JPanelAdapter)adaptable, config);
if (layout != null) {
String currLayoutClass = layout.getClass().getName();
if (currLayoutClass.equals(layoutClass)) {
action.setChecked(true);
}
}
layoutMenu.add(action);