Java Doc for JGraphEditorFactory.java in  » Graphic-Library » jgraphpad » com » jgraph » editor » 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 » Graphic Library » jgraphpad » com.jgraph.editor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jgraph.editor.JGraphEditorFactory

JGraphEditorFactory
public class JGraphEditorFactory (Code)
Class that creates the UI elements of a JGraph editor. It uses the actions and tools from the JGraphEditorFactory.kit to create menu bars, toolbars, toolboxes and popup menus.

Inner Class :protected class ActionChangedListener implements PropertyChangeListener

Field Summary
final protected static  intITEMTYPE_MENUBAR
     Constant for menubar creation.
final protected static  intITEMTYPE_TOOLBAR
     Constant for toolbar creation.
final public static  StringNODENAME_GROUP
     Defines the nodename for groups.
final public static  StringNODENAME_ITEM
     Defines the nodename for items.
final public static  StringNODENAME_MENU
     Defines the nodename for menus.
final public static  StringNODENAME_SEPARATOR
     Defines the nodename for separators.
final protected static  ComponentSEPARATOR
     Shared separator instance.
final public static  StringSUFFIX_ACTION
     Defines the suffix for actionname resources.
final public static  StringSUFFIX_ICON
     Defines the suffix for icon resources, eg.
final public static  StringSUFFIX_LABEL
     Defines the suffix for label resources, eg.
final public static  StringSUFFIX_MNEMONIC
     Defines the suffix for mnemonic resources, eg.
final public static  StringSUFFIX_SHORTCUT
     Defines the suffix for shortcut resources, eg.
final public static  StringSUFFIX_TOOL
     Defines the suffix for toolname resources.
final public static  StringSUFFIX_TOOLTIP
     Defines the suffix for tooltip resources, eg.
protected  MapfactoryMethods
    
protected  JGraphEditorKitkit
     References the editor kit.

Constructor Summary
public  JGraphEditorFactory()
     Constructs an empty factory.
public  JGraphEditorFactory(JGraphEditorKit kit)
     Constructs a factory for the specified kit.

Method Summary
public  ObjectaddMethod(JGraphEditorFactoryMethod method)
     Adds the specified factory method.
Parameters:
  method - The factory method to add.
protected  voidconfigureAbstractButton(AbstractButton button, String name)
     Hook for subclassers to configure a toolbox button for tool.
public  voidconfigureActionItem(AbstractButton button, JGraphEditorAction action)
     Hook for subclassers to configure an action item for action.
protected  voidconfigureMenuBar(Container menu, Node configuration)
     Hook for subclassers to configure a new menu based on configuration.
protected  voidconfigureToolBar(Container toolBar, Node configuration)
     Hook for subclassers to configure a toolbar with configuration.
protected  voidconfigureToolbox(JGraphEditorToolbox toolbox, Node configuration)
     Hook for subclassers to configure a new toolbox based on configuration.
public  PropertyChangeListenercreateActionChangeListener(AbstractButton button)
     Returns a new property change listener that updates button according to property change events.
Parameters:
  button - The button to create the listener for.
public  JGraphEditorDiagramPanecreateDiagramPane(JGraphEditorDiagram diagram)
     Returns a new diagram pane for the specified diagram by creating a new graph using the JGraphEditorFactory.createGraph(GraphLayoutCache) method and wrapping it up in a JGraphEditorDiagramPane .
Parameters:
  diagram - The diagram that contains the graph to be used.
public  JGraphcreateGraph(GraphLayoutCache cache)
     Returns a new graph for the specified cache.
protected  ContainercreateMenu(Node configuration)
     Hook for subclassers to create a new menu.
public  JMenuBarcreateMenuBar(Node configuration)
     Returns a new JMenuBar configured using JGraphEditorFactory.configureMenuBar(Container,Node) .
Parameters:
  configuration - The configuration to create the menubar with.
public  AbstractButtoncreateMenuItem(Node configuration, boolean radio)
     Returns a new JCheckBoxMenuItem or JMenuItem configured using JGraphEditorFactory.configureActionItem(AbstractButton,JGraphEditorAction) .
Parameters:
  configuration - The configuration to create the menu item with.
Parameters:
  radio - Whether the created item should be aJRadioButtonMenuItem.
public  JPopupMenucreatePopupMenu(Node configuration)
     Returns a new JPopupMenu configured using JGraphEditorFactory.configureMenuBar(Container,Node) .
Parameters:
  configuration - The configuration to create the popup menu with.
public  JScrollPanecreateScrollPane(Component component)
     Returns a new JScrollPane containing the specified component.
public  JSplitPanecreateSplitPane(Component first, Component second, int orientation)
     Returns a new JSplitPane containing the specified component with the specified orientation.
public  JTabbedPanecreateTabbedPane(int tabPlacement)
     Returns a new empty JTabbedPane .
public  JToolBarcreateToolBar(Node configuration)
     Returns a new JToolBar configured using JGraphEditorFactory.configureToolBar(Container,Node) .
Parameters:
  configuration - The configuration to create the toolbar with.
protected  AbstractButtoncreateToolBarButton(Node configuration)
     Returns a new JToggleButton or JButton configured using JGraphEditorFactory.configureActionItem(AbstractButton,JGraphEditorAction) and JGraphEditorFactory.configureAbstractButton(AbstractButton,String) (in this order).
Parameters:
  configuration - The configuration to create the toolbar with.
public  JGraphEditorToolboxcreateToolbox(Node configuration)
     Returns a new JGraphEditorToolbox configured using JGraphEditorFactory.configureToolbox(JGraphEditorToolbox,Node) .
Parameters:
  configuration - The configuration to create the toolbox with.
protected  AbstractButtoncreateToolboxButton(JGraphEditorTool tool)
     Returns a new JToggleButton button configured for tool by calling JGraphEditorFactory.configureAbstractButton(AbstractButton,String) .
Parameters:
  tool - The tool to create the toolbox button for.
public  ComponentexecuteMethod(String factoryMethod)
     Shortcut method to JGraphEditorFactory.executeMethod(String,Node) with a null configuration.
Parameters:
  factoryMethod - The name of the factory method to executed.
public  ComponentexecuteMethod(String factoryMethod, Node configuration)
     Executes JGraphEditorFactoryMethod.createInstance(Node) on the factory method under factoryMethod passing configuration along as an argument and returns the return value of the invoked method.
Parameters:
  factoryMethod - The name of the factory method to executed.
Parameters:
  configuration - The configuration to pass toJGraphEditorFactoryMethod.createInstance(Node).
public  JGraphEditorActiongetAction(String key)
     Returns the action for the resource under key+SUFFIX_ACTION from the editor kit.
protected  StringgetKey(Node node)
     Shortcut method to JGraphEditorSettings.getKeyAttributeValue(Node) .
public  JGraphEditorKitgetKit()
     Returns the editor kit.
public  JGraphEditorFactoryMethodgetMethod(String name)
     Returns the factory method for the specified name or null if no such factory method can be found.
Parameters:
  name - The name that identifies the factory method.
protected  StringgetString(String key)
     Shortcut method to JGraphEditorResources.getString(String) .
public  JGraphEditorToolgetTool(String key)
     Returns the tool for the resource under key+SUFFIX_TOOL from the editor kit.
public  voidsetKit(JGraphEditorKit kit)
     Sets the editor kit to provide actions and tools.

Field Detail
ITEMTYPE_MENUBAR
final protected static int ITEMTYPE_MENUBAR(Code)
Constant for menubar creation.



ITEMTYPE_TOOLBAR
final protected static int ITEMTYPE_TOOLBAR(Code)
Constant for toolbar creation.



NODENAME_GROUP
final public static String NODENAME_GROUP(Code)
Defines the nodename for groups.



NODENAME_ITEM
final public static String NODENAME_ITEM(Code)
Defines the nodename for items.



NODENAME_MENU
final public static String NODENAME_MENU(Code)
Defines the nodename for menus.



NODENAME_SEPARATOR
final public static String NODENAME_SEPARATOR(Code)
Defines the nodename for separators.



SEPARATOR
final protected static Component SEPARATOR(Code)
Shared separator instance.



SUFFIX_ACTION
final public static String SUFFIX_ACTION(Code)
Defines the suffix for actionname resources. This is used to replace the default action name, which is its key, eg. openFile.label=Open....



SUFFIX_ICON
final public static String SUFFIX_ICON(Code)
Defines the suffix for icon resources, eg. open.icon=/com/jgraph/pad/images/open.gif.



SUFFIX_LABEL
final public static String SUFFIX_LABEL(Code)
Defines the suffix for label resources, eg. open.label=Open....



SUFFIX_MNEMONIC
final public static String SUFFIX_MNEMONIC(Code)
Defines the suffix for mnemonic resources, eg. open.mnemonic=o.



SUFFIX_SHORTCUT
final public static String SUFFIX_SHORTCUT(Code)
Defines the suffix for shortcut resources, eg. open.shortcut=control O.



SUFFIX_TOOL
final public static String SUFFIX_TOOL(Code)
Defines the suffix for toolname resources. This is used to replace the default tool name, which is its key, eg. openFile.label=Open....



SUFFIX_TOOLTIP
final public static String SUFFIX_TOOLTIP(Code)
Defines the suffix for tooltip resources, eg. open.tooltip=Open a file.



factoryMethods
protected Map factoryMethods(Code)
Holds the (name, factory method) pairs



kit
protected JGraphEditorKit kit(Code)
References the editor kit.




Constructor Detail
JGraphEditorFactory
public JGraphEditorFactory()(Code)
Constructs an empty factory.



JGraphEditorFactory
public JGraphEditorFactory(JGraphEditorKit kit)(Code)
Constructs a factory for the specified kit.




Method Detail
addMethod
public Object addMethod(JGraphEditorFactoryMethod method)(Code)
Adds the specified factory method.
Parameters:
  method - The factory method to add. Returns the previous factory method for name.



configureAbstractButton
protected void configureAbstractButton(AbstractButton button, String name)(Code)
Hook for subclassers to configure a toolbox button for tool.
Parameters:
  button - The button to be configured.
Parameters:
  name - The name of the tool or action to configure the button for.



configureActionItem
public void configureActionItem(AbstractButton button, JGraphEditorAction action)(Code)
Hook for subclassers to configure an action item for action. Valid action items are toolbar buttons and menu items, but not toolbox buttons.
Parameters:
  button - The button to be configured.
Parameters:
  action - The action to configure the button for.



configureMenuBar
protected void configureMenuBar(Container menu, Node configuration)(Code)
Hook for subclassers to configure a new menu based on configuration. This is used for menubars and submenus.
Parameters:
  menu - The menu to be configured.
Parameters:
  configuration - The configuration to configure the menubar with.
See Also:   JGraphEditorFactory.createMenuItem(Node,boolean)



configureToolBar
protected void configureToolBar(Container toolBar, Node configuration)(Code)
Hook for subclassers to configure a toolbar with configuration.
Parameters:
  toolBar - The toolBar to be configured.
Parameters:
  configuration - The configuration to configure the toolbar with.



configureToolbox
protected void configureToolbox(JGraphEditorToolbox toolbox, Node configuration)(Code)
Hook for subclassers to configure a new toolbox based on configuration.
Parameters:
  toolbox - The toolbox to be configured.
Parameters:
  configuration - The configuration to configure the toolbox with.
See Also:   JGraphEditorFactory.createToolboxButton(JGraphEditorTool)



createActionChangeListener
public PropertyChangeListener createActionChangeListener(AbstractButton button)(Code)
Returns a new property change listener that updates button according to property change events.
Parameters:
  button - The button to create the listener for. Returns a new property change listener for actions.



createDiagramPane
public JGraphEditorDiagramPane createDiagramPane(JGraphEditorDiagram diagram)(Code)
Returns a new diagram pane for the specified diagram by creating a new graph using the JGraphEditorFactory.createGraph(GraphLayoutCache) method and wrapping it up in a JGraphEditorDiagramPane .
Parameters:
  diagram - The diagram that contains the graph to be used. Returns a new diagram pane for diagram.



createGraph
public JGraph createGraph(GraphLayoutCache cache)(Code)
Returns a new graph for the specified cache. This implementation creates a new graph using JGraph.JGraph(GraphLayoutCache) .
Parameters:
  cache - The layout cache that defines the graph. Returns a new graph for cache.



createMenu
protected Container createMenu(Node configuration)(Code)
Hook for subclassers to create a new menu. This implementation returns a new instance of JMenuBar .
Parameters:
  configuration - The configuration to create the menu with. Returns a new menubar.



createMenuBar
public JMenuBar createMenuBar(Node configuration)(Code)
Returns a new JMenuBar configured using JGraphEditorFactory.configureMenuBar(Container,Node) .
Parameters:
  configuration - The configuration to create the menubar with. Returns a new toolbox.



createMenuItem
public AbstractButton createMenuItem(Node configuration, boolean radio)(Code)
Returns a new JCheckBoxMenuItem or JMenuItem configured using JGraphEditorFactory.configureActionItem(AbstractButton,JGraphEditorAction) .
Parameters:
  configuration - The configuration to create the menu item with.
Parameters:
  radio - Whether the created item should be aJRadioButtonMenuItem. Returns a new menu item.



createPopupMenu
public JPopupMenu createPopupMenu(Node configuration)(Code)
Returns a new JPopupMenu configured using JGraphEditorFactory.configureMenuBar(Container,Node) .
Parameters:
  configuration - The configuration to create the popup menu with. Returns a new toolbox.



createScrollPane
public JScrollPane createScrollPane(Component component)(Code)
Returns a new JScrollPane containing the specified component. Returns a new scrollpane containing the specified component.



createSplitPane
public JSplitPane createSplitPane(Component first, Component second, int orientation)(Code)
Returns a new JSplitPane containing the specified component with the specified orientation. Returns a new splitpane containing the the specified components.



createTabbedPane
public JTabbedPane createTabbedPane(int tabPlacement)(Code)
Returns a new empty JTabbedPane . Returns a new tabbed pane.



createToolBar
public JToolBar createToolBar(Node configuration)(Code)
Returns a new JToolBar configured using JGraphEditorFactory.configureToolBar(Container,Node) .
Parameters:
  configuration - The configuration to create the toolbar with. Returns a new toolbar.



createToolBarButton
protected AbstractButton createToolBarButton(Node configuration)(Code)
Returns a new JToggleButton or JButton configured using JGraphEditorFactory.configureActionItem(AbstractButton,JGraphEditorAction) and JGraphEditorFactory.configureAbstractButton(AbstractButton,String) (in this order).
Parameters:
  configuration - The configuration to create the toolbar with. Returns a new toolbar.



createToolbox
public JGraphEditorToolbox createToolbox(Node configuration)(Code)
Returns a new JGraphEditorToolbox configured using JGraphEditorFactory.configureToolbox(JGraphEditorToolbox,Node) .
Parameters:
  configuration - The configuration to create the toolbox with. Returns a new toolbox.



createToolboxButton
protected AbstractButton createToolboxButton(JGraphEditorTool tool)(Code)
Returns a new JToggleButton button configured for tool by calling JGraphEditorFactory.configureAbstractButton(AbstractButton,String) .
Parameters:
  tool - The tool to create the toolbox button for. Returns a new toolbox.



executeMethod
public Component executeMethod(String factoryMethod)(Code)
Shortcut method to JGraphEditorFactory.executeMethod(String,Node) with a null configuration.
Parameters:
  factoryMethod - The name of the factory method to executed. Returns the return value ofJGraphEditorFactoryMethod.createInstance(Node) onfactoryMethod.



executeMethod
public Component executeMethod(String factoryMethod, Node configuration)(Code)
Executes JGraphEditorFactoryMethod.createInstance(Node) on the factory method under factoryMethod passing configuration along as an argument and returns the return value of the invoked method.
Parameters:
  factoryMethod - The name of the factory method to executed.
Parameters:
  configuration - The configuration to pass toJGraphEditorFactoryMethod.createInstance(Node). Returns the return value ofJGraphEditorFactoryMethod.createInstance(Node) onfactoryMethod.
See Also:   JGraphEditorFactory.getMethod(String)



getAction
public JGraphEditorAction getAction(String key)(Code)
Returns the action for the resource under key+SUFFIX_ACTION from the editor kit. If no such resource exists then the action for key is returned or null if no action can be found. Returns the action for the key+SUFFIX_ACTIONresource or the action for key.
See Also:   JGraphEditorFactory.getString(String)
See Also:   JGraphEditorKit.getAction(String)



getKey
protected String getKey(Node node)(Code)
Shortcut method to JGraphEditorSettings.getKeyAttributeValue(Node) .



getKit
public JGraphEditorKit getKit()(Code)
Returns the editor kit. Returns the kit.



getMethod
public JGraphEditorFactoryMethod getMethod(String name)(Code)
Returns the factory method for the specified name or null if no such factory method can be found.
Parameters:
  name - The name that identifies the factory method. Returns the factory method under name ornull.



getString
protected String getString(String key)(Code)
Shortcut method to JGraphEditorResources.getString(String) . Returns the resource string for key.



getTool
public JGraphEditorTool getTool(String key)(Code)
Returns the tool for the resource under key+SUFFIX_TOOL from the editor kit. If no such resource exists then the tool for key is returned or null if no tool can be found. Returns the tool for the key+SUFFIX_TOOL resourceor the tool for key.
See Also:   JGraphEditorFactory.getString(String)
See Also:   JGraphEditorKit.getTool(String)



setKit
public void setKit(JGraphEditorKit kit)(Code)
Sets the editor kit to provide actions and tools.
Parameters:
  kit - The kit to set.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.