com.tensegrity.gui.swt.dialog.graphfilechooser
Class SwtExportSettingsPanel

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended bycom.tensegrity.gui.swt.dialog.graphfilechooser.SwtExportSettingsPanel
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable, ExportSettings

public class SwtExportSettingsPanel
extends org.eclipse.swt.widgets.Composite
implements ExportSettings

A panel that provides controls to set the different export-options for the different export types like jpg, bitmap and png.

Version:
$Id: SwtExportSettingsPanel.java,v 1.9 2006/03/06 12:10:08 BurkhardWick Exp $
Author:
S�bastien Guyon

Nested Class Summary
 class SwtExportSettingsPanel.PanelStateListener
           Simple abstract class that should be extended by classes intended to react upon the state (valid or unvalid) of this SwtExportSettingsPanel.
 
Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
SwtExportSettingsPanel(org.eclipse.swt.widgets.Composite parent, int style, UIManager uiManager, int type, int preferredWidth, int preferredHeight)
           Constructor.
 
Method Summary
 boolean forceBaseLine()
          Returns true, if the pixels shall be arranged from the left-top to the right-bottom corner of the picture.
 int getBitDepth()
          Returns the desired bit-depth.
 int getHorizontalAlignment()
          Returns the horizontal alignment as listed in com.tensegrity.graph.view.image.ImageExport
 Boundary getImageInsets()
          Returns the insets for the image
 Size getImageSize()
          Returns the size of the image.
 int getMode()
          Returns the export mode as listed in com.tensegrity.graph.view.image.ImageExport
 float getQuality()
          Returns a quality indicating float, where 1.0 stands for highest and 0.0 for lowest quality.
 int getType()
          Returns the type.
 int getVerticalAlignment()
          Returns the vertical alignment as listed in com.tensegrity.graph.view.image.ImageExport
 boolean isAntialias()
          Returns true if the antialias is turned on
 boolean isForceImageSize()
           
 boolean isInterlaceEnabled()
          Returns true, if interlace is enabled.
 boolean isOptimized()
          Returns true, if the generic optimization flag for this format is turned on.
 void registerPanelStateListener(SwtExportSettingsPanel.PanelStateListener listener)
           Registers a PanelStateListener
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwtExportSettingsPanel

public SwtExportSettingsPanel(org.eclipse.swt.widgets.Composite parent,
                              int style,
                              UIManager uiManager,
                              int type,
                              int preferredWidth,
                              int preferredHeight)

Constructor. Initializes the panel depending on type.

Parameters:
parent - a widget which will be the parent of the new instance (cannot be null)
style - the style of widget to construct
uiManager - a UIManager for localized strings
type - one of GraphFileConstants.TYPE_ constants.
preferredWidth - preferred width of the image to render.
preferredHeight - preferred height of the image to render.
Method Detail

registerPanelStateListener

public void registerPanelStateListener(SwtExportSettingsPanel.PanelStateListener listener)

Registers a PanelStateListener

Parameters:
listener - the PanelStateListener to register.

getQuality

public float getQuality()
Description copied from interface: ExportSettings
Returns a quality indicating float, where 1.0 stands for highest and 0.0 for lowest quality.

Specified by:
getQuality in interface ExportSettings
Returns:
a quality indicating float.
See Also:
ExportSettings.getQuality()

forceBaseLine

public boolean forceBaseLine()
Description copied from interface: ExportSettings
Returns true, if the pixels shall be arranged from the left-top to the right-bottom corner of the picture.

Specified by:
forceBaseLine in interface ExportSettings
Returns:
true if baseline encoding is enforced.
See Also:
ExportSettings.forceBaseLine()

getBitDepth

public int getBitDepth()
Description copied from interface: ExportSettings
Returns the desired bit-depth.

Specified by:
getBitDepth in interface ExportSettings
Returns:
the desired bit-depth.
See Also:
ExportSettings.getBitDepth()

isInterlaceEnabled

public boolean isInterlaceEnabled()
Description copied from interface: ExportSettings
Returns true, if interlace is enabled.

Specified by:
isInterlaceEnabled in interface ExportSettings
Returns:
true, if interlace is enabled.
See Also:
ExportSettings.isInterlaceEnabled()

isOptimized

public boolean isOptimized()
Description copied from interface: ExportSettings
Returns true, if the generic optimization flag for this format is turned on.

Specified by:
isOptimized in interface ExportSettings
Returns:
true, if the generic optimization flag for this format is turned on.
See Also:
ExportSettings.isOptimized()

getImageSize

public Size getImageSize()
Description copied from interface: ExportSettings
Returns the size of the image.

Specified by:
getImageSize in interface ExportSettings
Returns:
the size of the image.
See Also:
ExportSettings.getImageSize()

getType

public int getType()
Returns the type.

Returns:
the type of the panel.

getMode

public int getMode()
Description copied from interface: ExportSettings
Returns the export mode as listed in com.tensegrity.graph.view.image.ImageExport

Specified by:
getMode in interface ExportSettings
Returns:
the export mode

getHorizontalAlignment

public int getHorizontalAlignment()
Description copied from interface: ExportSettings
Returns the horizontal alignment as listed in com.tensegrity.graph.view.image.ImageExport

Specified by:
getHorizontalAlignment in interface ExportSettings
Returns:
the horizontal alignment

getVerticalAlignment

public int getVerticalAlignment()
Description copied from interface: ExportSettings
Returns the vertical alignment as listed in com.tensegrity.graph.view.image.ImageExport

Specified by:
getVerticalAlignment in interface ExportSettings
Returns:
the vertical alignment

isAntialias

public boolean isAntialias()
Description copied from interface: ExportSettings
Returns true if the antialias is turned on

Specified by:
isAntialias in interface ExportSettings
Returns:
true if the antialias is turned on

isForceImageSize

public boolean isForceImageSize()

getImageInsets

public Boundary getImageInsets()
Description copied from interface: ExportSettings
Returns the insets for the image

Specified by:
getImageInsets in interface ExportSettings
Returns:
the insets for the image


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