|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jgraph.GPGraphpad
this is the main JPanel where GPGraph instances and buttons are displayed. Subclass it to override its default behavior. If you only need small modifications, then you might think about properly setting GPGraphpad with its setters methods.
Nested Class Summary | |
protected class |
GPGraphpad.AppCloser
To shutdown when run as an application. |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
JGraphpad |
applet
Pointer to enclosing JGraphpad applet, if any |
static javax.swing.ImageIcon |
applicationIcon
Application Icon. |
protected static java.lang.String |
appTitle
Application Title. |
protected GPBarFactory |
barFactory
A factory for the menu, tool and popup bars |
protected GPConfiguration |
configuration
|
protected javax.swing.ActionMap |
currentActionMap
ActionMap contains the current ActionMap. |
protected javax.swing.ActionMap |
defaultActionMap
ActionMap contains all default Actions for this application |
protected javax.swing.JDesktopPane |
desktop
Desktoppane for the internal frames |
protected java.util.Hashtable |
doc2InternalFrame
Contains the mapping between GPDocument objects and GPInternalFrames. |
java.lang.String |
downloadPath
|
protected static int |
entrySize
Default entry size |
protected static java.lang.String |
FRAME_HEIGHT
Key for the Registry to save and load the frame height for the graphpad frame |
protected static java.lang.String |
FRAME_STATE
Key for the Registry to save and load the frame state for the graphpad frame |
protected static java.lang.String |
FRAME_WIDTH
Key for the Registry to save and load the frame width for the graphpad frame |
protected static java.lang.String |
FRAME_X
Key for the Registry to save and load the frame x position for the graphpad frame |
protected static java.lang.String |
FRAME_Y
Key for the Registry to save and load the frame y position for the graphpad frame |
protected static GPGraphTools |
graphTools
Global instance for some graph tool implementations. |
java.lang.String |
hostName
|
java.lang.String |
hostPort
|
protected GPLogConsole |
logger
Log console for the System in and out messages |
protected static javax.swing.ImageIcon |
logoIcon
Application Icon. |
protected javax.swing.JPanel |
mainPanel
The main Panel with the status bar and the desktop pane |
java.lang.String |
mapFile
|
protected GPMarqueeHandler |
marqueeHandler
|
protected javax.swing.JMenuBar |
menubar
The current Menubar for this graphpad |
java.lang.String |
protocol
|
protected GPStatusBar |
statusbar
The current Statusbar for this Graphpad instance |
protected javax.swing.JPanel |
toolBarInnerPanel
The current Toolbar for this graphpad |
protected javax.swing.JPanel |
toolBarMainPanel
The current Toolbar for this graphpad |
protected boolean |
toolBarsVisible
Boolean for the visible state of the toolbars |
java.lang.String |
uploadFile
|
java.lang.String |
uploadPath
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
GPGraphpad()
Creates a new default instance |
|
GPGraphpad(GPConfiguration config,
java.lang.String protocol,
java.lang.String hostName,
java.lang.String hostPort,
java.lang.String downloadPath,
java.lang.String uploadPath,
java.lang.String uploadFile,
java.lang.String mapFile,
JGraphpad applet)
Creates a new instance with the configuration from the config object. |
|
GPGraphpad(JGraphpad applet)
Creates a new default instance |
|
GPGraphpad(java.lang.String protocol,
java.lang.String hostName,
java.lang.String hostPort,
java.lang.String downloadPath,
java.lang.String uploadPath,
java.lang.String uploadFile,
java.lang.String mapFile)
Creates a new default instance |
Method Summary | |
void |
addDesktopContainerListener(java.awt.event.ContainerListener listener)
|
void |
addDocument()
Adds a new Document based on the GraphModelProvider. |
void |
addDocument(java.net.URL file)
You can add a document by giving the filename. |
void |
addDocument(java.net.URL file,
GPGraph gpGraph,
GraphModel model,
GraphUndoManager undo)
Opens a new document frame based on the parameters |
void |
addGPInternalFrame(GPInternalFrame f)
Adds a new Internal Frame to the Graphpad |
protected java.awt.event.WindowAdapter |
createAppCloser(java.awt.Frame frame)
Creates a shutdown routine. |
protected GPBarFactory |
createBarFactory()
Creates a barFactory. |
protected javax.swing.JFrame |
createFrame()
Creates a frame for this Graphpad panel |
GPGraph |
createGraphInstance()
In order one can customize the JGraphpad behavior by subclassing GPGraphpad, any instanciation of graph must use this method. |
protected GPStatusBar |
createStatusBar()
Create a status bar |
void |
error(java.lang.String message)
Show a dialog with the given error message. |
void |
exit()
Adds a new Document based on the GraphModelProvider. |
void |
fillDefaultActionMap()
|
GPDocument[] |
getAllDocuments()
Returns all of the documents. |
javax.swing.JInternalFrame[] |
getAllFrames()
|
JGraphpad |
getApplet()
Adds a new Document based on the GraphModelProvider. |
static javax.swing.ImageIcon |
getApplicationIcon()
Returns the applicationIcon. |
GPBarFactory |
getBarFactory()
Returns the barFactory. |
VertexnPortsCreatorInterface[] |
getCellToolBoxes()
|
javax.swing.ActionMap |
getCurrentActionMap()
Returns the current Action Map |
GPDocument |
getCurrentDocument()
Returns the currently selected document. |
GPGraph |
getCurrentGraph()
Returns the current graph. |
javax.swing.JInternalFrame |
getCurrentInternalFrame()
Returns the currently selected internal frame If no one is selected, then the first one will be select. |
javax.swing.Action[] |
getDefaultActions()
|
AbstractActionDefault |
getEditRedoAction()
Returns the redoAction. |
AbstractActionDefault |
getEditUndoAction()
Returns the undoAction. |
DefaultGraphModelFileFormatXML |
getFileFormat()
|
java.awt.Frame |
getFrame()
Find the hosting frame, for the file-chooser dialog. |
static GPGraphTools |
getGraphTools()
Returns the graphTools. |
GPLogConsole |
getLogConsole()
|
GPMarqueeHandler |
getMarqueeHandler()
Returns the marqueeHandler. |
javax.swing.JMenuBar |
getMenubar()
|
GPStatusBar |
getStatusBar()
|
boolean |
isApplet()
Adds a new Document based on the GraphModelProvider. |
boolean |
isToolBarsVisible()
|
void |
removeDesktopContainerListener(java.awt.event.ContainerListener listener)
|
void |
removeDocument(GPDocument doc)
|
void |
removeGPInternalFrame(GPInternalFrame f)
removes the specified Internal Frame from the Graphpad |
void |
setApplet(JGraphpad applet)
Adds a new Document based on the GraphModelProvider. |
static void |
setApplicationIcon(javax.swing.ImageIcon applicationIcon)
Sets the applicationIcon. |
void |
setBarFactory(GPBarFactory barFactory)
Sets the barFactory. |
void |
setCellToolBoxes(VertexnPortsCreatorInterface[] cellToolBoxes)
|
void |
setDefaultActions(javax.swing.Action[] defaultActions)
|
void |
setFileFormat(DefaultGraphModelFileFormatXML fileFormat)
|
protected void |
setMe4Actions()
|
void |
setParentActionMap(javax.swing.ActionMap map)
|
void |
setToolBarsVisible(boolean state)
|
void |
update()
|
void |
upload(GPGraph graph)
|
void |
uploadMap(GPGraph graph)
|
void |
uploadPNG(java.awt.image.BufferedImage image)
|
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public transient JGraphpad applet
public static javax.swing.ImageIcon applicationIcon
protected static javax.swing.ImageIcon logoIcon
protected static java.lang.String appTitle
protected static int entrySize
protected static java.lang.String FRAME_WIDTH
protected static java.lang.String FRAME_HEIGHT
protected static java.lang.String FRAME_STATE
protected static java.lang.String FRAME_X
protected static java.lang.String FRAME_Y
protected boolean toolBarsVisible
protected static GPGraphTools graphTools
protected GPLogConsole logger
protected javax.swing.JDesktopPane desktop
protected java.util.Hashtable doc2InternalFrame
protected GPBarFactory barFactory
protected javax.swing.JPanel toolBarMainPanel
protected javax.swing.JPanel toolBarInnerPanel
protected javax.swing.JMenuBar menubar
protected GPStatusBar statusbar
protected javax.swing.ActionMap defaultActionMap
protected javax.swing.JPanel mainPanel
protected javax.swing.ActionMap currentActionMap
protected GPMarqueeHandler marqueeHandler
protected GPConfiguration configuration
public java.lang.String protocol
public java.lang.String hostName
public java.lang.String hostPort
public java.lang.String downloadPath
public java.lang.String uploadPath
public java.lang.String uploadFile
public java.lang.String mapFile
Constructor Detail |
public GPGraphpad()
public GPGraphpad(java.lang.String protocol, java.lang.String hostName, java.lang.String hostPort, java.lang.String downloadPath, java.lang.String uploadPath, java.lang.String uploadFile, java.lang.String mapFile)
public GPGraphpad(JGraphpad applet)
public GPGraphpad(GPConfiguration config, java.lang.String protocol, java.lang.String hostName, java.lang.String hostPort, java.lang.String downloadPath, java.lang.String uploadPath, java.lang.String uploadFile, java.lang.String mapFile, JGraphpad applet)
config
- The configuration object.Method Detail |
public void upload(GPGraph graph) throws java.io.IOException
java.io.IOException
public void uploadMap(GPGraph graph) throws java.io.IOException
java.io.IOException
public void uploadPNG(java.awt.image.BufferedImage image) throws java.io.IOException
java.io.IOException
public GPGraph createGraphInstance()
protected javax.swing.JFrame createFrame()
public void fillDefaultActionMap()
protected void setMe4Actions()
public javax.swing.ActionMap getCurrentActionMap()
protected java.awt.event.WindowAdapter createAppCloser(java.awt.Frame frame)
public java.awt.Frame getFrame()
public javax.swing.JMenuBar getMenubar()
protected GPStatusBar createStatusBar()
public GPStatusBar getStatusBar()
public void error(java.lang.String message)
public GPGraph getCurrentGraph()
public javax.swing.JInternalFrame getCurrentInternalFrame()
public GPDocument getCurrentDocument()
public GPDocument[] getAllDocuments()
null
if no documentspublic static GPGraphTools getGraphTools()
public AbstractActionDefault getEditUndoAction()
public AbstractActionDefault getEditRedoAction()
public GPLogConsole getLogConsole()
public boolean isToolBarsVisible()
public void setToolBarsVisible(boolean state)
public void addGPInternalFrame(GPInternalFrame f)
public void removeGPInternalFrame(GPInternalFrame f)
public void exit()
public void setApplet(JGraphpad applet)
public JGraphpad getApplet()
public boolean isApplet()
public void addDocument()
public void addDocument(java.net.URL file)
org.jgraph.pad.GraphModelProviderRegistry
,
org.jgraph.pad.GraphModelProvider
,
org.jgraph.pad.GraphModelFileFormat
public void addDocument(java.net.URL file, GPGraph gpGraph, GraphModel model, GraphUndoManager undo)
public void removeDocument(GPDocument doc)
public void update()
protected GPBarFactory createBarFactory()
public GPBarFactory getBarFactory()
public void setBarFactory(GPBarFactory barFactory)
barFactory
- The barFactory to setpublic javax.swing.JInternalFrame[] getAllFrames()
public void setParentActionMap(javax.swing.ActionMap map)
public static javax.swing.ImageIcon getApplicationIcon()
public static void setApplicationIcon(javax.swing.ImageIcon applicationIcon)
applicationIcon
- The applicationIcon to setpublic GPMarqueeHandler getMarqueeHandler()
public void addDesktopContainerListener(java.awt.event.ContainerListener listener)
public void removeDesktopContainerListener(java.awt.event.ContainerListener listener)
public DefaultGraphModelFileFormatXML getFileFormat()
public void setFileFormat(DefaultGraphModelFileFormatXML fileFormat)
public javax.swing.Action[] getDefaultActions()
public void setDefaultActions(javax.swing.Action[] defaultActions)
public VertexnPortsCreatorInterface[] getCellToolBoxes()
public void setCellToolBoxes(VertexnPortsCreatorInterface[] cellToolBoxes)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |