Class Paste
- java.lang.Object
-
- ca.cgjennings.apps.arkham.project.TaskAction
-
- ca.cgjennings.apps.arkham.project.Paste
-
- All Implemented Interfaces:
IconProvider
public class Paste extends TaskAction
Paste files on clipboard into the selected folder of a project.- Author:
- Chris Jennings
-
-
Constructor Summary
Constructors Constructor Description Paste()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanappliesTo(Project project, Task task, Member member)Returnstrueif this action can be performed on the specified member of a project, project or a task.booleanappliesToSelection(Member[] members)Returnstrueif this action is applicable to any of the specifiedMembers.java.lang.StringgetLabel()Returns the human-readable name of this action.booleanperform(Project project, Task task, Member member)Perform this action on a member of a project, a project or a task.booleanperformOnSelection(Member[] members)Applies this action to all of the specified project members.-
Methods inherited from class ca.cgjennings.apps.arkham.project.TaskAction
applyToChildren, getActionName, getDescription, getIcon, resolveTarget, toString
-
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Description copied from class:TaskActionReturns the human-readable name of this action.- Specified by:
getLabelin classTaskAction- Returns:
- the name used to create menu items for this action, localized if possible
-
perform
public boolean perform(Project project, Task task, Member member)
Description copied from class:TaskActionPerform this action on a member of a project, a project or a task. If the project itself is the target,taskandmemberwill benull. If a task is the target, thenmemberwill be null. If an error occurs while executing the task, then it is the action's responsibility to inform the user. This method can returnfalseto indicate that if the action is being applied to multiple members, it should stop immediately rather than continue to the next member.- Specified by:
performin classTaskAction- Parameters:
project- the project that is being acted upontask- the task within the project that is being acted upon;nullif acting on a projectmember- the specific member within the task to act upon;nullif this is a project or task
-
performOnSelection
public boolean performOnSelection(Member[] members)
Description copied from class:TaskActionApplies this action to all of the specified project members. By overriding this, you can modify what happens when the user tries to initiate this action. For example, you could add a verification dialog and call the super implementation only if the user verifies the action.- Overrides:
performOnSelectionin classTaskAction- Returns:
trueif and only if the action is successfully applied to all of the members
-
appliesToSelection
public boolean appliesToSelection(Member[] members)
Description copied from class:TaskActionReturnstrueif this action is applicable to any of the specifiedMembers. By overriding this, you can modify whether an action is listed depending on which other members are selected. For example, you could create a command that can only be applied to a singleton selection by checking the length ofmembersand returningfalseif it is not 1, and otherwise calling the super implementation.- Overrides:
appliesToSelectionin classTaskAction- Parameters:
members- a list of zero or more members- Returns:
trueis the action can be applied to at least one member
-
appliesTo
public boolean appliesTo(Project project, Task task, Member member)
Description copied from class:TaskActionReturnstrueif this action can be performed on the specified member of a project, project or a task. If the project itself is the target,taskandmemberwill benull. If a task is the target, thenmemberwill be null. If an error occurs while executing the task, then it is the action's responsibility to inform the user. This method can returnfalseto indicate that if the action is being applied to multiple members, it should stop immediately rather than continue to the next member.- Specified by:
appliesToin classTaskAction- Parameters:
project- the project that is being acted upontask- the task within the project that is being acted upon;nullif acting on a projectmember- the specific member within the task to act upon;nullif this is a project or task
-
-