com.tensegrity.gui.swing.document
Class SwingDocument

java.lang.Object
  extended bycom.tensegrity.gui.document.AbstractDocument
      extended bycom.tensegrity.gui.swing.document.SwingDocument
All Implemented Interfaces:
Container, Document, Observer
Direct Known Subclasses:
AttributeTableDocument, HyperTextDocument, LayoutToolDocument, NavigatorDocument, ObjectTreeDocument, RepositoryDocument, SwingGraphDocument

public class SwingDocument
extends AbstractDocument

This class represents a Swing-based Document.

Class SwingDocument holds a JPanel instance to ease the integration of documents in a Swing-based context. As an observer, this class delegates each update invocation to a call to the repaint method of the panel.

Version:
$Id: SwingDocument.java,v 1.10 2005/03/08 12:54:50 AndreasHensel Exp $
Author:
Stepan Rutz

Field Summary
 
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
 
Constructor Summary
SwingDocument(java.lang.String name)
          Constructor for HtmlDocument.
 
Method Summary
 ApplicationFrame getApplicationFrame()
          Returns the enclosing ApplicationFrame of this Container.
 javax.swing.JComponent getJComponent()
          Returns the reference to the internal panel.
 void update(Observable o, java.lang.Object arg)
          Triggers a repaint.
 
Methods inherited from class com.tensegrity.gui.document.AbstractDocument
closeHandler, getCopyCounter, getDocumentDataProvider, getDocumentSetting, getDocumentSettings, getFile, getFlags, getName, isModified, setDocumentSetting, setDocumentSettings, setFile, setModified, setName, setSelected, setUnmodified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingDocument

public SwingDocument(java.lang.String name)
Constructor for HtmlDocument.

Parameters:
name - the document's name.
Method Detail

getJComponent

public javax.swing.JComponent getJComponent()
Returns the reference to the internal panel.

Returns:
reference to the internal panel.

update

public void update(Observable o,
                   java.lang.Object arg)
Description copied from class: AbstractDocument
Triggers a repaint.

Specified by:
update in interface Observer
Specified by:
update in class AbstractDocument

getApplicationFrame

public ApplicationFrame getApplicationFrame()
Description copied from interface: Container
Returns the enclosing ApplicationFrame of this Container.

Returns:
the instance of the enclosing ApplicationFrame.


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