Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.dialogs
Class QSYSSelectJobDialog

java.lang.Object
  extended by SystemPromptDialog
      extended by com.ibm.etools.iseries.rse.ui.dialogs.QSYSSelectJobDialog
All Implemented Interfaces:
IQSYSSelectionTypes

public class QSYSSelectJobDialog
extends SystemPromptDialog
implements IQSYSSelectionTypes

Dialog for allowing users to select a job from a remote iSeries.

Call these methods to configure the typical functionality of the dialog

Call these methods to configure the more advanced functionality of the dialog

Call these methods to configure the text on the dialog

After running, call these methods to get the output:


Field Summary
protected  IRemoteSelectionAddListener addButtonCallback
           
protected  IBMiConnection connection
           
static String copyright
           
protected  String jobFilterString
           
protected  boolean multipleSelectionMode
           
protected  int selectionType
           
protected  QSYSSelectJobForm selectJobForm
           
 
Fields inherited from interface com.ibm.etools.iseries.rse.ui.widgets.IQSYSSelectionTypes
BROWSEFOR_ANY, BROWSEFOR_COMMAND, BROWSEFOR_CRT_COMMAND, BROWSEFOR_DTAARA, BROWSEFOR_DTAQ, BROWSEFOR_FIELD, BROWSEFOR_FILE, BROWSEFOR_JOB, BROWSEFOR_JOBD, BROWSEFOR_JOBQ, BROWSEFOR_LIBRARY, BROWSEFOR_MEMBER, BROWSEFOR_MESSAGE, BROWSEFOR_MODULE, BROWSEFOR_MSGF, BROWSEFOR_OBJECT, BROWSEFOR_PGM, BROWSEFOR_PGM_MODULE, BROWSEFOR_PGMSRVPGM, BROWSEFOR_PROCEDURE, BROWSEFOR_RECORD, BROWSEFOR_SRVPGM, Copyright
 
Constructor Summary
QSYSSelectJobDialog(Shell shell, IBMiConnection connection, int selectionType)
          Constructor
QSYSSelectJobDialog(Shell shell, String title, IBMiConnection connection, int selectionType)
          Constructor when you want to supply your own title.
 
Method Summary
 boolean close()
          We have to override close to ensure that we reset the form to null
protected  Control createInner(Composite parent)
          Private method.
protected  ISystemMessageLine createMessageLine(Composite c)
          Create message line.
protected  Control getInitialFocusControl()
          Private method.
 boolean getMultipleSelectionMode()
          Return the multiple selection mode as set by setMultipleSelectionMode(boolean)
 Object getSelectedObject()
          Return selected ISeriesJob object (or first one if multiple selection enabled)
 Object[] getSelectedObjects()
          Return all selected objects.
protected  QSYSSelectJobForm getSelectJobForm()
          Private method.
protected  boolean processOK()
          Private method.
 void setJobFilterString(String filterString)
          Add a string filter to select a list of jobs to display
 void setMessage(String message)
          Set the message shown at the top of the form
 void setMultipleSelectionMode(boolean multiple)
          Set multiple selection mode.
 void setPageComplete(boolean complete)
           
 void setPreSelection(IHost connection, String libraryName, String objectName)
          Set an object to preselect.
 void setSelectionTreeToolTipText(String tip)
          Set the tooltip text for the remote systems tree from which an item is selected.
 void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
          Specify a validator to use when the user selects a remote object.
 void setShowJobListOnStartup(boolean show)
          Set to false if don't want to see the list of job for the specified job filter string as soon as the dialog comes up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

connection

protected IBMiConnection connection

selectJobForm

protected QSYSSelectJobForm selectJobForm

jobFilterString

protected String jobFilterString

selectionType

protected int selectionType

multipleSelectionMode

protected boolean multipleSelectionMode

addButtonCallback

protected IRemoteSelectionAddListener addButtonCallback
Constructor Detail

QSYSSelectJobDialog

public QSYSSelectJobDialog(Shell shell,
                           IBMiConnection connection,
                           int selectionType)
Constructor

Parameters:
shell - The shell to hang the dialog off of
connection - An IBMiConnection object to get job list
selectionType - An enumeration indicating the type of object to browse for, as specified in IISeriesSelectionTypes

QSYSSelectJobDialog

public QSYSSelectJobDialog(Shell shell,
                           String title,
                           IBMiConnection connection,
                           int selectionType)
Constructor when you want to supply your own title.

Parameters:
shell - The shell to hang the dialog off of
title - The title to give the dialog
connection - An IBMiConnection object to get job list
selectionType - An enumeration indicating the type of object to browse for, as specified in com.ibm.etools.iseries.core.ui.widgets.IISeriesSelectionTypes
srcFilesOnly - If the selection type is files or members, indicate whether to restrict to source files
Method Detail

setShowJobListOnStartup

public void setShowJobListOnStartup(boolean show)
Set to false if don't want to see the list of job for the specified job filter string as soon as the dialog comes up. Default value is true


setMessage

public void setMessage(String message)
Set the message shown at the top of the form


setSelectionTreeToolTipText

public void setSelectionTreeToolTipText(String tip)
Set the tooltip text for the remote systems tree from which an item is selected.


setJobFilterString

public void setJobFilterString(String filterString)
Add a string filter to select a list of jobs to display

This is really a filter string versus a filter, but it is realized in the GUI as a temporary filter.


setPreSelection

public void setPreSelection(IHost connection,
                            String libraryName,
                            String objectName)
Set an object to preselect. This will:


setMultipleSelectionMode

public void setMultipleSelectionMode(boolean multiple)
Set multiple selection mode. Default is single selection only.

If you set this to true you must use getSelectedObjects()

Further, if you turn this on, it has the side effect of allowing the user to select any remote object. The assumption being if you are prompting for children, you also want to allow the user to select a parent, with the meaning being that all children within the parent are implicitly selected.

To restrict what types of objects can be selected, use #setSelectionValidator(com.ibm.etools.systems.core.ui.IValidatorRemoteSelection)


getMultipleSelectionMode

public boolean getMultipleSelectionMode()
Return the multiple selection mode as set by setMultipleSelectionMode(boolean)


setSelectionValidator

public void setSelectionValidator(IValidatorRemoteSelection selectionValidator)
Specify a validator to use when the user selects a remote object. This allows you to decide if OK should be enabled or not for that remote object


getInitialFocusControl

protected Control getInitialFocusControl()
Private method.

See Also:
SystemPromptDialog#getInitialFocusControl()

createInner

protected Control createInner(Composite parent)
Private method.

See Also:
SystemPromptDialog#createInner(Composite)

getSelectJobForm

protected QSYSSelectJobForm getSelectJobForm()
Private method. Get the contents.


createMessageLine

protected ISystemMessageLine createMessageLine(Composite c)
Create message line. Intercept so we can set msg line of form.


processOK

protected boolean processOK()
Private method.

Called when user presses OK button. Return true to close dialog. Return false to not close dialog.


getSelectedObject

public Object getSelectedObject()
Return selected ISeriesJob object (or first one if multiple selection enabled)


getSelectedObjects

public Object[] getSelectedObjects()
Return all selected objects. This method will return an array of one unless you have called setMultipleSelectionMode(true)!

See Also:
setMultipleSelectionMode(boolean)

setPageComplete

public void setPageComplete(boolean complete)

close

public boolean close()
We have to override close to ensure that we reset the form to null


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.