@Override public void run() { Controller.getCurrentController().getSelection().scrollNodeTreeToVisible(node); } });
@Override public void propertyChanged(String propertyName, String newValue, String oldValue) { if(propertyName.equals(CloudController.RESOURCES_CLOUD_COLOR) || propertyName.equals(CloudController.RESOURCES_CLOUD_SHAPE)) { final IMapSelection selection = Controller.getCurrentController().getSelection(); if(selection != null) { final NodeModel selected = selection.getSelected(); mPropertyListener.setStyle(selected); } } } });
@Override public void mapChanged(MapChangeEvent event) { if(! MapStyle.MAP_STYLES.equals(event.getProperty())) return; final IMapSelection selection = controller.getSelection(); if (selection == null) { return; } final NodeModel node = selection.getSelected(); setStyle(node); }
public boolean checkNode(final NodeModel node) { final IMapSelection selection = Controller.getCurrentController().getSelection(); if (selection != null){ for(NodeModel clone : node.allClones()) if (selection.isSelected(clone)) return true; } return false; }
@Override public void setEnabled() { final IMapSelection selection = Controller.getCurrentController().getSelection(); setEnabled(selection != null && ! ShortenedTextModel.isShortened(selection.getSelected())); }
private void scrollMapToSelectedNode() { if(placedNodeId == null){ final Controller controller = Controller.getCurrentController(); final IMapSelection selection = controller.getSelection(); if(selection != null) { final NodeModel selected = selection.getSelected(); controller.getMapViewManager().scrollNodeToVisible(selected); } } }
@Override public void copy() { final Controller controller = Controller.getCurrentController(); final IMapSelection selection = controller.getSelection(); if (selection != null) { final Transferable copy = copy(selection); if (copy != null) { ClipboardAccessor.getController().setClipboardContents(copy); } } }
@Override protected void onWrite(final MapModel map) { final ModeController modeController = Controller.getCurrentModeController(); final Controller controller = modeController.getController(); final IMapSelection selection = controller.getSelection(); if (selection == null) { return; } final NodeModel selected = selection.getSelected(); noteManager.saveNote(selected); }
public void selectMultipleNodes(final NodeModel focussed, final Collection<NodeModel> selecteds) { for (final NodeModel node : selecteds) { displayNode(node); } select(focussed); for (final NodeModel node : selecteds) { Controller.getCurrentController().getSelection().makeTheSelected(node); } }
private PresentationPngExporter(PresentationState presentationState, File exportDirectory) { this.presentationState = presentationState; this.exportDirectory = exportDirectory; this.zoom = Controller.getCurrentController().getMapViewManager().getZoom(); final List<NodeModel> selection = Controller.getCurrentController().getSelection().getOrderedSelection(); this.selection = selection.toArray(new NodeModel[selection.size()]); mapViewComponent = (JComponent) Controller.getCurrentController().getMapViewManager().getMapViewComponent(); }
@Override public void actionPerformed(final ActionEvent e) { checkDetailsEnabled(); if(! foundDetails) return; isHidden = !isHidden; final IMapSelection selection = Controller.getCurrentController().getSelection(); selection.keepNodePosition(selection.getSelected(), 0.0f, 0.0f); super.actionPerformed(e); }
@Override public void setEnabled() { final Collection<NodeModel> selectedNodes = Controller.getCurrentController().getSelection().getSelection(); for(NodeModel node :selectedNodes) if(! node.isCloneTreeRoot()){ setEnabled(false); return; } setEnabled(true); }
public void actionPerformed(final ActionEvent e) { final MMapClipboardController clipboardController = (MMapClipboardController) MapClipboardController .getController(); final NodeModel parent = Controller.getCurrentController().getSelection().getSelected(); clipboardController.addClone(clipboardController.getClipboardContents(), parent); } }
public void actionPerformed(final ActionEvent e) { final MMapClipboardController clipboardController = (MMapClipboardController) MapClipboardController .getController(); final NodeModel parent = Controller.getCurrentController().getSelection().getSelected(); clipboardController.move(clipboardController.getClipboardContents(), parent); } }
public void select(final NodeModel node) { final MapModel map = node.getMap(); final Controller controller = Controller.getCurrentController(); if (! map.equals(controller.getMap())){ controller.getMapViewManager().changeToMap(map); } displayNode(node); controller.getSelection().selectAsTheOnlyOneSelected(node); }
@Override public void actionPerformed(final ActionEvent e) { final Controller controller = Controller.getCurrentController(); final NodeModel selected = controller.getSelection().getSelected(); final ClipboardAccessor clipboardController = Controller.getCurrentModeController().getExtension( ClipboardAccessor.class); String suggestedString = explorer.getNodeReferenceSuggestion(selected); clipboardController.setClipboardContents(new StringSelection(suggestedString)); controller.getViewController().out(suggestedString); } }
void setFocusToMap() { final Controller controller = Controller.getCurrentModeController().getController(); final NodeModel node = controller.getSelection().getSelected(); controller.getMapViewManager().getComponent(node).requestFocusInWindow(); }
private void restorePreviousPresentation() { presentationState.restore(); presentationZoomFactor = 1f; final IMapSelection selectionController = Controller.getCurrentController().getSelection(); selectionController.replaceSelection(selection); if(! presentationState.isPresentationRunning()) Controller.getCurrentController().getMapViewManager().setZoom(zoom); ResourceController.getResourceController().setProperty(Slide.PRESENTATION_SLOW_MOTION_KEY, presentationSlowMotionEnabled); if(spotlightEnabledForExport) mapViewComponent.putClientProperty(MapView.SPOTLIGHT_ENABLED, null); selectionController.scrollNodeToVisible(selectionController.getSelected()); }
public void actionPerformed(final ActionEvent e) { if(exp == null){ final ExportController exportController = ExportController.getContoller(); exp = exportController.createBranchExportDialog(); } final MapModel map = Controller.getCurrentController().getMap(); if (map == null) { return; } final List<NodeModel> branches = Controller.getCurrentController().getSelection().getSortedSelection(true); exp.export(UITools.getCurrentRootComponent(), branches); }
@Override public void actionPerformed(final ActionEvent e) { final ModeController modeController = Controller.getCurrentModeController(); final NodeModel model = modeController.getMapController().getSelectedNode(); final Controller controller = modeController.getController(); final Color edgeColor = EdgeController.getController().getColor(model); actionColor = ColorTracker.showCommonJColorChooserDialog(controller.getSelection().getSelected(), TextUtils.getText("choose_edge_color"), edgeColor, EdgeController.STANDARD_EDGE_COLOR); super.actionPerformed(e); }