com.tensegrity.gui.graphdocument
Interface GraphDocument

All Superinterfaces:
Container, Document, Observer
All Known Implementing Classes:
SwingGraphDocument, SwtGraphDocument

public interface GraphDocument
extends Document

Interface GraphDocument represents the document type for a persisted Graph which, together with its views, can be queried from its parent GraphPanel. This latter component handles all of the internal Graph logic.

Because the encapsulation of a GraphDocument takes place on a lower level, this interface represents a bridge between the document MDI framework and a GraphPanel.

Class Diagram Document

This interface defines methods to work with a PageFormat. Such a format is required to print a graph document. If no CustomPageFormat is set, the default page format com.tensegrity.gui.swing.print.PrintUtil#DEFAULT_PAGEFORMAT will be used.

Version:
$Id: GraphDocument.java,v 1.38 2005/12/14 10:13:05 BurkhardWick Exp $
Author:
MichaelKegel, Stepan Rutz, Gilles Iachelini, BurkhardWick
See Also:
GraphPanel, Document

Field Summary
static java.lang.String SETTING_ADJUSTVIEWAFTEROPEN
          Setting to enable/disable the automatic view adjustment after opening a Graph Document file
static java.lang.String SETTING_ANTIALIAS
          Constant for the setting defining if the antialias should be turned on when drawing the graph
static java.lang.String SETTING_COMPRESSIMAGES
          Constant for the setting defining if the images should be compressed
static java.lang.String SETTING_COMPRESSION
          Setting to determine the compression to use when saving
static java.lang.String SETTING_DRAWINGORDER
          Constant for the setting of the drawing order
static java.lang.String SETTING_SAVEGEOMETRYDEFS
          Constant for the setting defining if the geometry definitions should be saved within the document
static java.lang.String SETTING_SAVEGEOMETRYDEFSFILTER
          Constant for the setting defining which of the geometry definitions should be saved within the document
static java.lang.String SETTING_SAVEIMAGES
          Constant for the setting defining if the images should be saved within the document
static java.lang.String SETTING_SAVELAYOUT
          Constant for the setting defining if the layout configuration should be saved within the document
static java.lang.String SETTING_SAVELAYOUTDEFSFILTER
          Constant for the setting defining which of the layout definitions should be saved within the document
static java.lang.String SETTING_SAVEPREVIEW
          Constant for the setting defining if the a preview image should be saved within the document
static java.lang.String SETTING_SAVERULEDEFS
          Constant for the setting defining if the rule definitions should be saved within the document
static java.lang.String SETTING_SAVERULEDEFSFILTER
          Constant for the setting defining which of the rule definitions should be saved within the document
static java.lang.String SETTING_SAVESTYLEDEFS
          Constant for the setting defining if the style definitions should be saved within the document
static java.lang.String SETTING_SAVESTYLEDEFSFILTER
          Constant for the setting defining which of the style definitions should be saved within the document
static java.lang.String SETTING_SETDIRTYONVIEWCHANGES
          Constant for the setting defining if changes of the view should set mark the document as dirty
static java.lang.String SETTING_USEXMLENTITIES
          Setting to enable/disable the usage of XML entities when writing to an XML file to shrink the file size
static java.lang.String SETTING_WARNWHENLOSINGINFOS_IMAGES
          Warning option for missing image definitions in a file that is about to be saved
static java.lang.String SETTING_WARNWHENLOSINGINFOS_LAYOUT
          Warning option for missing layout definitions in a file that is about to be saved
static java.lang.String SETTING_WARNWHENLOSINGINFOS_RULES
          Warning option for missing rule definitions in a file that is about to be saved
static java.lang.String SETTINGVALUE_COMPRESSION_GZIP
          Value for the compression setting, meaning GZip compression
static java.lang.String SETTINGVALUE_COMPRESSION_NONE
          Value for the compression setting, meaning no compression
static java.lang.String SETTINGVALUE_FILTER_ALL
          Value for filter setting: Save all elements
static java.lang.String SETTINGVALUE_FILTER_USED
          Value for filter setting: Save used elements
static java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_CHANGED
          Setting for the warning option: Warn if changed definitions are not saved
static java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_NEVER
          Setting for the warning option: Never warn
static java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_USED
          Setting for the warning option: Warn if used definitions are not saved
static java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_USEDORCHANGED
          Setting for the warning option: Warn if used or modified definitions are not saved
static java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_USINGCHANGED
          Setting for the warning option: Warn if used and modified definitions are not saved
 
Fields inherited from interface com.tensegrity.gui.document.Document
GLUE_LEFTBOTTOM, GLUE_LEFTCENTEREXTEND, GLUE_LEFTTOP, GLUE_RIGHTBOTTOM, GLUE_RIGHTCENTEREXTEND, GLUE_RIGHTTOP, TYPE_FIXED_SIZE, TYPE_PACK_IS_OK, TYPE_TOOLDOCUMENT
 
Method Summary
 GraphPanel getGraphPanel()
          Returns the reference to the internally embedded GraphPanel instance.
 BasePageFormat getPageFormat()
          Returns the this documents PageFormat instance.
 ViewBuilderFilter getViewBuilderFilter()
          Returns the active ViewBuilderFilter of this GraphDocument instance.
 ViewSerializerFilter getViewSerializerFilter()
          Returns the active ViewSerializerFilter of this GraphDocument instance.
 void registerViewBuilderFilter(ViewBuilderFilter filterBuildView)
          Registers a ViewBuilderFilter for later use in this GraphDocument.
 void registerViewSerializerFilter(ViewSerializerFilter filterSerializeView)
          Registers a ViewSerializerFilter for later use in this GraphDocument.
 void setPageFormat(BasePageFormat format)
          Sets a PageFormat for this document.
 void setVisualGraphView(VisualGraphView visualgraphview, GraphController graphcontroller)
          Sets the VisualGraphView to be shown in the this GraphDocument.
 
Methods inherited from interface com.tensegrity.gui.document.Document
closeHandler, getCopyCounter, getDocumentDataProvider, getDocumentSetting, getDocumentSettings, getFile, getFlags, isModified, setDocumentSetting, setDocumentSettings, setFile, setModified, setUnmodified
 
Methods inherited from interface com.tensegrity.generic.util.Observer
update
 
Methods inherited from interface com.tensegrity.gui.container.Container
getApplicationFrame, getName, setName, setSelected
 

Field Detail

SETTING_COMPRESSION

public static final java.lang.String SETTING_COMPRESSION
Setting to determine the compression to use when saving

See Also:
Constant Field Values

SETTING_ADJUSTVIEWAFTEROPEN

public static final java.lang.String SETTING_ADJUSTVIEWAFTEROPEN
Setting to enable/disable the automatic view adjustment after opening a Graph Document file

See Also:
Constant Field Values

SETTING_USEXMLENTITIES

public static final java.lang.String SETTING_USEXMLENTITIES
Setting to enable/disable the usage of XML entities when writing to an XML file to shrink the file size

See Also:
Constant Field Values

SETTING_SAVEPREVIEW

public static final java.lang.String SETTING_SAVEPREVIEW
Constant for the setting defining if the a preview image should be saved within the document

See Also:
Constant Field Values

SETTING_SAVEGEOMETRYDEFS

public static final java.lang.String SETTING_SAVEGEOMETRYDEFS
Constant for the setting defining if the geometry definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVEGEOMETRYDEFSFILTER

public static final java.lang.String SETTING_SAVEGEOMETRYDEFSFILTER
Constant for the setting defining which of the geometry definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVESTYLEDEFS

public static final java.lang.String SETTING_SAVESTYLEDEFS
Constant for the setting defining if the style definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVESTYLEDEFSFILTER

public static final java.lang.String SETTING_SAVESTYLEDEFSFILTER
Constant for the setting defining which of the style definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVERULEDEFS

public static final java.lang.String SETTING_SAVERULEDEFS
Constant for the setting defining if the rule definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVERULEDEFSFILTER

public static final java.lang.String SETTING_SAVERULEDEFSFILTER
Constant for the setting defining which of the rule definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVELAYOUT

public static final java.lang.String SETTING_SAVELAYOUT
Constant for the setting defining if the layout configuration should be saved within the document

See Also:
Constant Field Values

SETTING_SAVELAYOUTDEFSFILTER

public static final java.lang.String SETTING_SAVELAYOUTDEFSFILTER
Constant for the setting defining which of the layout definitions should be saved within the document

See Also:
Constant Field Values

SETTING_SAVEIMAGES

public static final java.lang.String SETTING_SAVEIMAGES
Constant for the setting defining if the images should be saved within the document

See Also:
Constant Field Values

SETTING_COMPRESSIMAGES

public static final java.lang.String SETTING_COMPRESSIMAGES
Constant for the setting defining if the images should be compressed

See Also:
Constant Field Values

SETTING_SETDIRTYONVIEWCHANGES

public static final java.lang.String SETTING_SETDIRTYONVIEWCHANGES
Constant for the setting defining if changes of the view should set mark the document as dirty

See Also:
Constant Field Values

SETTING_ANTIALIAS

public static final java.lang.String SETTING_ANTIALIAS
Constant for the setting defining if the antialias should be turned on when drawing the graph

See Also:
Constant Field Values

SETTING_DRAWINGORDER

public static final java.lang.String SETTING_DRAWINGORDER
Constant for the setting of the drawing order

See Also:
Constant Field Values

SETTINGVALUE_FILTER_ALL

public static final java.lang.String SETTINGVALUE_FILTER_ALL
Value for filter setting: Save all elements

See Also:
Constant Field Values

SETTINGVALUE_FILTER_USED

public static final java.lang.String SETTINGVALUE_FILTER_USED
Value for filter setting: Save used elements

See Also:
Constant Field Values

SETTING_WARNWHENLOSINGINFOS_LAYOUT

public static final java.lang.String SETTING_WARNWHENLOSINGINFOS_LAYOUT
Warning option for missing layout definitions in a file that is about to be saved

See Also:
Constant Field Values

SETTING_WARNWHENLOSINGINFOS_RULES

public static final java.lang.String SETTING_WARNWHENLOSINGINFOS_RULES
Warning option for missing rule definitions in a file that is about to be saved

See Also:
Constant Field Values

SETTING_WARNWHENLOSINGINFOS_IMAGES

public static final java.lang.String SETTING_WARNWHENLOSINGINFOS_IMAGES
Warning option for missing image definitions in a file that is about to be saved

See Also:
Constant Field Values

SETTINGVALUE_WARNWHENLOSINGINFOS_NEVER

public static final java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_NEVER
Setting for the warning option: Never warn

See Also:
Constant Field Values

SETTINGVALUE_WARNWHENLOSINGINFOS_USED

public static final java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_USED
Setting for the warning option: Warn if used definitions are not saved

See Also:
Constant Field Values

SETTINGVALUE_WARNWHENLOSINGINFOS_CHANGED

public static final java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_CHANGED
Setting for the warning option: Warn if changed definitions are not saved

See Also:
Constant Field Values

SETTINGVALUE_WARNWHENLOSINGINFOS_USINGCHANGED

public static final java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_USINGCHANGED
Setting for the warning option: Warn if used and modified definitions are not saved

See Also:
Constant Field Values

SETTINGVALUE_WARNWHENLOSINGINFOS_USEDORCHANGED

public static final java.lang.String SETTINGVALUE_WARNWHENLOSINGINFOS_USEDORCHANGED
Setting for the warning option: Warn if used or modified definitions are not saved

See Also:
Constant Field Values

SETTINGVALUE_COMPRESSION_NONE

public static final java.lang.String SETTINGVALUE_COMPRESSION_NONE
Value for the compression setting, meaning no compression

See Also:
Constant Field Values

SETTINGVALUE_COMPRESSION_GZIP

public static final java.lang.String SETTINGVALUE_COMPRESSION_GZIP
Value for the compression setting, meaning GZip compression

See Also:
Constant Field Values
Method Detail

getGraphPanel

public GraphPanel getGraphPanel()
Returns the reference to the internally embedded GraphPanel instance.

Returns:
the underlying GraphPanel instance.

Find more information in the class documentation


setVisualGraphView

public void setVisualGraphView(VisualGraphView visualgraphview,
                               GraphController graphcontroller)
Sets the VisualGraphView to be shown in the this GraphDocument.

Parameters:
visualgraphview - the VisualGraphView to show in this GraphDocument.
graphcontroller - the GraphController to use in this GraphDocument.

Find more information in the class documentation


registerViewSerializerFilter

public void registerViewSerializerFilter(ViewSerializerFilter filterSerializeView)
Registers a ViewSerializerFilter for later use in this GraphDocument.

Parameters:
filterSerializeView - ViewSerializerFilter for later use in this GraphDocument

getViewSerializerFilter

public ViewSerializerFilter getViewSerializerFilter()
Returns the active ViewSerializerFilter of this GraphDocument instance.

Returns:
the active ViewSerializerFilter of this GraphDocument instance.

registerViewBuilderFilter

public void registerViewBuilderFilter(ViewBuilderFilter filterBuildView)
Registers a ViewBuilderFilter for later use in this GraphDocument.

Parameters:
filterBuildView - ViewBuilderFilter for later use in this GraphDocument

getViewBuilderFilter

public ViewBuilderFilter getViewBuilderFilter()
Returns the active ViewBuilderFilter of this GraphDocument instance.

Returns:
the active ViewBuilderFilter of this GraphDocument instance.

getPageFormat

public BasePageFormat getPageFormat()
Returns the this documents PageFormat instance. Providing such a Format instance is optional. If this method returns null a default format is used instead.

Returns:
either an instance of CustomPageFormat or null if a default format is used.
See Also:
CustomPageFormat, PrintUtil.getPageFormat(String, int)

Find more information in the class documentation


setPageFormat

public void setPageFormat(BasePageFormat format)
Sets a PageFormat for this document. If no such Format will be set, the default format will be used.

Parameters:
format - an instance of class BasePageFormat.

Find more information in the class documentation



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