org.jtheque.primary.view.impl.choice
Class AbstractDeleteChoiceAction

java.lang.Object
  extended by org.jtheque.primary.view.impl.choice.AbstractChoiceAction
      extended by org.jtheque.primary.view.impl.choice.AbstractDeleteChoiceAction
All Implemented Interfaces:
ChoiceAction
Direct Known Subclasses:
AbstractPrimaryDeleteChoiceAction

public abstract class AbstractDeleteChoiceAction
extends AbstractChoiceAction

An abstract delete action for the choice view.

Author:
Baptiste Wicht

Constructor Summary
AbstractDeleteChoiceAction()
           
 
Method Summary
protected  void addDeleters(Deleter<? extends org.jtheque.core.managers.persistence.able.Entity>... deleters)
          Set the deleters to use to execute the action.
protected static void addEditIfDeleted(boolean deleted, UndoableEdit edit)
          Add an edit to undo-redo manager if deleted.
 boolean canDoAction(String action)
          Indicate if this action can do the type of action.
 void execute()
          Execute the action.
 
Methods inherited from class org.jtheque.primary.view.impl.choice.AbstractChoiceAction
getContent, getSelectedItem, setContent, setSelectedItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDeleteChoiceAction

public AbstractDeleteChoiceAction()
Method Detail

addDeleters

protected final void addDeleters(Deleter<? extends org.jtheque.core.managers.persistence.able.Entity>... deleters)
Set the deleters to use to execute the action.

Parameters:
deleters - The deleters to use.

canDoAction

public final boolean canDoAction(String action)
Description copied from interface: ChoiceAction
Indicate if this action can do the type of action.

Parameters:
action - The type of action.
Returns:
true if the action can do this type else false.

execute

public void execute()
Description copied from interface: ChoiceAction
Execute the action.


addEditIfDeleted

protected static void addEditIfDeleted(boolean deleted,
                                       UndoableEdit edit)
Add an edit to undo-redo manager if deleted.

Parameters:
deleted - The boolean tag of the delete operation.
edit - The undoable edit.


Copyright © 2010 JTheque. All Rights Reserved.