Eclipse Platform
Release 3.6

org.eclipse.ui.ide.dialogs
Class ImportTypeDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.IconAndMessageDialog
              extended by org.eclipse.jface.dialogs.MessageDialog
                  extended by org.eclipse.ui.ide.dialogs.ImportTypeDialog
All Implemented Interfaces:
EventListener, IShellProvider, SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class ImportTypeDialog
extends MessageDialog
implements SelectionListener

Since:
3.6

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
 
Field Summary
static String ABSOLUTE_PATH
          Generate linked resources with absolute path locations.
static String AUTOMATIC
          Generate linked resources relative to their preferred variable (typically the PROJECT_LOC variable)
static int IMPORT_COPY
          Copy the files and folders to the destination
static int IMPORT_GROUPS_AND_LINKS
          Recreate the file and folder hierarchy using groups and links
static int IMPORT_LINK
          Create linked resources for each file and folder
static int IMPORT_MOVE
          Move the files and folders to the destination
static int IMPORT_NONE
          Do not perform an import operation
 
Fields inherited from class org.eclipse.jface.dialogs.MessageDialog
CONFIRM, ERROR, INFORMATION, NONE, QUESTION, QUESTION_WITH_CANCEL, WARNING
 
Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
imageLabel, message, messageLabel
 
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
ImportTypeDialog(Shell parentShell, int operationMask)
           
 
Method Summary
protected  void buttonPressed(int buttonId)
          Notifies that this dialog's button with the given id has been pressed.
protected  Control createCustomArea(Composite parent)
          Creates and returns the contents of an area of the dialog which appears below the message and above the button bar.
 int getSelection()
           
 String getVariable()
           
 int open()
          Opens this message dialog, creating it first if it has not yet been created.
 void widgetDefaultSelected(SelectionEvent e)
          Sent when default selection occurs in the control.
 void widgetSelected(SelectionEvent e)
          Sent when selection occurs in the control.
 
Methods inherited from class org.eclipse.jface.dialogs.MessageDialog
configureShell, createButton, createButtonsForButtonBar, createDialogArea, customShouldTakeFocus, getButton, getButtonLabels, getDefaultButtonIndex, getImage, getMinimumMessageWidth, handleShellCloseEvent, open, openConfirm, openError, openInformation, openQuestion, openWarning, setButtonLabels, setButtons
 
Methods inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
createButtonBar, createContents, createDialogAndButtonArea, createMessageArea, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, 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

AUTOMATIC

public static final String AUTOMATIC
Generate linked resources relative to their preferred variable (typically the PROJECT_LOC variable)

See Also:
Constant Field Values

ABSOLUTE_PATH

public static final String ABSOLUTE_PATH
Generate linked resources with absolute path locations.

See Also:
Constant Field Values

IMPORT_COPY

public static final int IMPORT_COPY
Copy the files and folders to the destination

See Also:
Constant Field Values

IMPORT_GROUPS_AND_LINKS

public static final int IMPORT_GROUPS_AND_LINKS
Recreate the file and folder hierarchy using groups and links

See Also:
Constant Field Values

IMPORT_LINK

public static final int IMPORT_LINK
Create linked resources for each file and folder

See Also:
Constant Field Values

IMPORT_MOVE

public static final int IMPORT_MOVE
Move the files and folders to the destination

See Also:
Constant Field Values

IMPORT_NONE

public static final int IMPORT_NONE
Do not perform an import operation

See Also:
Constant Field Values
Constructor Detail

ImportTypeDialog

public ImportTypeDialog(Shell parentShell,
                        int operationMask)
Parameters:
parentShell -
operationMask -
Method Detail

getVariable

public String getVariable()
Returns:
The currently selected variable, or AUTOMATIC or ABSOLUTE_PATH

getSelection

public int getSelection()
Returns:
The current selection (one of IMPORT_COPY, IMPORT_GROUPS_AND_LINKS, IMPORT_LINK and IMPORT_MOVE)

open

public int open()
Description copied from class: MessageDialog
Opens this message dialog, creating it first if it has not yet been created.

This method waits until the dialog is closed by the end user, and then it returns the dialog's return code. The dialog's return code is either the index of the button the user pressed, or SWT.DEFAULT if the dialog has been closed by other means.

Overrides:
open in class MessageDialog
Returns:
the return code
See Also:
Window.open()

createCustomArea

protected Control createCustomArea(Composite parent)
Description copied from class: MessageDialog
Creates and returns the contents of an area of the dialog which appears below the message and above the button bar.

The default implementation of this framework method returns null. Subclasses may override.

Overrides:
createCustomArea in class MessageDialog
Parameters:
parent - parent composite to contain the custom area
Returns:
the custom area control, or null

buttonPressed

protected void buttonPressed(int buttonId)
Description copied from class: Dialog
Notifies that this dialog's button with the given id has been pressed.

The Dialog implementation of this framework method calls okPressed if the ok button is the pressed, and cancelPressed if the cancel button is the pressed. All other button presses are ignored. Subclasses may override to handle other buttons, but should call super.buttonPressed if the default handling of the ok and cancel buttons is desired.

Overrides:
buttonPressed in class MessageDialog
Parameters:
buttonId - the id of the button that was pressed (see IDialogConstants.*_ID constants)

widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent e)
Description copied from interface: SelectionListener
Sent when default selection occurs in the control.

For example, on some platforms default selection occurs in a List when the user double-clicks an item or types return in a Text. On some platforms, the event occurs when a mouse button or key is pressed. On others, it happens when the mouse or key is released. The exact key or mouse gesture that causes this event is platform specific.

Specified by:
widgetDefaultSelected in interface SelectionListener
Parameters:
e - an event containing information about the default selection

widgetSelected

public void widgetSelected(SelectionEvent e)
Description copied from interface: SelectionListener
Sent when selection occurs in the control.

For example, selection occurs in a List when the user selects an item or items with the keyboard or mouse. On some platforms, the event occurs when a mouse button or key is pressed. On others, it happens when the mouse or key is released. The exact key or mouse gesture that causes this event is platform specific.

Specified by:
widgetSelected in interface SelectionListener
Parameters:
e - an event containing information about the selection

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.