Class Task

  • All Implemented Interfaces:
    IconProvider, java.lang.Comparable<Member>, java.lang.Iterable<Member>
    Direct Known Subclasses:
    TaskGroup

    public class Task
    extends Member
    A task is kind of subproject within a project; the type of a task determines the kinds of actions that may be performed within it.
    Author:
    Chris Jennings
    • Constructor Detail

      • Task

        public Task​(TaskGroup parent,
                    java.io.File taskToOpen)
             throws java.io.IOException
        Creates a task that represents a task already stored on disk.
        Parameters:
        taskToOpen -
        Throws:
        java.io.IOException
    • Method Detail

      • isTaskFolder

        public static boolean isTaskFolder​(java.io.File f)
      • getSettings

        public Settings getSettings()
      • createTask

        public static java.io.File createTask​(java.io.File parentFolder,
                                              java.lang.String taskName,
                                              java.lang.String taskType)
                                       throws java.io.IOException
        Creates a new, empty task. If this succeeds, then the task can be opened using the returned file. This is a low-level method that creates the basic file structure for a task. To add a new task to a project, see TaskGroup.addNewTask(ca.cgjennings.apps.arkham.project.NewTaskType, java.lang.String).
        Parameters:
        parentFolder - the root project folder or a TaskGroup folder
        taskName - a name for the task
        taskType - a type descriptor for the project type
        Returns:
        the root folder of the task
        Throws:
        java.io.IOException - if the parent folder does not exist, or if it exists but has a child with the same name as the new task name, or if the task folder cannot be created for some reason
      • writeTaskSettings

        public void writeTaskSettings()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readTaskSettings

        public void readTaskSettings()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • registerCustomIcon

        public static void registerCustomIcon​(java.lang.String resource)
        Add the resource path to a new custom task icon that can be selected by the user using ChangeIcon.
        Parameters:
        resource -
        Since:
        2.1a7
      • unregisterCustomIcon

        public static void unregisterCustomIcon​(java.lang.String resource)
        Remove the resource path to a new custom task icon that can be selected by the user using ChangeIcon.
        Parameters:
        resource -
        Since:
        2.1a7
      • getCustomIcons

        public static java.lang.String[] getCustomIcons()
        Returns an array of all registered custom icons.
        Returns:
        an array of registered custom icon resource paths
        Since:
        2.1a7