use of org.freeplane.features.styles.SetBooleanMapPropertyAction in project freeplane by freeplane.
the class MNoteController method createActions.
private void createActions(ModeController modeController) {
modeController.addAction(new SelectNoteAction(this));
modeController.addAction(new ShowHideNoteAction(this));
modeController.addAction(new EditNoteInDialogAction());
modeController.addAction(new SetNoteWindowPosition("top"));
modeController.addAction(new SetNoteWindowPosition("left"));
modeController.addAction(new SetNoteWindowPosition("right"));
modeController.addAction(new SetNoteWindowPosition("bottom"));
modeController.addAction(new RemoveNoteAction(this));
modeController.addAction(new SetBooleanMapPropertyAction(SHOW_NOTE_ICONS));
}
use of org.freeplane.features.styles.SetBooleanMapPropertyAction in project freeplane by freeplane.
the class MLogicalStyleController method initM.
public void initM() {
final ModeController modeController = Controller.getCurrentModeController();
modeController.getMapController().addNodeChangeListener(new StyleRemover());
modeController.registerExtensionCopier(new ExtensionCopier());
modeController.addAction(new RedefineStyleAction());
modeController.addAction(new NewUserStyleAction());
modeController.addAction(new ManageMapConditionalStylesAction());
modeController.addAction(new ManageNodeConditionalStylesAction());
modeController.addAction(new CopyStyleExtensionsAction());
if (modeController.getModeName().equals("MindMap")) {
modeController.addAction(new MapBackgroundColorAction());
modeController.addAction(new MapBackgroundImageAction());
modeController.addAction(new MapBackgroundClearAction());
modeController.addAction(new SetBooleanMapPropertyAction(MapStyle.FIT_TO_VIEWPORT));
modeController.addAction(new CopyMapStylesAction());
}
if (!modeController.getController().getViewController().isHeadless()) {
modeController.addUiBuilder(Phase.ACTIONS, "style_actions", new StyleMenuBuilder(modeController), new ChildActionEntryRemover(modeController));
final IUserInputListenerFactory userInputListenerFactory = modeController.getUserInputListenerFactory();
Controller.getCurrentController().getMapViewManager().addMapSelectionListener(new IMapSelectionListener() {
public void beforeMapChange(final MapModel oldMap, final MapModel newMap) {
}
public void afterMapChange(final MapModel oldMap, final MapModel newMap) {
userInputListenerFactory.rebuildMenus(STYLE_ACTIONS);
}
});
final MapController mapController = modeController.getMapController();
mapController.addMapChangeListener(new IMapChangeListener() {
public void onPreNodeMoved(NodeMoveEvent nodeMoveEvent) {
}
public void onPreNodeDelete(NodeDeletionEvent nodeDeletionEvent) {
}
public void onNodeMoved(NodeMoveEvent nodeMoveEvent) {
}
public void onNodeInserted(final NodeModel parent, final NodeModel child, final int newIndex) {
}
public void onNodeDeleted(NodeDeletionEvent nodeDeletionEvent) {
}
public void mapChanged(final MapChangeEvent event) {
if (event.getProperty().equals(MapStyle.MAP_STYLES)) {
userInputListenerFactory.rebuildMenus(STYLE_ACTIONS);
}
}
});
mapController.addNodeSelectionListener(new INodeSelectionListener() {
public void onSelect(final NodeModel node) {
selectActions();
}
public void onDeselect(final NodeModel node) {
}
});
}
}
Aggregations