Search in sources :

Example 21 with ProjectSelectionState

use of edu.cmu.cs.hcii.cogtool.ui.ProjectSelectionState in project cogtool by cogtool.

the class ProjectController method createExportDesignToHTMLAction.

protected IListenerAction createExportDesignToHTMLAction() {
    return new IListenerAction() {

        public Class<?> getParameterClass() {
            return ProjectSelectionState.class;
        }

        public boolean performAction(Object actionParms) {
            ProjectSelectionState selection = (ProjectSelectionState) actionParms;
            Design d = selection.getSelectedDesign();
            if (d == null) {
                interaction.protestNoSelection();
                return false;
            }
            return ExportToHTMLWorkThread.exportDesignToHTML(d, interaction);
        }
    };
}
Also used : Design(edu.cmu.cs.hcii.cogtool.model.Design) ITaskDesign(edu.cmu.cs.hcii.cogtool.model.Project.ITaskDesign) IListenerAction(edu.cmu.cs.hcii.cogtool.util.IListenerAction) ProjectSelectionState(edu.cmu.cs.hcii.cogtool.ui.ProjectSelectionState)

Aggregations

ProjectSelectionState (edu.cmu.cs.hcii.cogtool.ui.ProjectSelectionState)21 IListenerAction (edu.cmu.cs.hcii.cogtool.util.IListenerAction)20 Design (edu.cmu.cs.hcii.cogtool.model.Design)19 ITaskDesign (edu.cmu.cs.hcii.cogtool.model.Project.ITaskDesign)19 AUndertaking (edu.cmu.cs.hcii.cogtool.model.AUndertaking)15 TaskApplication (edu.cmu.cs.hcii.cogtool.model.TaskApplication)12 RcvrIOException (edu.cmu.cs.hcii.cogtool.util.RcvrIOException)7 IOException (java.io.IOException)7 DoublePoint (edu.cmu.cs.hcii.cogtool.model.DoublePoint)6 IPredictionAlgo (edu.cmu.cs.hcii.cogtool.model.IPredictionAlgo)6 Script (edu.cmu.cs.hcii.cogtool.model.Script)6 File (java.io.File)6 TaskGroup (edu.cmu.cs.hcii.cogtool.model.TaskGroup)4 AUndoableEdit (edu.cmu.cs.hcii.cogtool.util.AUndoableEdit)4 RcvrUnimplementedFnException (edu.cmu.cs.hcii.cogtool.util.RcvrUnimplementedFnException)4 ACTRPredictionAlgo (edu.cmu.cs.hcii.cogtool.model.ACTRPredictionAlgo)3 ISimilarityDictionary (edu.cmu.cs.hcii.cogtool.model.ISimilarityDictionary)3 RcvrIllegalStateException (edu.cmu.cs.hcii.cogtool.util.RcvrIllegalStateException)3 RcvrIOSaveException (edu.cmu.cs.hcii.cogtool.util.RcvrIOSaveException)2 FileOutputStream (java.io.FileOutputStream)2