automaticLayoutComboBoxModel.setSelectedItem(AUTOMATIC_LAYOUT_DISABLED);
mAutomaticLayoutComboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(internalChange)
return;
final ModeController modeController = Controller.getCurrentModeController();
AutomaticLayoutController al = modeController.getExtension(AutomaticLayoutController.class);
NamedObject selectedItem = (NamedObject)mAutomaticLayoutComboBox.getSelectedItem();
al.undoableDeactivateHook(Controller.getCurrentController().getMap().getRootNode());
if(!selectedItem.equals(AUTOMATIC_LAYOUT_DISABLED)){
al.undoableActivateHook(Controller.getCurrentController().getMap().getRootNode(), (AutomaticLayout) selectedItem.getObject());
}
}
});
}
final String label = TextUtils.getText("AutomaticLayoutAction.text");
rightBuilder.append(new JLabel(label), 5);
rightBuilder.append(mAutomaticLayoutComboBox);
rightBuilder.nextLine();
}
{
if(mAutomaticEdgeColorCheckBox == null){
mAutomaticEdgeColorCheckBox = new JCheckBox();
mAutomaticEdgeColorCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
final ModeController modeController = Controller.getCurrentModeController();
AutomaticEdgeColorHook al = (AutomaticEdgeColorHook) modeController.getExtension(AutomaticEdgeColorHook.class);
al.undoableToggleHook(Controller.getCurrentController().getMap().getRootNode());
}
});
}
final String label = TextUtils.getText("AutomaticEdgeColorHookAction.text");