org.drools.eclipse.flow.common.editor.action
Class ExportImageDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TrayDialog
              extended by org.eclipse.jface.dialogs.TitleAreaDialog
                  extended by org.drools.eclipse.flow.common.editor.action.ExportImageDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class ExportImageDialog
extends org.eclipse.jface.dialogs.TitleAreaDialog


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
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
ExportImageDialog(org.eclipse.swt.widgets.Shell parentShell)
          Creates a new Save As dialog for no specific file.
 
Method Summary
 boolean close()
           
protected  void configureShell(org.eclipse.swt.widgets.Shell shell)
           
protected  void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.jface.dialogs.IDialogSettings getDialogBoundsSettings()
           
 org.eclipse.core.runtime.IPath getResult()
          Returns the full path entered by the user.
protected  boolean isResizable()
           
protected  void okPressed()
           
protected  void setDialogComplete(boolean value)
          Sets the completion state of this dialog and adjusts the enable state of the Ok button accordingly.
 void setOriginalFile(org.eclipse.core.resources.IFile originalFile)
          Sets the original file to use.
 void setOriginalName(String originalName)
          Set the original file name to use.
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
getErrorMessage, getInitialSize, getMessage, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, createButtonBar, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, 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
 

Constructor Detail

ExportImageDialog

public ExportImageDialog(org.eclipse.swt.widgets.Shell parentShell)
Creates a new Save As dialog for no specific file.

Parameters:
parentShell - the parent shell
Method Detail

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell shell)
Overrides:
configureShell in class org.eclipse.jface.window.Window

createContents

protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
Overrides:
createContents in class org.eclipse.jface.dialogs.TitleAreaDialog

close

public boolean close()
Overrides:
close in class org.eclipse.jface.dialogs.TrayDialog

createButtonsForButtonBar

protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
Overrides:
createButtonsForButtonBar in class org.eclipse.jface.dialogs.Dialog

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.TitleAreaDialog

getResult

public org.eclipse.core.runtime.IPath getResult()
Returns the full path entered by the user.

Note that the file and container might not exist and would need to be created. See the IFile.create method and the ContainerGenerator class.

Returns:
the path, or null if Cancel was pressed

okPressed

protected void okPressed()
Overrides:
okPressed in class org.eclipse.jface.dialogs.Dialog

setDialogComplete

protected void setDialogComplete(boolean value)
Sets the completion state of this dialog and adjusts the enable state of the Ok button accordingly.

Parameters:
value - true if this dialog is compelete, and false otherwise

setOriginalFile

public void setOriginalFile(org.eclipse.core.resources.IFile originalFile)
Sets the original file to use.

Parameters:
originalFile - the original file

setOriginalName

public void setOriginalName(String originalName)
Set the original file name to use. Used instead of setOriginalFile when the original resource is not an IFile. Must be called before create.

Parameters:
originalName - default file name

getDialogBoundsSettings

protected org.eclipse.jface.dialogs.IDialogSettings getDialogBoundsSettings()
Overrides:
getDialogBoundsSettings in class org.eclipse.jface.dialogs.Dialog

isResizable

protected boolean isResizable()
Overrides:
isResizable in class org.eclipse.jface.dialogs.Dialog


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.