com.groovemanager.app.sse
Class EditAction

java.lang.Object
  extended by org.eclipse.jface.action.Action
      extended by com.groovemanager.app.sse.EditAction
All Implemented Interfaces:
org.eclipse.jface.action.IAction

public class EditAction
extends org.eclipse.jface.action.Action

An EditAction stands for a type of action that can be applied to a part of an audio source without need of interaction with the user. An EditAction can be of any of the pre-defined constants.

Author:
Manu Robledo

Field Summary
static int COPY
          Possible values for the edit type
static int CUT
          Possible values for the edit type
static int DELETE
          Possible values for the edit type
(package private)  SimpleSampleEditor editor
          The SimpleSampleEditor to which this EditAction belongs
static int NORMALIZE
          Possible values for the edit type
static int PASTE
          Possible values for the edit type
static int REDO
          Possible values for the edit type
static int TRIM
          Possible values for the edit type
(package private)  int type
          The type of this EditAction
static int UNDO
          Possible values for the edit type
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
EditAction(SimpleSampleEditor editor, java.lang.String text, org.eclipse.jface.resource.ImageDescriptor image, int editType)
          Create a new EditAction of the given type with the given name and image
EditAction(SimpleSampleEditor editor, java.lang.String text, int editType)
          Create a new EditAction of the given type with the given name
EditAction(SimpleSampleEditor editor, java.lang.String text, int style, int editType)
          Create a new EditAction of the given type with the given name and style
 
Method Summary
static java.lang.String getName(int i)
          Get a textual description of an edit type
 void run()
          Tell the Sample Editor to perform this action
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removeAcceleratorText, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPY

public static final int COPY
Possible values for the edit type

See Also:
Constant Field Values

CUT

public static final int CUT
Possible values for the edit type

See Also:
Constant Field Values

DELETE

public static final int DELETE
Possible values for the edit type

See Also:
Constant Field Values

editor

SimpleSampleEditor editor
The SimpleSampleEditor to which this EditAction belongs


NORMALIZE

public static final int NORMALIZE
Possible values for the edit type

See Also:
Constant Field Values

PASTE

public static final int PASTE
Possible values for the edit type

See Also:
Constant Field Values

REDO

public static final int REDO
Possible values for the edit type

See Also:
Constant Field Values

TRIM

public static final int TRIM
Possible values for the edit type

See Also:
Constant Field Values

type

int type
The type of this EditAction


UNDO

public static final int UNDO
Possible values for the edit type

See Also:
Constant Field Values
Constructor Detail

EditAction

public EditAction(SimpleSampleEditor editor,
                  java.lang.String text,
                  org.eclipse.jface.resource.ImageDescriptor image,
                  int editType)
Create a new EditAction of the given type with the given name and image

Parameters:
editor - The SampleEditor to which this action belongs
text - The action´s name
image - This action´s image
editType - The edit type of the action

EditAction

public EditAction(SimpleSampleEditor editor,
                  java.lang.String text,
                  int editType)
Create a new EditAction of the given type with the given name

Parameters:
editor - The SampleEditor to which this action belongs
text - The action´s name
editType - The edit type of the action

EditAction

public EditAction(SimpleSampleEditor editor,
                  java.lang.String text,
                  int style,
                  int editType)
Create a new EditAction of the given type with the given name and style

Parameters:
editor - The SampleEditor to which this action belongs
text - The action´s name
style - This action´s style
editType - The edit type of the action
Method Detail

getName

public static java.lang.String getName(int i)
Get a textual description of an edit type

Parameters:
i - The edit type to get the name for
Returns:
A short name describing the edit type shortly

run

public void run()
Tell the Sample Editor to perform this action

Specified by:
run in interface org.eclipse.jface.action.IAction
Overrides:
run in class org.eclipse.jface.action.Action
See Also:
IAction.run()