Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.dialogs
Class SystemSelectFileTypesDialog

java.lang.Object
  extended byorg.eclipse.jface.dialogs.Dialog
      extended bycom.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
          extended bycom.ibm.etools.systems.core.ui.dialogs.SystemSelectFileTypesDialog
All Implemented Interfaces:
ISystemMessageLine, ISystemPromptDialog, Runnable
Direct Known Subclasses:
SystemSearchSelectFileTypesDialog

public class SystemSelectFileTypesDialog
extends SystemPromptDialog
implements ISystemMessageLine

A public implementation of the eclipse Select Types dialog.

File types are extension names without the dot. For example "java" and "class".

Call getResult() to get the array of selected types.

See Also:
Serialized Form

Field Summary
static String copyright
           
protected  IFileEditorMapping[] currentInput
           
protected  Collection initialSelections
           
protected  String instruction
           
protected  CheckboxTableViewer listViewer
           
protected  Object[] result
           
protected static int SIZING_SELECTION_WIDGET_HEIGHT
           
protected static int SIZING_SELECTION_WIDGET_WIDTH
           
protected static String TYPE_DELIMITER
           
protected  Text userDefinedText
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
activeRunningOperations, ADD_BUTTON_NO, ADD_BUTTON_YES, ADD_ID, addButton, arrowCursor, BROWSE_BUTTON_NO, BROWSE_BUTTON_YES, BROWSE_ID, browseButton, buttonsComposite, cancelButton, cancelListener, DETAILS_BUTTON_NO, DETAILS_BUTTON_YES, DETAILS_ID, detailsButton, detailsButtonHideMode, detailsHideLabel, detailsShowLabel, dialogAreaComposite, dialogMnemonics, fMessageLine, helpId, horizontalSpacing, initialAddButtonEnabledState, initialDetailsButtonEnabledState, initialOKButtonEnabledState, inputObject, labelAdd, labelBrowse, labelCancel, labelDetailsHide, labelDetailsShow, labelOk, labelTest, marginHeight, marginWidth, minHeight, minWidth, needsProgressMonitor, okButton, okPressed, operationCancelableState, outputObject, outputObjectValidator, overallShell, pack, parentComposite, pendingErrorMessage, pendingMessage, progressMonitorPart, showAddButton, showBrowseButton, showDetailsButton, showOkButton, showTestButton, TEST_BUTTON_NO, TEST_BUTTON_YES, TEST_ID, testButton, tipAdd, tipBrowse, tipCancel, tipDetailsHide, tipDetailsShow, tipOk, tipTest, title, titleImage, verticalSpacing, waitCursor, windowClosingDialog
 
Constructor Summary
SystemSelectFileTypesDialog(Shell shell)
          Constructor when there are no existing types
SystemSelectFileTypesDialog(Shell shell, Collection currentTypes)
          Constructor when there are existing types.
SystemSelectFileTypesDialog(Shell shell, String[] currentTypes)
          Constructor when there are existing types.
 
Method Summary
protected  void addUserDefinedEntries(List result)
          Add the currently-specified extensions.
protected  void checkInitialSelections()
          Visually checks the previously-specified elements in this dialog's list viewer.
protected  Control createInner(Composite parent)
          Method declared on Dialog.
protected  Label createInstructionArea(Composite composite)
          Creates the message area for this dialog.
protected  Control getInitialFocusControl()
          Return the Control to be given initial focus.
protected  IFileEditorMapping[] getInput()
          Return the input to the dialog.
 Object[] getResult()
          Returns the list of selections made by the user, or null if the selection was canceled.
protected  boolean processOK()
          User pressed OK.
 void setInstruction(String instr)
          Sets the instruction text for this dialog.
protected  void setResult(List newResult)
          Set the selections made by the user, or null if the selection was canceled.
protected  boolean validateFileType(String filename)
          Validate the user input for a file type
 
Methods inherited from class com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
aboutToStart, addFillerLine, addGrowableFillerLine, addSeparatorLine, adjustButtonWidth, applyMnemonics, buttonPressed, clearErrorMessage, clearMessage, close, configureShell, createButtonBar, createButtonsForButtonBar, createContents, createControl, createDialogArea, createMessageLine, createWizardClosingDialog, dispose, enableAddButton, enableBrowseButton, enableCancelButton, enableDetailsButton, enableOkButton, enableTestButton, getAddButton, getBrowseButton, getCancelOrCloseButton, getControl, getDescription, getDetailsButton, getDialogMnemonics, getErrorMessage, getHelpContextId, getImage, getInputObject, getMessage, getMessageLine, getOkButton, getOutputObject, getOutputObjectValidator, getProgressMonitor, getSystemErrorMessage, getTestButton, getTitle, handleEvent, hardClose, okToClose, pack, performHelp, processAdd, processBrowse, processCancel, processDetails, processTest, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, restoreEnableState, restoreUIState, run, run, saveEnableStateAndSet, saveUIState, setAddButtonLabel, setAddButtonToolTipText, setBrowseButtonLabel, setBrowseButtonToolTipText, setBusyCursor, setCancelButtonLabel, setCancelButtonToolTipText, setControl, setDescription, setDetailsButtonLabel, setDetailsButtonToolTipText, setDisplayCursor, setDisplayCursor, setErrorMessage, setErrorMessage, setErrorMessage, setHelp, setHelp, setImageDescriptor, setInitialOKButtonEnabledState, setInputObject, setMessage, setMessage, setMinimumSize, setNeedsProgressMonitor, setOkButtonLabel, setOkButtonToolTipText, setOutputObject, setOutputObjectValidator, setPageComplete, setShowAddButton, setShowBrowseButton, setShowDetailsButton, setShowOkButton, setShowTestButton, setTestButtonLabel, setTestButtonToolTipText, setTitle, setVisible, wasCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.core.ui.messages.ISystemMessageLine
clearErrorMessage, clearMessage, getErrorMessage, getMessage, getSystemErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setMessage, setMessage
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

initialSelections

protected Collection initialSelections

instruction

protected String instruction

result

protected Object[] result

listViewer

protected CheckboxTableViewer listViewer

SIZING_SELECTION_WIDGET_HEIGHT

protected static final int SIZING_SELECTION_WIDGET_HEIGHT
See Also:
Constant Field Values

SIZING_SELECTION_WIDGET_WIDTH

protected static final int SIZING_SELECTION_WIDGET_WIDTH
See Also:
Constant Field Values

TYPE_DELIMITER

protected static final String TYPE_DELIMITER

userDefinedText

protected Text userDefinedText

currentInput

protected IFileEditorMapping[] currentInput
Constructor Detail

SystemSelectFileTypesDialog

public SystemSelectFileTypesDialog(Shell shell)
Constructor when there are no existing types

Parameters:
shell - The window hosting this dialog

SystemSelectFileTypesDialog

public SystemSelectFileTypesDialog(Shell shell,
                                   Collection currentTypes)
Constructor when there are existing types.

Parameters:
shell - The window hosting this dialog
currentTypes - The current types as a java.util.Collection. Typically ArrayList is used

SystemSelectFileTypesDialog

public SystemSelectFileTypesDialog(Shell shell,
                                   String[] currentTypes)
Constructor when there are existing types.

Parameters:
shell - The window hosting this dialog
currentTypes - The current types as an array of Strings
Method Detail

createInner

protected Control createInner(Composite parent)
Method declared on Dialog.

Specified by:
createInner in class SystemPromptDialog

getInitialFocusControl

protected Control getInitialFocusControl()
Return the Control to be given initial focus. Child classes must override this, but can return null.

Specified by:
getInitialFocusControl in class SystemPromptDialog

setInstruction

public void setInstruction(String instr)
Sets the instruction text for this dialog.

Parameters:
instr - the instruction text

createInstructionArea

protected Label createInstructionArea(Composite composite)
Creates the message area for this dialog.

This method is provided to allow subclasses to decide where the message will appear on the screen.

Returns:
the message label

addUserDefinedEntries

protected void addUserDefinedEntries(List result)
Add the currently-specified extensions.


checkInitialSelections

protected void checkInitialSelections()
Visually checks the previously-specified elements in this dialog's list viewer.


getInput

protected IFileEditorMapping[] getInput()
Return the input to the dialog.


processOK

protected boolean processOK()
User pressed OK.

Overrides:
processOK in class SystemPromptDialog

setResult

protected void setResult(List newResult)
Set the selections made by the user, or null if the selection was canceled.


validateFileType

protected boolean validateFileType(String filename)
Validate the user input for a file type


getResult

public Object[] getResult()
Returns the list of selections made by the user, or null if the selection was canceled.

Returns:
the array of selected elements, or null if Cancel was pressed

Remote Systems
v6.4.1

Copyright © 2005 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.