JGraphpad Pro
v6.0.5.0


com.jgraph
Class JGraphEditor

java.lang.Object
  extended bycom.jgraph.JGraphEditor

public class JGraphEditor
extends Object

Defines the structure of an JGraph editor.


Field Summary
protected  JGraphEditorFactory factory
          Holds the UI factory.
protected  JGraphEditorKit kit
          Holds the editor kit.
protected  JGraphEditorModel model
          Holds the document model.
protected  JGraphEditorSettings settings
          Holds the settings.
static String VERSION
          Global static product identifier.
 
Constructor Summary
JGraphEditor()
          Constructs an empty editor.
JGraphEditor(JGraphEditorSettings settings)
          Constructs a new editor for the specified settings and model.
JGraphEditor(JGraphEditorSettings settings, JGraphEditorModel model, JGraphEditorKit kit, JGraphEditorFactory factory)
          Constructs a new editor for the specified settings and model.
 
Method Summary
 void exit(int code)
          Implements an application exit.
 JGraphEditorFactory getFactory()
           
 JGraphEditorKit getKit()
           
 JGraphEditorModel getModel()
           
 JGraphEditorSettings getSettings()
           
static boolean isURL(Object value)
          Returns true if the specified value is a URL, that is, if it starts with one of http://, mailto:, ftp://, file:, https://, webdav:// or webdavs://.
static void main(String[] args)
           
 void setFactory(JGraphEditorFactory factory)
           
 void setKit(JGraphEditorKit kit)
           
 void setModel(JGraphEditorModel model)
           
 void setSettings(JGraphEditorSettings settings)
           
static String toURL(File file)
          Returns a URL representation for the specified file or an empty string if there was an exception.
static URL toURL(String s)
          Returns a URL representation for the specified string or null if there was an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Global static product identifier.

See Also:
Constant Field Values

settings

protected JGraphEditorSettings settings
Holds the settings.


model

protected JGraphEditorModel model
Holds the document model.


kit

protected JGraphEditorKit kit
Holds the editor kit.


factory

protected JGraphEditorFactory factory
Holds the UI factory.

Constructor Detail

JGraphEditor

public JGraphEditor()
Constructs an empty editor.


JGraphEditor

public JGraphEditor(JGraphEditorSettings settings)
Constructs a new editor for the specified settings and model.

Parameters:
settings - The settings to use for the editor.

JGraphEditor

public JGraphEditor(JGraphEditorSettings settings,
                    JGraphEditorModel model,
                    JGraphEditorKit kit,
                    JGraphEditorFactory factory)
Constructs a new editor for the specified settings and model.

Parameters:
settings - The settings to use for the editor.
model - The model to use as the document model.
kit - The kit to be used to store the actions and tools.
factory - The factory to be used to creat the user interface.
Method Detail

exit

public void exit(int code)
Implements an application exit. This implementation invokes JGraphEditorSettings.shutdown(). Subclassers should call the superclass method as the first step. Note: This method is never called from within the framework.


getSettings

public JGraphEditorSettings getSettings()
Returns:
Returns the settings.

setSettings

public void setSettings(JGraphEditorSettings settings)
Parameters:
settings - The settings to set.

getFactory

public JGraphEditorFactory getFactory()
Returns:
Returns the factory.

setFactory

public void setFactory(JGraphEditorFactory factory)
Parameters:
factory - The factory to set.

getKit

public JGraphEditorKit getKit()
Returns:
Returns the kit.

setKit

public void setKit(JGraphEditorKit kit)
Parameters:
kit - The kit to set.

getModel

public JGraphEditorModel getModel()
Returns:
Returns the model.

setModel

public void setModel(JGraphEditorModel model)
Parameters:
model - The model to set.

isURL

public static boolean isURL(Object value)
Returns true if the specified value is a URL, that is, if it starts with one of http://, mailto:, ftp://, file:, https://, webdav:// or webdavs://.

Parameters:
value - The value that represents a potential URL.
Returns:
Returns true if value is a URL.

toURL

public static String toURL(File file)
Returns a URL representation for the specified file or an empty string if there was an exception. This method silently ignores exceptions.

Parameters:
file - The file to return the URL for.
Returns:
Returns the URL representation of file or an empty string.

toURL

public static URL toURL(String s)
Returns a URL representation for the specified string or null if there was an exception. This method silently ignores exceptions.

Parameters:
s - The string to return the URL for.
Returns:
Returns the URL representation of string or null.

main

public static void main(String[] args)

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.