com.tensegrity.gui.swt.dialog
Class SwtStrokeFormatDialog

java.lang.Object
  extended byorg.eclipse.jface.window.Window
      extended byorg.eclipse.jface.dialogs.Dialog
          extended bycom.tensegrity.gui.swt.dialog.AbstractPreviewDialog
              extended bycom.tensegrity.gui.swt.dialog.SwtStrokeFormatDialog
All Implemented Interfaces:
FormatChangedListener, PreviewDialog

public class SwtStrokeFormatDialog
extends AbstractPreviewDialog
implements FormatChangedListener

A preview dialog for StrokeFormats

Version:
$Id: SwtStrokeFormatDialog.java,v 1.6 2005/03/23 08:55:17 ArndHouben Exp $
Author:
Arnd Houben

Nested Class Summary
 
Nested classes inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class com.tensegrity.gui.swt.dialog.AbstractPreviewDialog
preview, uiManager
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, dialogArea, DLG_IMG_ERROR, 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
SwtStrokeFormatDialog(org.eclipse.swt.widgets.Shell parentShell, UIManager uiManager, StrokeFormat initialStrokeFormat)
          Constructor which requires an initial StrokeFormat.
 
Method Summary
protected  void createDialog(org.eclipse.swt.widgets.Composite parent)
          Create the content of the dialog (with preview) within this method
 void dialogDisposed()
          Called when the dialog is closed.
 void formatChanged(FormatChangedEvent event)
          Notifies that a format item has changed.
 java.lang.Object getPreviewedItem()
          Return the item which is previewed
 StrokeFormat getStrokeFormat()
          Creates and pools a new StrokeFormat from the current StrokeItem
 
Methods inherited from class com.tensegrity.gui.swt.dialog.AbstractPreviewDialog
close, configureShell, create, createDialogArea, registerPreview, setTitle
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getInitialLocation, getInitialSize, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwtStrokeFormatDialog

public SwtStrokeFormatDialog(org.eclipse.swt.widgets.Shell parentShell,
                             UIManager uiManager,
                             StrokeFormat initialStrokeFormat)
Constructor which requires an initial StrokeFormat.

Parameters:
parentShell - the parent shell of this StrokeFormatDialog
uiManager - the UIManager used for internationalization
initialStrokeFormat - the StrokeFormat to initialize the internally used StrokeItem
Method Detail

createDialog

protected final void createDialog(org.eclipse.swt.widgets.Composite parent)
Description copied from class: AbstractPreviewDialog
Create the content of the dialog (with preview) within this method

Specified by:
createDialog in class AbstractPreviewDialog
Parameters:
parent - the Composite which takes the dialog content

getStrokeFormat

public final StrokeFormat getStrokeFormat()
                                   throws StrokeFormatParseException
Creates and pools a new StrokeFormat from the current StrokeItem

Returns:
the new StrokeFormat
Throws:
StrokeFormatParseException - if the stroke format description is not valid

getPreviewedItem

public java.lang.Object getPreviewedItem()
Description copied from interface: PreviewDialog
Return the item which is previewed

Specified by:
getPreviewedItem in interface PreviewDialog
Specified by:
getPreviewedItem in class AbstractPreviewDialog

formatChanged

public void formatChanged(FormatChangedEvent event)
Description copied from interface: FormatChangedListener
Notifies that a format item has changed.

Specified by:
formatChanged in interface FormatChangedListener
Parameters:
event - object describing the change

dialogDisposed

public void dialogDisposed()
Description copied from class: AbstractPreviewDialog
Called when the dialog is closed. Implementing class should free their allocated resources here.

Specified by:
dialogDisposed in class AbstractPreviewDialog


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.