wt.clients.vc
Class OneOffTask

java.lang.Object
  extended bywt.clients.vc.OneOffTask

public class OneOffTask
extends Object

Construct a OneOffTask to handle the creation of a new version of a OneOffVersioned object. This code calls OneOffTaskLogic to perform an availability check of the object for a new version and then presents the user with a dialog, OneOffDialog. Below is an example of using OneOffTask.

 import wt.clients.vc.OneOffTask;
 

void oneOffVersionMenuItem_Action(java.awt.event.ActionEvent event) { oneOffVersionObject(); }

protected void oneOffVersionObject() { try { setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) ); // You must supply the getVersionedObject() method. OneOffVersioned versionedObject = getVersionedObject(); // You must supply the getParentApplet() method for the calling // GUI component. // You must supply the getFrame() method for the calling // GUI component. OneOffTask oneOffVersion_task = new OneOffTask( getParentApplet(), getFrame(), versionedObject ); oneOffVersion_task.oneOffVersion(); } finally { setCursor( Cursor.getDefaultCursor() ); } }



Supported API: false

Extendable: false


Field Summary
private  OneOffVersioned oneOffVersionItem
           
private  Applet parentApplet
           
private  Frame parentFrame
           
private static ResourceBundle resources
           
static String RESOURCES
           
 
Constructor Summary
OneOffTask(Applet parent_applet, Frame parent_frame, OneOffVersioned oneOffVersion_item)
           
 
Method Summary
private  void dispatchRefreshEvent(Object obj, int action)
           
private  WTContext getContext()
           
 OneOffVersioned getOneOffItem()
          Supported API: false
 Applet getParentApplet()
          Supported API: false
 Frame getParentFrame()
          Supported API: false
private  Frame getTopLevelFrame()
           
private  void initResources()
           
 OneOffVersioned oneOffVersion()
          This call will present the user with a dialog to create a new version of the the current OneOffVersioned object.
 void setOneOffItem(OneOffVersioned oneOffVersion_item)
          Supported API: false
 void setParentApplet(Applet parent_applet)
          Supported API: false
 void setParentFrame(Frame parent_frame)
          Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCES

public static String RESOURCES

resources

private static ResourceBundle resources

parentApplet

private Applet parentApplet

parentFrame

private Frame parentFrame

oneOffVersionItem

private OneOffVersioned oneOffVersionItem
Constructor Detail

OneOffTask

public OneOffTask(Applet parent_applet,
                  Frame parent_frame,
                  OneOffVersioned oneOffVersion_item)
Method Detail

setParentApplet

public void setParentApplet(Applet parent_applet)
Supported API: false


getParentApplet

public Applet getParentApplet()
Supported API: false

Returns:
Applet

setParentFrame

public void setParentFrame(Frame parent_frame)
Supported API: false


getParentFrame

public Frame getParentFrame()
Supported API: false

Returns:
Frame

setOneOffItem

public void setOneOffItem(OneOffVersioned oneOffVersion_item)
Supported API: false


getOneOffItem

public OneOffVersioned getOneOffItem()
Supported API: false

Returns:
The current wt.vc.OneOffVersioned object that is a candidate for a new version

oneOffVersion

public OneOffVersioned oneOffVersion()
This call will present the user with a dialog to create a new version of the the current OneOffVersioned object. The current object to be oneOffVersioned can be retrieved with a call to getOneOffItem(). This method will present either a OneOffDialog dialog (). After the dialog is presented and closed, the version that was originally passed in is returned. A call to RefreshService updates the UI.

Supported API: false

Returns:
The old version of the wt.vc.OneOffVersioned object

initResources

private void initResources()

getTopLevelFrame

private Frame getTopLevelFrame()

getContext

private WTContext getContext()

dispatchRefreshEvent

private void dispatchRefreshEvent(Object obj,
                                  int action)