Search in sources :

Example 1 with ProjectModel

use of org.freeplane.plugin.workspace.model.project.ProjectModel in project freeplane by freeplane.

the class WorkspaceModel method valueForPathChanged.

public void valueForPathChanged(TreePath path, Object newValue) {
    if (path == null || getRoot().equals(path.getLastPathComponent())) {
        return;
    }
    AWorkspaceTreeNode node = (AWorkspaceTreeNode) path.getLastPathComponent();
    if (node instanceof IWorkspaceNodeActionListener) {
        ((IWorkspaceNodeActionListener) node).handleAction(new WorkspaceActionEvent(node, WorkspaceActionEvent.WSNODE_CHANGED, newValue));
        ((ProjectModel) node.getModel()).nodeChanged(node);
    } else {
        node.setName(newValue.toString());
    }
}
Also used : IWorkspaceNodeActionListener(org.freeplane.plugin.workspace.event.IWorkspaceNodeActionListener) WorkspaceActionEvent(org.freeplane.plugin.workspace.event.WorkspaceActionEvent) ProjectModel(org.freeplane.plugin.workspace.model.project.ProjectModel)

Aggregations

IWorkspaceNodeActionListener (org.freeplane.plugin.workspace.event.IWorkspaceNodeActionListener)1 WorkspaceActionEvent (org.freeplane.plugin.workspace.event.WorkspaceActionEvent)1 ProjectModel (org.freeplane.plugin.workspace.model.project.ProjectModel)1