Java Doc for DiagramEditorApplet.java in  » Web-Framework » argun » biz » hammurapi » web » diagrameditor » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » argun » biz.hammurapi.web.diagrameditor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.JApplet
   biz.hammurapi.web.diagrameditor.DiagramEditorApplet

DiagramEditorApplet
public class DiagramEditorApplet extends JApplet (Code)
Diagram editor applet.


Field Summary
final public static  StringAPPTITLE
     Holds the application title for dialogs.
final public static  StringARG_JGOODIESLOOKANDFEEL
     Defines the look and feel argument name.
final public static  StringARG_SYSTEMLOOKANDFEEL
     Defines the look and feel argument name.
final public static  StringARG_VERSION
     Defines the look and feel argument name.
final public static  StringCREATE_ID
    
final public static  StringIS_NEW
    
final public static  StringKEY_EDGEPROTOTYPE
     Defines the key used to identify the edge prototype settings.
final public static  StringKEY_GROUPPROTOTYPE
     Defines the key used to identify the group prototype settings.
final public static  StringKEY_VERTEXPROTOTYPE
     Defines the key used to identify the vertex prototype settings.
final public static  StringMETHOD_CREATEGRADIENTCOMBO
     Defines the name of the createGradientCombo factory method.
final public static  StringMETHOD_CREATELINECOLORCOMBO
     Defines the name of the createGradientCombo factory method.
final public static  StringMETHOD_CREATESHAPECOMBO
     Defines the name of the createShapeCombo factory method.
final public static  StringNAME_CIRCLETOOL
     Defines the name for the circleTool.
final public static  StringNAME_CYLINDERTOOL
     Defines the name for the diamondTool.
final public static  StringNAME_DIAMONDTOOL
     Defines the name for the diamondTool.
final public static  StringNAME_EDGETOOL
     Defines the name for the edgeTool.
final public static  StringNAME_HEAVYTOOL
     Defines the name for the imageTool.
final public static  StringNAME_IMAGETOOL
     Defines the name for the imageTool.
final public static  StringNAME_ORTHOGONALEDGETOOL
     Defines the name for the orthogonalEdgeTool.
final public static  StringNAME_ROUNDEDTOOL
     Defines the name for the roundedTool.
final public static  StringNAME_SELECTTOOL
     Defines the name for the selectTool.
final public static  StringNAME_TEXTTOOL
     Defines the name for the textTool.
final public static  StringNAME_TRIANGLETOOL
     Defines the name for the triangleTool.
final public static  StringNAME_UICONFIG
     Defines the name for the ui XML document in the editor settings.
final public static  StringNAME_VERTEXTOOL
     Defines the name for the vertexTool.
final public static  StringPATH_DEFAULTSETTINGS
     Defines the path the the user settings file.
final public static  StringPATH_UICONFIG
     Defines the path to the UI config file.
final public static  StringVERSION
     Global static product identifier.
final public static  StringVERSION_NUMBER
     Global static product identifier.
public  ColordefaultBorderColor
     Defines the default border color.
public  Rectangle2DdefaultBounds
     Defines the default vertex bounds.
public  FontdefaultEdgeFont
     Defines the default edge font.
public  intdefaultEndDecorationdefaultBeginDecoration
     Defines the default end and begin decorations for edges.
public  String[]defaultPlugins
     The class names for the defaut plugins.
public  Point2D[]defaultPortLocations
     Defines the default port locations.

Constructor Summary
public  DiagramEditorApplet()
    

Method Summary
protected  voidaddActions(JGraphEditor editor, JGraphEditorKit kit)
     Adds the action bundles for JGraphpadEditAction , JGraphpadFileAction , JGraphpadViewAction , JGraphpadFormatAction and JGraphpadCellAction .
protected  voidaddPorts(MutableTreeNode parent, Point2D[] offsets)
     Adds ports to parent using offsets as the port relative offsets.
protected  voidaddTools(JGraphEditor editor, JGraphEditorKit kit)
     Adds the following tools to kit: DiagramEditorApplet.NAME_SELECTTOOL , DiagramEditorApplet.NAME_VERTEXTOOL , DiagramEditorApplet.NAME_ROUNDEDTOOL , DiagramEditorApplet.NAME_CIRCLETOOL , DiagramEditorApplet.NAME_DIAMONDTOOL , DiagramEditorApplet.NAME_TRIANGLETOOL , DiagramEditorApplet.NAME_IMAGETOOL , DiagramEditorApplet.NAME_HEAVYTOOL , DiagramEditorApplet.NAME_EDGETOOL and DiagramEditorApplet.NAME_ORTHOGONALEDGETOOL .
protected  voidconfigureEdge(GraphCell edge)
     Hook for subclassers to configure the specified edge.
protected  voidconfigureFactory(JGraphEditor editor, JGraphEditorFactory factory)
     Hook for subclassers to configure new editor factories.
protected  voidconfigureGraph(JGraphEditor editor, JGraph graph)
     Hook for subclassers to configure a new graph.
protected  voidconfigureKit(JGraphEditor editor, JGraphEditorKit kit)
     Boilerplate method for configuring new editor kits.
protected  voidconfigureModel(JGraphEditorModel model)
     Hook for subclassers to configure new document models.
public  voidconfigurePort(GraphCell port, Point2D offset)
     Hook for subclassers to configure the specified port using the offset as the relative location.
protected  voidconfigureVertex(GraphCell vertex)
     Hook for subclassers to configure the specified vertex.
protected  AttributeMapcreateAttributeMap()
     Hook for subclassers to construct attribute map for cells.
public  DefaultEdgecreateEdge()
     Hook for subclassers to construct edgges with default user objects.
public  DefaultEdgecreateEdge(Object userObj)
     Returns a new DefaultEdge containing the specified user object.
protected  JGraphpadEdgeToolcreateEdgeTool(String name, Object defaultValue, Edge.Routing routing)
     Helper method to create and return a new edge tool.
protected  ObjectcreateEdgeUserObject(Object value)
     Hook for subclassers to create a user object for edges that contains the specified value.
protected  JGraphEditorFactorycreateFactory(JGraphEditor editor)
     Constructs a default factory for new editors.
protected  JGraphcreateGraph(JGraphEditor editor, GraphLayoutCache graphLayoutCache)
     Hook for subclassers to provide a custom graph for the user interface. This method is invoked by the default custom factory returned by the createEditorFactory method.
public  GraphCellcreateGroup()
     Hook for subclassers to construct groups with default user objects.
public  GraphCellcreateGroup(Object userObj)
     Returns a new DefaultGraphCell containing the specified user object.
protected  voidcreatePlugins(JGraphEditor editor)
     Hook for subclassers to create plugins for a new editor.
public  GraphCellcreatePort(MutableTreeNode parent, Object userObject)
     Creates a port containing the specified user object and adds it to parent.
Parameters:
  userObject - The user object that the port should contain.
protected  ObjectcreatePortUserObject(Object value)
     Hook for subclassers to create a user object for ports that contains the specified value.
protected  JGraphEditorSettingscreateSettings(Map args)
     Constructs the editor settings.
public  GraphCellcreateVertex()
     Hook for subclassers to construct vertices with default user objects.
public  GraphCellcreateVertex(Object userObj)
     Returns a new DefaultGraphCell containing the specified user object.
protected  JGraphpadVertexToolcreateVertexTool(String name, Object defaultValue, int shape, ImageIcon icon)
     Invokes DiagramEditorApplet.createVertexTool(String,Object,int,ImageIcon,boolean) with post editing set to false.
protected  JGraphpadVertexToolcreateVertexTool(String name, Object defaultValue, int shape, ImageIcon icon, boolean postEdit)
     Helper method to create and return a new vertex tool.
protected  ObjectcreateVertexUserObject(Object value)
     Returns a new JGraphpadBusinessObject for the specified value. This implementation replaces all null values with an empty JGraphpadRichTextValue .
Parameters:
  value - The value that the user object should contain.
public  voiddestroy()
    
public  StringgetFileDescription()
    
public  StringgetFileName()
    
public static  booleanisImage(String filename)
     Returns true if the specified filename has an image extension, namely one in javax.imageio.ImageIO.getReaderFormatNames .
Parameters:
  filename - The filename to be checked.
public static  voidmain(String[] args)
     Constructs and displays a new application window.
public  voidsetFileDescription(String text)
    
public  voidsetFileName(String text)
    
public  voidstart()
    
public  voidstop()
    

Field Detail
APPTITLE
final public static String APPTITLE(Code)
Holds the application title for dialogs.



ARG_JGOODIESLOOKANDFEEL
final public static String ARG_JGOODIESLOOKANDFEEL(Code)
Defines the look and feel argument name.



ARG_SYSTEMLOOKANDFEEL
final public static String ARG_SYSTEMLOOKANDFEEL(Code)
Defines the look and feel argument name.



ARG_VERSION
final public static String ARG_VERSION(Code)
Defines the look and feel argument name.



CREATE_ID
final public static String CREATE_ID(Code)



IS_NEW
final public static String IS_NEW(Code)



KEY_EDGEPROTOTYPE
final public static String KEY_EDGEPROTOTYPE(Code)
Defines the key used to identify the edge prototype settings.



KEY_GROUPPROTOTYPE
final public static String KEY_GROUPPROTOTYPE(Code)
Defines the key used to identify the group prototype settings.



KEY_VERTEXPROTOTYPE
final public static String KEY_VERTEXPROTOTYPE(Code)
Defines the key used to identify the vertex prototype settings.



METHOD_CREATEGRADIENTCOMBO
final public static String METHOD_CREATEGRADIENTCOMBO(Code)
Defines the name of the createGradientCombo factory method.



METHOD_CREATELINECOLORCOMBO
final public static String METHOD_CREATELINECOLORCOMBO(Code)
Defines the name of the createGradientCombo factory method.



METHOD_CREATESHAPECOMBO
final public static String METHOD_CREATESHAPECOMBO(Code)
Defines the name of the createShapeCombo factory method.



NAME_CIRCLETOOL
final public static String NAME_CIRCLETOOL(Code)
Defines the name for the circleTool.



NAME_CYLINDERTOOL
final public static String NAME_CYLINDERTOOL(Code)
Defines the name for the diamondTool.



NAME_DIAMONDTOOL
final public static String NAME_DIAMONDTOOL(Code)
Defines the name for the diamondTool.



NAME_EDGETOOL
final public static String NAME_EDGETOOL(Code)
Defines the name for the edgeTool.



NAME_HEAVYTOOL
final public static String NAME_HEAVYTOOL(Code)
Defines the name for the imageTool.



NAME_IMAGETOOL
final public static String NAME_IMAGETOOL(Code)
Defines the name for the imageTool.



NAME_ORTHOGONALEDGETOOL
final public static String NAME_ORTHOGONALEDGETOOL(Code)
Defines the name for the orthogonalEdgeTool.



NAME_ROUNDEDTOOL
final public static String NAME_ROUNDEDTOOL(Code)
Defines the name for the roundedTool.



NAME_SELECTTOOL
final public static String NAME_SELECTTOOL(Code)
Defines the name for the selectTool.



NAME_TEXTTOOL
final public static String NAME_TEXTTOOL(Code)
Defines the name for the textTool.



NAME_TRIANGLETOOL
final public static String NAME_TRIANGLETOOL(Code)
Defines the name for the triangleTool.



NAME_UICONFIG
final public static String NAME_UICONFIG(Code)
Defines the name for the ui XML document in the editor settings.



NAME_VERTEXTOOL
final public static String NAME_VERTEXTOOL(Code)
Defines the name for the vertexTool.



PATH_DEFAULTSETTINGS
final public static String PATH_DEFAULTSETTINGS(Code)
Defines the path the the user settings file. This should also work with URLs (untested).



PATH_UICONFIG
final public static String PATH_UICONFIG(Code)
Defines the path to the UI config file.



VERSION
final public static String VERSION(Code)
Global static product identifier.



VERSION_NUMBER
final public static String VERSION_NUMBER(Code)
Global static product identifier.



defaultBorderColor
public Color defaultBorderColor(Code)
Defines the default border color.



defaultBounds
public Rectangle2D defaultBounds(Code)
Defines the default vertex bounds.



defaultEdgeFont
public Font defaultEdgeFont(Code)
Defines the default edge font.



defaultEndDecorationdefaultBeginDecoration
public int defaultEndDecorationdefaultBeginDecoration(Code)
Defines the default end and begin decorations for edges.



defaultPlugins
public String[] defaultPlugins(Code)
The class names for the defaut plugins.



defaultPortLocations
public Point2D[] defaultPortLocations(Code)
Defines the default port locations.




Constructor Detail
DiagramEditorApplet
public DiagramEditorApplet()(Code)




Method Detail
addActions
protected void addActions(JGraphEditor editor, JGraphEditorKit kit)(Code)
Adds the action bundles for JGraphpadEditAction , JGraphpadFileAction , JGraphpadViewAction , JGraphpadFormatAction and JGraphpadCellAction . Uses the createVertex and createEdge method to construct prototypes for JGraphpadCellAction.NAME_GROUP and JGraphpadCellAction.NAME_CONNECT . This method is called from configureEditorKit.
Parameters:
  editor - The editor for which to create the actions.
Parameters:
  kit - The editor kit to add the actions to.
See Also:   DiagramEditorApplet.configureKit(JGraphEditor,JGraphEditorKit)
See Also:   JGraphEditorKit.addBundle(JGraphEditorAction.Bundle)
See Also:   DiagramEditorApplet.createVertex()
See Also:   DiagramEditorApplet.createEdge()



addPorts
protected void addPorts(MutableTreeNode parent, Point2D[] offsets)(Code)
Adds ports to parent using offsets as the port relative offsets. The method uses DiagramEditorApplet.createPortUserObject(Object) , DiagramEditorApplet.createPort(MutableTreeNode,Object) and DiagramEditorApplet.configurePort(GraphCell,Point2D) to create the ports and their user objects, configure them and add them to the parent.
Parameters:
  parent - The parent to add the ports to.
Parameters:
  offsets - The points defining the port locations.



addTools
protected void addTools(JGraphEditor editor, JGraphEditorKit kit)(Code)
Adds the following tools to kit: DiagramEditorApplet.NAME_SELECTTOOL , DiagramEditorApplet.NAME_VERTEXTOOL , DiagramEditorApplet.NAME_ROUNDEDTOOL , DiagramEditorApplet.NAME_CIRCLETOOL , DiagramEditorApplet.NAME_DIAMONDTOOL , DiagramEditorApplet.NAME_TRIANGLETOOL , DiagramEditorApplet.NAME_IMAGETOOL , DiagramEditorApplet.NAME_HEAVYTOOL , DiagramEditorApplet.NAME_EDGETOOL and DiagramEditorApplet.NAME_ORTHOGONALEDGETOOL . This method is called from configureEditorKit.
Parameters:
  editor - The editor for which to create the tools.
Parameters:
  kit - The editor kit to add the tools to.
See Also:   DiagramEditorApplet.configureKit(JGraphEditor,JGraphEditorKit)
See Also:   JGraphEditorKit.addTool(JGraphEditorTool)
See Also:   DiagramEditorApplet.createVertexTool(String,Object,int,ImageIcon)
See Also:   DiagramEditorApplet.createEdgeTool(String,String,Edge.Routing)



configureEdge
protected void configureEdge(GraphCell edge)(Code)
Hook for subclassers to configure the specified edge. This implementation sets the DiagramEditorApplet.defaultEdgeFont , DiagramEditorApplet.defaultEndDecoration and DiagramEditorApplet.defaultBeginDecoration .
Parameters:
  edge - The edge to be configured.



configureFactory
protected void configureFactory(JGraphEditor editor, JGraphEditorFactory factory)(Code)
Hook for subclassers to configure new editor factories. This implementation adds various following factory methods.
Parameters:
  editor - The editor to create the factory methods for.
Parameters:
  factory - The factory to be configured.



configureGraph
protected void configureGraph(JGraphEditor editor, JGraph graph)(Code)
Hook for subclassers to configure a new graph. This implementation adds a JGraphpadTransferHandler and JGraphpadMarqueeHandler to the instance. (Note: DiagramEditorApplet.createVertex() is used to create the prototype cell for the transfer handler.)
Parameters:
  graph - The graph to be configured



configureKit
protected void configureKit(JGraphEditor editor, JGraphEditorKit kit)(Code)
Boilerplate method for configuring new editor kits. This implementation calls DiagramEditorApplet.addActions(JGraphEditor,JGraphEditorKit) , DiagramEditorApplet.addTools(JGraphEditor,JGraphEditorKit) and registers the kit with the listeners required to update the state. This method is called from DiagramEditorApplet.createKit(JGraphEditor) .
Parameters:
  editor - The editor for which to configure the editor kit.
Parameters:
  kit - The new editor kit to be configured.



configureModel
protected void configureModel(JGraphEditorModel model)(Code)
Hook for subclassers to configure new document models. This implementation adds persistence delegates for the following classes: JGraphpadDiagram , JGraphpadGraphModel , com.jgraph.graph.ConnectionSet, JGraphpadGraphLayoutCache , com.jgraph.graph.DefaultGraphCell, com.jgraph.graph.DefaultEdge, com.jgraph.graph.DefaultPort, JGraphpadBusinessObject , JGraphpadRichTextValue and JGraphpadShadowBorder .
JGraphpadDiagram
Constructs a persistence delegate for the diagram class. This uses the fact that all information is stored in the model, not the layout cache by ignoring the layout cache and accessing the model stored in the layout cache directly through the model bean property. Note: To allow this kind of encoding the diagram class offers a special constructor that takes a model and constructs a new graph layout cache for it.
JGraphpadGraphModel
To encode graph models we do not want the files to contain redundant connectivity information in the ports.edges and edges.source and target fields, so we add a method to the graph model that returns a connection set which describes the connections without redundancy. (Note: In the static initializer of this class we make sure that the edges, source and target of the respective classes or not encoded.)
ConnectionSet
The complete information of a connection set is stored in the actual connections, thus we only store the connections and use special constructor to restore the state of the complete object when de- coding. (Note: For connection sets this will update the edges field.)
JGraphpadGraphLayoutCache
The graph layout cache is encoded by encoding the various member fields, using a special constructor to restore the state of the layout cache upon decoding. Note that this is currently not used.
DefaultGraphCell, DefaultEdge, DefaultPort
Makes sure the cells are only encoded along with their user objects, the attributes, connections and tree-structure is stored in other objects and does not need to be encoded here.
JGraphpadBusinessObject, JGraphpadRichTextData
Allows to encode custom business objects used in JGraphpad. Since this object implements the bean interface we do only require a default persistence delegates with no special constructor calls to decode the object. Same holds for the rich text data object, which is a special value that can hold text formatting information.
JGraphShadowBorder
Since the shadow border is a singleton we must tell the decoder which method to use in order to find the shared instance of the class.
Parameters:
  model - The document model to be configured.



configurePort
public void configurePort(GraphCell port, Point2D offset)(Code)
Hook for subclassers to configure the specified port using the offset as the relative location.
Parameters:
  port - The port to be configured.
Parameters:
  offset - The relative offset of the port.



configureVertex
protected void configureVertex(GraphCell vertex)(Code)
Hook for subclassers to configure the specified vertex. This implementation sets the DiagramEditorApplet.defaultBorderColor and adds ports if the vertex implements the MutableTreeNode interface.
Parameters:
  vertex - The vertex to be configured.
See Also:   DiagramEditorApplet.addPorts(MutableTreeNode,Point2D[])



createAttributeMap
protected AttributeMap createAttributeMap()(Code)
Hook for subclassers to construct attribute map for cells. This implementation returns a new instance of AttributeMap . Returns a new attribute map.



createEdge
public DefaultEdge createEdge()(Code)
Hook for subclassers to construct edgges with default user objects. This implementation invokes DiagramEditorApplet.createEdgeUserObject(Object) and passes the return value to DiagramEditorApplet.createEdge(Object) . Returns a new edge with a default user object.



createEdge
public DefaultEdge createEdge(Object userObj)(Code)
Returns a new DefaultEdge containing the specified user object. This implementation uses DiagramEditorApplet.createAttributeMap() to create the map that holds the attributes for the new edge and DiagramEditorApplet.configureEdge(GraphCell) to configure the edge.
Parameters:
  userObj - The user object that the edge should contain. Returns a new edge.



createEdgeTool
protected JGraphpadEdgeTool createEdgeTool(String name, Object defaultValue, Edge.Routing routing)(Code)
Helper method to create and return a new edge tool. This passes the return value of createEdgeUserObject to createEdge to create the graph cell. The method sets the routing on the created graph cell if it is not null, and returns a new JGraphpadEdgeTool with the specified name.
Parameters:
  name - The name of the tool to be created.
Parameters:
  defaultValue - The defaultValue for the edges that this tool creates.
Parameters:
  routing - The routing for the edges that this tool creates. Returns a new edge tool.
See Also:   DiagramEditorApplet.createEdgeUserObject(Object)
See Also:   DiagramEditorApplet.createEdge(Object)
See Also:   GraphConstants.setRouting(MapEdge.Routing)
See Also:   JGraphpadEdgeTool



createEdgeUserObject
protected Object createEdgeUserObject(Object value)(Code)
Hook for subclassers to create a user object for edges that contains the specified value. This implementation calls DiagramEditorApplet.createVertexUserObject(Object) .
Parameters:
  value - The value that the user object should contain. Returns a new user object containing value.



createFactory
protected JGraphEditorFactory createFactory(JGraphEditor editor)(Code)
Constructs a default factory for new editors. This implementation constructs a new instance of JGraphEditorFactory and overrides JGraphEditorFactory.createGraph(GraphLayoutCache) to call DiagramEditorApplet.createGraph(JGraphEditor,GraphLayoutCache) and configures the factory using DiagramEditorApplet.configureFactory(JGraphEditor,JGraphEditorFactory) .
Parameters:
  editor - The editor for which to create an editor factory. Returns a configured editor factory for the specified editor.



createGraph
protected JGraph createGraph(JGraphEditor editor, GraphLayoutCache graphLayoutCache)(Code)
Hook for subclassers to provide a custom graph for the user interface. This method is invoked by the default custom factory returned by the createEditorFactory method. It invokes DiagramEditorApplet.configureGraph(JGraphEditor,JGraph) to configure the new graph instance.
See Also:   DiagramEditorApplet.createFactory(JGraphEditor)



createGroup
public GraphCell createGroup()(Code)
Hook for subclassers to construct groups with default user objects. This implementation invokes DiagramEditorApplet.createVertexUserObject(Object) and passes the return value to DiagramEditorApplet.createGroup(Object) . Returns a new group with a default user object.



createGroup
public GraphCell createGroup(Object userObj)(Code)
Returns a new DefaultGraphCell containing the specified user object. This implementation uses DiagramEditorApplet.createAttributeMap() to create the map that holds the attributes for the new vertex, and DiagramEditorApplet.configureVertex(GraphCell) to configure the vertex.
Parameters:
  userObj - The user object that the group should contain. Returns a new group.



createPlugins
protected void createPlugins(JGraphEditor editor)(Code)
Hook for subclassers to create plugins for a new editor. This implementation creates the DiagramEditorApplet.defaultPlugins . This method is called from DiagramEditorApplet.configureEditor(JGraphEditor,Map) .
Parameters:
  editor - The editor for which to create the plugins.



createPort
public GraphCell createPort(MutableTreeNode parent, Object userObject)(Code)
Creates a port containing the specified user object and adds it to parent.
Parameters:
  userObject - The user object that the port should contain. Returns a new port.



createPortUserObject
protected Object createPortUserObject(Object value)(Code)
Hook for subclassers to create a user object for ports that contains the specified value. This implementation calls DiagramEditorApplet.createVertexUserObject(Object) .
Parameters:
  value - The value that the user object should contain. Returns a new user object containing value.



createSettings
protected JGraphEditorSettings createSettings(Map args)(Code)
Constructs the editor settings. This implementation constructs a new instance of JGraphEditorSettings using args as the initial object map and passes it to the DiagramEditorApplet.configureSettings(JGraphEditorSettings) method.
Parameters:
  args - The arguments passed to the command line. Returns a configured editor settings object.



createVertex
public GraphCell createVertex()(Code)
Hook for subclassers to construct vertices with default user objects. This implementation invokes DiagramEditorApplet.createVertexUserObject(Object) and passes the return value to DiagramEditorApplet.createVertex(Object) . Returns a new vertex with a default user object.



createVertex
public GraphCell createVertex(Object userObj)(Code)
Returns a new DefaultGraphCell containing the specified user object. This implementation uses DiagramEditorApplet.createAttributeMap() to create the map that holds the attributes for the new vertex, and DiagramEditorApplet.configureVertex(GraphCell) to configure the vertex.
Parameters:
  userObj - The user object that the vertex should contain. Returns a new vertex.



createVertexTool
protected JGraphpadVertexTool createVertexTool(String name, Object defaultValue, int shape, ImageIcon icon)(Code)
Invokes DiagramEditorApplet.createVertexTool(String,Object,int,ImageIcon,boolean) with post editing set to false.



createVertexTool
protected JGraphpadVertexTool createVertexTool(String name, Object defaultValue, int shape, ImageIcon icon, boolean postEdit)(Code)
Helper method to create and return a new vertex tool. This uses the createVertexUserObject or creates a new JGraphpadRichTextValue object based on isRichText as the user object, which it passes to createVertex to create the graph cell. The method sets the shape on the created graph cell, and returns a new JGraphpadVertexTool with the specified name.
Parameters:
  name - The name of the tool to be created.
Parameters:
  defaultValue - The defaultValue for the vertices that this tool creates.
Parameters:
  shape - The shape for the vertices that this tool creates. Use -1 forno border.
Parameters:
  icon - The icon for the vertices that this tool creates.
Parameters:
  postEdit - If in-place editing should be triggered after inserting thecell. Returns a new vertex tool.
See Also:   JGraphpadRichTextValue
See Also:   DiagramEditorApplet.createVertexUserObject(Object)
See Also:   DiagramEditorApplet.createVertex(Object)
See Also:   JGraphpadGraphConstants.setVertexShape(Mapint)
See Also:   JGraphpadVertexTool



createVertexUserObject
protected Object createVertexUserObject(Object value)(Code)
Returns a new JGraphpadBusinessObject for the specified value. This implementation replaces all null values with an empty JGraphpadRichTextValue .
Parameters:
  value - The value that the user object should contain. Returns a new user object containing value.
See Also:   JGraphpadBusinessObject



destroy
public void destroy()(Code)



getFileDescription
public String getFileDescription()(Code)



getFileName
public String getFileName()(Code)



isImage
public static boolean isImage(String filename)(Code)
Returns true if the specified filename has an image extension, namely one in javax.imageio.ImageIO.getReaderFormatNames .
Parameters:
  filename - The filename to be checked. Returns true if the filename is an image file.



main
public static void main(String[] args) throws Exception(Code)
Constructs and displays a new application window.



setFileDescription
public void setFileDescription(String text)(Code)



setFileName
public void setFileName(String text)(Code)



start
public void start()(Code)



stop
public void stop()(Code)



Fields inherited from javax.swing.JApplet
protected AccessibleContext accessibleContext(Code)(Java Doc)
protected JRootPane rootPane(Code)(Java Doc)
protected boolean rootPaneCheckingEnabled(Code)(Java Doc)

Methods inherited from javax.swing.JApplet
protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc)
protected JRootPane createRootPane()(Code)(Java Doc)
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public Container getContentPane()(Code)(Java Doc)
public Component getGlassPane()(Code)(Java Doc)
public Graphics getGraphics()(Code)(Java Doc)
public JMenuBar getJMenuBar()(Code)(Java Doc)
public JLayeredPane getLayeredPane()(Code)(Java Doc)
public JRootPane getRootPane()(Code)(Java Doc)
public TransferHandler getTransferHandler()(Code)(Java Doc)
protected boolean isRootPaneCheckingEnabled()(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
public void remove(Component comp)(Code)(Java Doc)
public void repaint(long time, int x, int y, int width, int height)(Code)(Java Doc)
public void setContentPane(Container contentPane)(Code)(Java Doc)
public void setGlassPane(Component glassPane)(Code)(Java Doc)
public void setJMenuBar(JMenuBar menuBar)(Code)(Java Doc)
public void setLayeredPane(JLayeredPane layeredPane)(Code)(Java Doc)
public void setLayout(LayoutManager manager)(Code)(Java Doc)
protected void setRootPane(JRootPane root)(Code)(Java Doc)
protected void setRootPaneCheckingEnabled(boolean enabled)(Code)(Java Doc)
public void setTransferHandler(TransferHandler newHandler)(Code)(Java Doc)
public void update(Graphics g)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.