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");
rightBuilder.append(new JLabel(label), 5);