TPTP 4.2.0 Monitoring Tools Project
Internal API Specification

org.eclipse.tptp.monitoring.logui.internal.wizards
Class ImportMultiLogFilesDialog

java.lang.Object
  extended byorg.eclipse.jface.window.Window
      extended byorg.eclipse.jface.dialogs.Dialog
          extended byorg.eclipse.tptp.monitoring.logui.internal.wizards.ImportMultiLogFilesDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider, org.eclipse.swt.widgets.Listener

public class ImportMultiLogFilesDialog
extends org.eclipse.jface.dialogs.Dialog
implements org.eclipse.swt.widgets.Listener


Nested Class Summary
 
Nested classes inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
protected  org.eclipse.swt.widgets.Button deselectAllButton
           
static java.lang.String DLG_IMG_TITLE_BANNER
           
static java.lang.String DLG_IMG_TITLE_ERROR
           
protected  org.eclipse.swt.widgets.Text messageLabel
           
protected  org.eclipse.swt.widgets.Button selectAllButton
           
protected  java.util.List selectedTypes
           
protected static int SIZING_TEXT_FIELD_WIDTH
           
protected  org.eclipse.swt.widgets.Button sourceBrowseButton
           
protected  org.eclipse.swt.widgets.Combo sourceNameField
           
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
protected ImportMultiLogFilesDialog(org.eclipse.swt.widgets.Shell parent)
           
 
Method Summary
protected  void createButtonsGroup(org.eclipse.swt.widgets.Composite parent)
          Creates the buttons for selecting specific types or selecting all or none of the elements.
protected  org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
           
protected  void createFileSelectionGroup(org.eclipse.swt.widgets.Composite parent)
          Create the import source selection widget
protected  void createRootDirectoryGroup(org.eclipse.swt.widgets.Composite parent)
          Create the group for creating the root directory
protected  MinimizedLogFileSystemElement createRootElement(java.lang.Object fileSystemObject, org.eclipse.ui.wizards.datatransfer.IImportStructureProvider provider)
          Creates and returns a FileSystemElement if the specified file system object merits one.
protected  void createSourceGroup(org.eclipse.swt.widgets.Composite parent)
          Create the import source specification widgets
protected  void enableButtonGroup(boolean enable)
          Enable or disable the button group.
protected  org.eclipse.jface.viewers.ITreeContentProvider getFileProvider()
          Returns a content provider for FileSystemElements that returns only files as children.
 java.util.List getFileSystemObjects()
           
protected  MinimizedLogFileSystemElement getFileSystemTree()
          Answer the root FileSystemElement that represents the contents of the currently-specified source.
protected  org.eclipse.jface.viewers.ITreeContentProvider getFolderProvider()
          Returns a content provider for FileSystemElements that returns only folders as children.
protected  java.util.List getSelectedResources()
          Returns this page's list of currently-specified resources to be imported.
protected  java.io.File getSourceDirectory()
          Returns a File object representing the currently-named source directory iff it exists as a valid directory, or null otherwise.
protected  java.lang.String getSourceLabel()
          Answer the string to display as the label for the source specification field
protected  java.util.List getTypesToImport()
          Returns a collection of the currently-specified resource types for use by the type selection dialog.
 void handleEvent(org.eclipse.swt.widgets.Event event)
           
protected  void handleSourceBrowseButtonPressed()
          Open an appropriate source browser so that the user can specify a source to import from
protected  boolean isExportableExtension(java.lang.String extension)
          Returns whether the extension provided is an extension that has been specified for export by the user.
protected  void okPressed()
           
protected  void resetSelection()
          Repopulate the view based on the currently entered directory.
protected  void restoreWidgetValues()
           
protected  void saveWidgetValues()
          Since Finish was pressed, write widget values to the dialog store so that they will persist into the next invocation of this wizard page
protected  MinimizedLogFileSystemElement selectFiles(java.lang.Object rootFileSystemObject, org.eclipse.ui.wizards.datatransfer.IImportStructureProvider structureProvider)
          Invokes a file selection operation using the specified file system and structure provider.
protected  void setAllSelections(boolean value)
          Set all of the selections in the selection group to value.
protected  void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
           
 void setErrorMessage(java.lang.String newErrorMessage)
           
 void setMessage(java.lang.String newMessage)
           
 void setMessage(java.lang.String newMessage, int newType)
           
protected  void setSourceName(java.lang.String path)
          Sets the source name of the import to be the supplied path.
 void setTitle(java.lang.String newTitle)
           
 void setTitleImage(org.eclipse.swt.graphics.Image newTitleImage)
           
protected  void updateSelections(java.util.Map map)
          Update the selections with those in map .
protected  void updateWidgetEnablements()
          Check if widgets are enabled or disabled by a change in the dialog.
protected  boolean validateSourceGroup()
          Answer a boolean indicating whether self's source specification widgets currently all contain valid values.
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DLG_IMG_TITLE_ERROR

public static final java.lang.String DLG_IMG_TITLE_ERROR
See Also:
Constant Field Values

SIZING_TEXT_FIELD_WIDTH

protected static final int SIZING_TEXT_FIELD_WIDTH
See Also:
Constant Field Values

selectedTypes

protected java.util.List selectedTypes

sourceNameField

protected org.eclipse.swt.widgets.Combo sourceNameField

sourceBrowseButton

protected org.eclipse.swt.widgets.Button sourceBrowseButton

selectAllButton

protected org.eclipse.swt.widgets.Button selectAllButton

deselectAllButton

protected org.eclipse.swt.widgets.Button deselectAllButton

DLG_IMG_TITLE_BANNER

public static final java.lang.String DLG_IMG_TITLE_BANNER
See Also:
Constant Field Values

messageLabel

protected org.eclipse.swt.widgets.Text messageLabel
Constructor Detail

ImportMultiLogFilesDialog

protected ImportMultiLogFilesDialog(org.eclipse.swt.widgets.Shell parent)
Method Detail

createContents

protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)

createSourceGroup

protected void createSourceGroup(org.eclipse.swt.widgets.Composite parent)
Create the import source specification widgets


createButtonsGroup

protected final void createButtonsGroup(org.eclipse.swt.widgets.Composite parent)
Creates the buttons for selecting specific types or selecting all or none of the elements.

Parameters:
parent - the parent control

isExportableExtension

protected boolean isExportableExtension(java.lang.String extension)
Returns whether the extension provided is an extension that has been specified for export by the user.

Parameters:
extension - the resource name
Returns:
true if the resource name is suitable for export based upon its extension

updateSelections

protected void updateSelections(java.util.Map map)
Update the selections with those in map .

Parameters:
map - Map - key tree elements, values Lists of list elements

getSelectedResources

protected java.util.List getSelectedResources()
Returns this page's list of currently-specified resources to be imported. This is the primary resource selection facility accessor for subclasses.

Returns:
a list of resources currently selected for export (element type: IResource)

getTypesToImport

protected java.util.List getTypesToImport()
Returns a collection of the currently-specified resource types for use by the type selection dialog.


setAllSelections

protected void setAllSelections(boolean value)
Set all of the selections in the selection group to value. Implemented here to provide access for inner classes.

Parameters:
value - boolean

restoreWidgetValues

protected void restoreWidgetValues()

createRootDirectoryGroup

protected void createRootDirectoryGroup(org.eclipse.swt.widgets.Composite parent)
Create the group for creating the root directory


setSourceName

protected void setSourceName(java.lang.String path)
Sets the source name of the import to be the supplied path. Adds the name of the path to the list of items in the source combo and selects it.

Parameters:
path - the path to be added

resetSelection

protected void resetSelection()
Repopulate the view based on the currently entered directory.


getFileSystemTree

protected MinimizedLogFileSystemElement getFileSystemTree()
Answer the root FileSystemElement that represents the contents of the currently-specified source. If this FileSystemElement is not currently defined then create and return it.


getSourceDirectory

protected java.io.File getSourceDirectory()
Returns a File object representing the currently-named source directory iff it exists as a valid directory, or null otherwise.


getSourceLabel

protected java.lang.String getSourceLabel()
Answer the string to display as the label for the source specification field


selectFiles

protected MinimizedLogFileSystemElement selectFiles(java.lang.Object rootFileSystemObject,
                                                    org.eclipse.ui.wizards.datatransfer.IImportStructureProvider structureProvider)
Invokes a file selection operation using the specified file system and structure provider. If the user specifies files to be imported then this selection is cached for later retrieval and is returned.


createRootElement

protected MinimizedLogFileSystemElement createRootElement(java.lang.Object fileSystemObject,
                                                          org.eclipse.ui.wizards.datatransfer.IImportStructureProvider provider)
Creates and returns a FileSystemElement if the specified file system object merits one. The criteria for this are: Also create the children.


createFileSelectionGroup

protected void createFileSelectionGroup(org.eclipse.swt.widgets.Composite parent)
Create the import source selection widget


updateWidgetEnablements

protected void updateWidgetEnablements()
Check if widgets are enabled or disabled by a change in the dialog.


validateSourceGroup

protected boolean validateSourceGroup()
Answer a boolean indicating whether self's source specification widgets currently all contain valid values.


enableButtonGroup

protected void enableButtonGroup(boolean enable)
Enable or disable the button group.


getFileProvider

protected org.eclipse.jface.viewers.ITreeContentProvider getFileProvider()
Returns a content provider for FileSystemElements that returns only files as children.


getFolderProvider

protected org.eclipse.jface.viewers.ITreeContentProvider getFolderProvider()
Returns a content provider for FileSystemElements that returns only folders as children.


setTitle

public void setTitle(java.lang.String newTitle)

setMessage

public void setMessage(java.lang.String newMessage)

setMessage

public void setMessage(java.lang.String newMessage,
                       int newType)

setTitleImage

public void setTitleImage(org.eclipse.swt.graphics.Image newTitleImage)

setErrorMessage

public void setErrorMessage(java.lang.String newErrorMessage)

handleEvent

public void handleEvent(org.eclipse.swt.widgets.Event event)
Specified by:
handleEvent in interface org.eclipse.swt.widgets.Listener

handleSourceBrowseButtonPressed

protected void handleSourceBrowseButtonPressed()
Open an appropriate source browser so that the user can specify a source to import from


okPressed

protected void okPressed()

setButtonLayoutData

protected void setButtonLayoutData(org.eclipse.swt.widgets.Button button)

getFileSystemObjects

public java.util.List getFileSystemObjects()

saveWidgetValues

protected void saveWidgetValues()
Since Finish was pressed, write widget values to the dialog store so that they will persist into the next invocation of this wizard page


TPTP 4.2.0 Monitoring Tools Project
Internal API Specification