|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.vc.UndoCheckoutTask
Class UndoCheckoutTask
is a generic task class which performs the
undoing of the check-out of a checked out object. To perform an undoing of a
check-out, this class only needs to be given a parent Applet
, which
provides context, a Frame
to parent dialogs launched in this undo
task and the Workable
object for which the check-out is to be undone:
UndoCheckoutTask undo_checkout_task = new UndoCheckoutTask( my_applet, my_frame, checked_out_obj ); undo_checkout_task.undoCheckout();
Workable
Field Summary | |
private ThreadGroup |
contextGroup
|
private Workable |
originalObject
|
private Applet |
parentApplet
|
private Frame |
parentFrame
|
private boolean |
prompt
|
private static ResourceBundle |
resources
|
private static String |
RESOURCES
|
private Workable |
undoItem
|
private static String |
versionID
|
Constructor Summary | |
UndoCheckoutTask(Applet parent_applet,
Frame parent_frame,
Workable undo_item)
Construct an UndoCheckoutTask to handle the undoing of a check-out
of a Workable object. |
Method Summary | |
private void |
dispatchRefreshEvent(Object obj,
int action)
|
private WTContext |
getContext()
|
Workable |
getOriginalObject()
Returns the Workable object after the check-out is undone by this
task. |
Applet |
getParentApplet()
Returns the parent Applet which provides context to this task. |
Frame |
getParentFrame()
Returns the Frame which is used as the owner of dialogs
launched in this task. |
Workable |
getUndoItem()
Returns the Workable item whose check-out is undone by this
task. |
private void |
initResources()
|
private void |
setContext(boolean set)
|
void |
setOriginalObject(Workable orig_object)
Sets the Workable object after the check-out is undone. |
void |
setParentApplet(Applet parent_applet)
Sets the parent Applet which provides context to this task. |
void |
setParentFrame(Frame parent_frame)
Sets the Frame to be used as the owner of dialogs launched in
this task. |
void |
setPromptOnUndo(boolean prompt)
Set whether or not a prompt should be displayed before performing the undo check-out. |
void |
setUndoItem(Workable undo_item)
Sets the Workable item for which the check-out is to be undone. |
private void |
showMessageDialog(String message)
|
Workable |
undoCheckout()
Performs the actual undoing of the check-out of the given checked out item. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String versionID
private static String RESOURCES
private static ResourceBundle resources
private Applet parentApplet
private Frame parentFrame
private Workable undoItem
private ThreadGroup contextGroup
private boolean prompt
private Workable originalObject
Constructor Detail |
public UndoCheckoutTask(Applet parent_applet, Frame parent_frame, Workable undo_item)
UndoCheckoutTask
to handle the undoing of a check-out
of a Workable object.
parent_applet
- The parent Applet
from which this task
gets its context.parent_frame
- The parent Frame
which is used to provide
a Frame
for launching dialogs. If no
frame is provided, the applet is used in launching
dialogs.undo_item
- The workable item to undo the checkout for.Method Detail |
public void setParentApplet(Applet parent_applet)
Applet
which provides context to this task. The
parent Applet
is used to get the appropriate WTContext
object for this task.
parent_applet
- the Applet
to be used for contextgetParentApplet()
,
WTContext
public Applet getParentApplet()
Applet
which provides context to this task.
The parent Applet
is used to get the appropriate WTContext
object for this task.
Applet
used for providing contextsetParentApplet(java.applet.Applet)
,
WTContext
public void setParentFrame(Frame parent_frame)
Frame
to be used as the owner of dialogs launched in
this task. Since a Dialog
requires a Frame
to
be constructed, this task must be given a frame to use.
parent_frame
- the Frame
used for launching dialogs
from this taskgetParentFrame()
,
Dialog
public Frame getParentFrame()
Frame
which is used as the owner of dialogs
launched in this task. If the parent frame has not been explicitly
set (via setParentFrame
), this method will try to retrieve
a frame by traversing the parent hierarchy of the parent applet, if the
parent applet has been given.
Frame
used for launching dialogs from
this tasksetParentFrame(java.awt.Frame)
,
setParentApplet(java.applet.Applet)
public void setPromptOnUndo(boolean prompt)
prompt
- if true, the user will be prompted on the undo.public void setUndoItem(Workable undo_item)
Workable
item for which the check-out is to be undone.
This method does not verify that the given Workable
corresponds to an object that is currently checked out.
undo_item
- the Workable
object to for which the check-out
is undonegetUndoItem()
,
Workable
public Workable getUndoItem()
Workable
item whose check-out is undone by this
task.
Workable
item whose check-out is undonesetUndoItem(wt.vc.wip.Workable)
,
Workable
public void setOriginalObject(Workable orig_object)
Workable
object after the check-out is undone.
orig_object
- the Workable
object after the check-out
is undone#getOriginaObject
,
Workable
public Workable getOriginalObject()
Workable
object after the check-out is undone by this
task.
Workable
object after the check-out is undonesetOriginalObject(wt.vc.wip.Workable)
,
Workable
public Workable undoCheckout()
Workable
object for which the check-out was undoneWorkable
private void initResources()
private WTContext getContext()
private void setContext(boolean set)
private void showMessageDialog(String message)
private void dispatchRefreshEvent(Object obj, int action)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |