|
|||||||||||
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.pad.GPDocument
A Document represents a single instance of a graph view with associated library and overview panes. The document deal with a lot of the listening required on the graph, prompting for save if modified, undo handling and top level UI issues relating to pane positioning.
Nested Class Summary | |
protected class |
GPDocument.EventRedirector
This will change the source of the actionevent to graph. |
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 | |
protected Rule |
columnRule
The column rule for the graph |
protected boolean |
enableTooltips
|
protected java.net.URL |
file
Filename for the current document. |
protected java.lang.String |
findPattern
contains the find pattern for this document |
protected javax.swing.Action |
fitAction
Action used for fitting the size |
protected GPGraph |
graph
The joint graph for this document |
protected GPGraphpad |
graphpad
A reference to the top level component |
protected GraphUndoManager |
graphUndoManager
The graphUndoManager manager for the joint graph. |
protected GPInternalFrame |
internalFrame
a reference to the internal Frame |
protected static boolean |
isMetric
true if the current graph is Metric. |
protected java.lang.Object |
lastFound
contains the last found object |
protected static boolean |
libraryExpanded
true if the library expand is expanded default is true |
protected GPLibraryPanel |
libraryPanel
The left site of this document Shows the libraries |
protected boolean |
modified
True if this documents graph model was modified since last save. |
protected GraphNetworkModel |
networkModel
|
protected javax.swing.JDialog |
overviewDialog
The overview Dialog for this document. |
protected Rule |
rowRule
The row rule for the graph |
protected javax.swing.JScrollPane |
scrollPane
Container for the graph so that you can scroll over the graph |
protected static boolean |
showRuler
true if the ruler show is activated |
protected GPSplitPane |
splitPane
Splitpane between the libraries and the graph |
protected Touch |
touch
On the fly layout |
protected UndoHandler |
undoHandler
The graphUndoManager handler for the current document. |
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.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
GPDocument(GPGraphpad graphpad,
java.net.URL file,
GPGraph gpGraph,
GraphModel model)
Constructor for GPDocument. |
Method Summary | |
boolean |
close(boolean showConfirmDialog)
Returns true if the user really wants to close. |
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
protected java.awt.Component |
createCenterComponent()
Create the center component of this panel. |
protected GraphUndoManager |
createGraphUndoManager()
|
protected GPLibraryPanel |
createLibrary()
|
protected java.awt.Component |
createScrollPane()
|
Rule |
getColumnRule()
Returns the columnRule. |
protected java.lang.String |
getDocumentScale()
|
protected java.lang.String |
getDocumentStatus()
|
protected java.lang.String |
getDocumentTitle()
|
java.net.URL |
getFilename()
Returns the filename. |
java.lang.String |
getFindPattern()
Returns the findPattern. |
java.lang.String |
getFrameTitle()
|
GPGraph |
getGraph()
Fetch the editor contained in this panel |
GraphLayoutCache |
getGraphLayoutCache()
Returns the view from the current graph |
GPGraphpad |
getGraphpad()
Returns the graphpad. |
protected GPGraphUI |
getGraphUI()
returns the GPGraph UI |
GraphUndoManager |
getGraphUndoManager()
Returns the graphUndoManager. |
GPInternalFrame |
getInternalFrame()
Returns the internalFrame. |
java.lang.Object |
getLastFound()
Returns the lastFound. |
GPLibraryPanel |
getLibraryPanel()
|
GraphModel |
getModel()
Returns the model of the graph |
GraphNetworkModel |
getNetworkModel()
Returns the networkModel. |
javax.swing.JDialog |
getOverviewDialog()
Returns the overviewDialog. |
Rule |
getRowRule()
Returns the rowRule. |
javax.swing.JScrollPane |
getScrollPane()
Returns the scrollPane. |
GPSplitPane |
getSplitPane()
Returns the splitPane. |
Touch |
getTouch()
Returns the touch. |
void |
graphChanged(GraphModelEvent e)
|
void |
graphLayoutCacheChanged(GraphLayoutCacheEvent e)
|
boolean |
isEnableTooltips()
Returns the enableTooltips. |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pF,
int page)
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
protected void |
registerListeners(JGraph graph)
|
void |
resetGraphUndoManager()
Resets the Graph undo manager |
void |
setColumnRule(Rule columnRule)
Sets the columnRule. |
void |
setEnableTooltips(boolean enableTooltips)
Sets the enableTooltips. |
void |
setFilename(java.net.URL filename)
Sets the filename. |
void |
setFindPattern(java.lang.String findPattern)
Sets the findPattern. |
void |
setFontNameForSelection(java.lang.String name)
|
void |
setFontSizeForSelection(float size)
|
void |
setFontStyleForSelection(int style)
|
void |
setGraphpad(GPGraphpad graphpad)
Sets the graphpad. |
void |
setGraphUndoManager(GraphUndoManager graphUndoManager)
Sets the graphUndoManager. |
protected void |
setInternalFrame(GPInternalFrame internalFrame)
Sets the internalFrame. |
void |
setLastFound(java.lang.Object lastFound)
Sets the lastFound. |
void |
setModified(boolean modified)
|
void |
setNetworkModel(GraphNetworkModel networkModel)
Sets the networkModel. |
void |
setOverviewDialog(javax.swing.JDialog overviewDialog)
Sets the overviewDialog. |
void |
setResizeAction(javax.swing.AbstractAction e)
|
void |
setRowRule(Rule rowRule)
Sets the rowRule. |
void |
setScale(double scale)
|
void |
setScrollPane(javax.swing.JScrollPane scrollPane)
Sets the scrollPane. |
void |
setSelectionAttributes(java.util.Map map)
|
void |
setSplitPane(GPSplitPane splitPane)
Sets the splitPane. |
void |
setTouch(Touch touch)
Sets the touch. |
protected void |
unregisterListeners(JGraph graph)
|
protected void |
update()
|
protected void |
updateFrameTitle()
|
void |
updatePageFormat()
not from Printable interface, but related |
void |
valueChanged(GraphSelectionEvent e)
|
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 |
protected boolean enableTooltips
protected java.net.URL file
protected GPGraphpad graphpad
protected GPSplitPane splitPane
protected GPLibraryPanel libraryPanel
protected javax.swing.JScrollPane scrollPane
protected GPGraph graph
protected javax.swing.JDialog overviewDialog
protected Rule columnRule
protected Rule rowRule
protected GraphUndoManager graphUndoManager
graph
protected UndoHandler undoHandler
protected Touch touch
protected boolean modified
protected static boolean isMetric
protected static boolean libraryExpanded
protected static boolean showRuler
protected javax.swing.Action fitAction
protected java.lang.String findPattern
protected java.lang.Object lastFound
protected GPInternalFrame internalFrame
protected GraphNetworkModel networkModel
Constructor Detail |
public GPDocument(GPGraphpad graphpad, java.net.URL file, GPGraph gpGraph, GraphModel model)
Method Detail |
public java.net.URL getFilename()
public void setFilename(java.net.URL filename)
filename
- The filename to setprotected java.awt.Component createCenterComponent()
protected java.awt.Component createScrollPane()
protected GPLibraryPanel createLibrary()
protected GraphUndoManager createGraphUndoManager()
public GPGraph getGraph()
public GraphModel getModel()
protected GPGraphUI getGraphUI()
public GraphLayoutCache getGraphLayoutCache()
protected void registerListeners(JGraph graph)
protected void unregisterListeners(JGraph graph)
public void setModified(boolean modified)
protected java.lang.String getDocumentTitle()
protected java.lang.String getDocumentStatus()
protected java.lang.String getDocumentScale()
public void setSelectionAttributes(java.util.Map map)
public void setFontSizeForSelection(float size)
public void setFontStyleForSelection(int style)
public void setFontNameForSelection(java.lang.String name)
public void setResizeAction(javax.swing.AbstractAction e)
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void setScale(double scale)
public void updatePageFormat()
public int print(java.awt.Graphics g, java.awt.print.PageFormat pF, int page)
print
in interface java.awt.print.Printable
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void valueChanged(GraphSelectionEvent e)
public void graphLayoutCacheChanged(GraphLayoutCacheEvent e)
public void graphChanged(GraphModelEvent e)
protected void update()
public GraphUndoManager getGraphUndoManager()
public void setGraphUndoManager(GraphUndoManager graphUndoManager)
graphUndoManager
- The graphUndoManager to setpublic void resetGraphUndoManager()
public GPGraphpad getGraphpad()
public void setGraphpad(GPGraphpad graphpad)
graphpad
- The graphpad to setpublic Touch getTouch()
public void setTouch(Touch touch)
touch
- The touch to setpublic boolean close(boolean showConfirmDialog)
public GPLibraryPanel getLibraryPanel()
public java.lang.String getFindPattern()
public void setFindPattern(java.lang.String findPattern)
findPattern
- The findPattern to setpublic java.lang.Object getLastFound()
public void setLastFound(java.lang.Object lastFound)
lastFound
- The lastFound to setpublic javax.swing.JDialog getOverviewDialog()
public void setOverviewDialog(javax.swing.JDialog overviewDialog)
overviewDialog
- The overviewDialog to setpublic GPSplitPane getSplitPane()
public void setSplitPane(GPSplitPane splitPane)
splitPane
- The splitPane to setpublic javax.swing.JScrollPane getScrollPane()
public void setScrollPane(javax.swing.JScrollPane scrollPane)
scrollPane
- The scrollPane to setpublic Rule getColumnRule()
public Rule getRowRule()
public void setColumnRule(Rule columnRule)
columnRule
- The columnRule to setpublic void setRowRule(Rule rowRule)
rowRule
- The rowRule to setpublic boolean isEnableTooltips()
public void setEnableTooltips(boolean enableTooltips)
enableTooltips
- The enableTooltips to setpublic GPInternalFrame getInternalFrame()
protected void setInternalFrame(GPInternalFrame internalFrame)
internalFrame
- The internalFrame to setprotected void updateFrameTitle()
public java.lang.String getFrameTitle()
public GraphNetworkModel getNetworkModel()
public void setNetworkModel(GraphNetworkModel networkModel)
networkModel
- The networkModel to set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |