cz.cuni.pogamut.shed.presenter
Class ShedMenuActionFactory

Package class diagram package ShedMenuActionFactory
java.lang.Object
  extended by cz.cuni.pogamut.shed.presenter.ShedMenuActionFactory

public class ShedMenuActionFactory
extends Object

Factory that will provide various actions to the popup menu of the IPresenter and thus to the IPresentedWidget.

Author:
Honza Havlicek

Constructor Summary
ShedMenuActionFactory()
           
 
Method Summary
static Action appendAction(ActionPattern actionPattern, int index)
          Add new action as a child of the AP.
static Action appendChoiceAction(Competence competence)
          Create action that will add new choice to the competence as the first choice.
static Action appendChoiceAction(CompetenceElement choice)
          Action that will add new choice right behind @choice.
static Action appendDriveAction(DriveElement drive)
          Create new drive and add it behind the specified drive.
static Action appendSenseAction(CompetenceElement choice)
          Append new sense as first trigger sense of @choice.
static Action appendSenseAction(Sense sense)
          Append a new sense at index one greater than is @sense.
static Action changeActionPatternParameters(ActionPattern actionPattern)
          Create action that will show dialog with parameters of AP and allows user to modify them.
static Action changeCompetenceParameters(Competence competence)
          Create action that will show dialog with parameters of Competence and allows user to modify them.
static Action createSenseAction(DriveElement drive)
          Query for name of new sense and add it as a first trigger sense of the drive.
static Action deleteAction(ActionPattern actionPattern, TriggeredAction action)
           
static Action deleteActionPattern(ActionPattern actionPattern)
          Create an action that will delete the action pattern.
static Action deleteChoiceAction(CompetenceElement choice)
          Delete specified choice.
static Action deleteCompetence(Competence competence)
          Create action to delete competence
static Action deleteDriveAction(DriveElement drive)
          Create menu action that will delete the passed drive.
static
<T extends PoshElement & INamedElement>
Action
deleteNotPossible(T node)
          When this action is invoken, it notifies user that it is not possible to delete the node.
static Action deleteSenseAction(Sense sense)
          Delete specified sense from its parent.
static
<PRIMITIVE_TYPE extends PoshElement & INamedElement>
Action
goToSourceAction(PRIMITIVE_TYPE primitive)
          Return action that when invoked finds class (from FQN aka name of primitive) and opens it in the editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShedMenuActionFactory

public ShedMenuActionFactory()
Method Detail

deleteNotPossible

public static <T extends PoshElement & INamedElement> Action deleteNotPossible(T node)
When this action is invoken, it notifies user that it is not possible to delete the node.


deleteCompetence

public static Action deleteCompetence(Competence competence)
Create action to delete competence

Parameters:
competence - Competence to delete
Returns:
Action that when performed will delete the competence

deleteActionPattern

public static Action deleteActionPattern(ActionPattern actionPattern)
Create an action that will delete the action pattern.

Parameters:
actionPattern - Pattern to be deleted
Returns:
Created action

createSenseAction

public static Action createSenseAction(DriveElement drive)
Query for name of new sense and add it as a first trigger sense of the drive.

Parameters:
drive -
Returns:

goToSourceAction

public static <PRIMITIVE_TYPE extends PoshElement & INamedElement> Action goToSourceAction(PRIMITIVE_TYPE primitive)
Return action that when invoked finds class (from FQN aka name of primitive) and opens it in the editor.

Type Parameters:
PRIMITIVE_TYPE -
Parameters:
primitive -
Returns:

appendDriveAction

public static Action appendDriveAction(DriveElement drive)
Create new drive and add it behind the specified drive.

Parameters:
drive -
Returns:

deleteDriveAction

public static Action deleteDriveAction(DriveElement drive)
Create menu action that will delete the passed drive.

Parameters:
drive - Drive to be deleted.
Returns:

appendChoiceAction

public static Action appendChoiceAction(Competence competence)
Create action that will add new choice to the competence as the first choice.

Parameters:
competence - Comepetence that will have new choice at index 0.
Returns:

deleteChoiceAction

public static Action deleteChoiceAction(CompetenceElement choice)
Delete specified choice.

Parameters:
choice - Choice to be deleted.
Returns:

appendSenseAction

public static Action appendSenseAction(CompetenceElement choice)
Append new sense as first trigger sense of @choice.

Parameters:
choice - Choice that will have new first trigger sense.
Returns:

deleteSenseAction

public static Action deleteSenseAction(Sense sense)
Delete specified sense from its parent.

Parameters:
sense - Sense to be deleted.
Returns:

appendSenseAction

public static Action appendSenseAction(Sense sense)
Append a new sense at index one greater than is @sense.

Parameters:
sense - Sense used as an anchor for new sense.
Returns:

appendChoiceAction

public static Action appendChoiceAction(CompetenceElement choice)
Action that will add new choice right behind @choice.

Parameters:
choice - Anchor choice, the new choice will be appended right behind this one
Returns:

appendAction

public static Action appendAction(ActionPattern actionPattern,
                                  int index)
Add new action as a child of the AP.

Parameters:
actionPattern - AP that will have new child.
index - index at which to insert the action.
Returns:

deleteAction

public static Action deleteAction(ActionPattern actionPattern,
                                  TriggeredAction action)

changeActionPatternParameters

public static Action changeActionPatternParameters(ActionPattern actionPattern)
Create action that will show dialog with parameters of AP and allows user to modify them.

Parameters:
actionPattern - AP which parameters will be subject to change.
Returns:
Created action

changeCompetenceParameters

public static Action changeCompetenceParameters(Competence competence)
Create action that will show dialog with parameters of Competence and allows user to modify them.

Parameters:
actionPattern - AP which parameters will be subject to change.
Returns:
Created action


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.