com.tensegrity.gui.swt.dialog
Class SwtMarkerFormatDialog

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.SwtMarkerFormatDialog
All Implemented Interfaces:
java.util.EventListener, FormatChangedListener, PreviewDialog, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class SwtMarkerFormatDialog
extends AbstractPreviewDialog
implements org.eclipse.swt.events.SelectionListener, FormatChangedListener

A preview dialog for changing marker formats.

Version:
$Id: SwtMarkerFormatDialog.java,v 1.10 2006/03/02 11:41:40 BurkhardWick 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
SwtMarkerFormatDialog(org.eclipse.swt.widgets.Shell parentShell, UIManager uiManager, MarkerFormat initialMarkerFormat)
          Constructor which requires an initial MarkerFormat to initialize the internally used MarkerItem.
 
Method Summary
protected  void configureShell(org.eclipse.swt.widgets.Shell shell)
           
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.
 MarkerFormat getMarkerFormat()
          Creates and pools a new MarkerFormat from the current MarkerItem
 java.lang.Object getPreviewedItem()
          Return the item which is previewed
 void setTitle(java.lang.String title)
          Sets the dialog title.
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
           
 void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
           
 
Methods inherited from class com.tensegrity.gui.swt.dialog.AbstractPreviewDialog
close, create, createDialogArea, registerPreview
 
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

SwtMarkerFormatDialog

public SwtMarkerFormatDialog(org.eclipse.swt.widgets.Shell parentShell,
                             UIManager uiManager,
                             MarkerFormat initialMarkerFormat)
Constructor which requires an initial MarkerFormat to initialize the internally used MarkerItem.

Parameters:
parentShell - the parent shell of this MarkerFormatDialog
uiManager - the UIManager used for internationalization
initialMarkerFormat - the initial MarkerFormat
Method Detail

setTitle

public void setTitle(java.lang.String title)
Description copied from class: AbstractPreviewDialog
Sets the dialog title.

Overrides:
setTitle in class AbstractPreviewDialog
Parameters:
title - the dialog title
See Also:
http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg07566.html

configureShell

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

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

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener

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

getMarkerFormat

public final MarkerFormat getMarkerFormat()
Creates and pools a new MarkerFormat from the current MarkerItem

Returns:
the new MarkerFormat


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