com.sun.xml.registry.client.browser.graph
Class JBGraph

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.jgraph.JGraph
                  extended bycom.sun.xml.registry.client.browser.graph.JBGraph
All Implemented Interfaces:
javax.accessibility.Accessible, com.jgraph.graph.CellViewFactory, java.util.EventListener, com.jgraph.event.GraphSelectionListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable

public class JBGraph
extends com.jgraph.JGraph
implements com.jgraph.event.GraphSelectionListener, java.awt.event.KeyListener

Specialized JGraph for JAXR Browser

Author:
Farrukh S. Najmi
See Also:
Serialized Form

Nested Class Summary
protected  class JBGraph.EventRedirector
           
 
Nested classes inherited from class com.jgraph.JGraph
com.jgraph.JGraph.EmptySelectionModel, com.jgraph.JGraph.GraphSelectionRedirector
 
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  javax.swing.Action redo
           
protected  javax.swing.Action remove
           
protected  javax.swing.Action toback
           
protected  javax.swing.Action tofront
           
protected  javax.swing.Action undo
           
protected  com.jgraph.graph.GraphUndoManager undoManager
          DOCUMENT ME!
 
Fields inherited from class com.jgraph.JGraph
antiAliased, ANTIALIASED_PROPERTY, bendable, cloneable, connectable, disconnectable, disconnectOnMove, dragEnabled, dropEnabled, EDITABLE_PROPERTY, editClickCount, enabled, GRAPH_MODEL_PROPERTY, GRAPH_VIEW_PROPERTY, graphModel, graphView, GRID_SIZE_PROPERTY, GRID_VISIBLE_PROPERTY, gridColor, gridEnabled, gridSize, gridVisible, handleColor, handleSize, highlightColor, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, lockedHandleColor, marquee, MARQUEE_HANDLER_PROPERTY, marqueeColor, minimumMove, moveable, PORTS_VISIBLE_PROPERTY, portsVisible, scale, SCALE_PROPERTY, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, selectNewCells, sizeable, snapSize
 
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
JBGraph()
          Creates a new JBGraph object.
JBGraph(JBGraphModel model)
          Creates a new JBGraph object.
 
Method Summary
 JBGraphCell addRegistryObject(javax.xml.registry.infomodel.RegistryObject ro, java.awt.Rectangle bounds, boolean createIcon)
          DOCUMENT ME!
 JBGraphCell addRelatedObject(JBGraphCell sourceCell, javax.xml.registry.infomodel.RegistryObject ro, java.awt.Rectangle bounds, java.lang.String relationshipName, boolean reverseDirection)
          DOCUMENT ME!
static void circleLayout(com.jgraph.JGraph graph)
          DOCUMENT ME!
static void circleLayout(com.jgraph.JGraph graph, com.jgraph.graph.GraphCell hubCell, java.util.ArrayList spokeCells)
          Given a graph, a hub vertex in a graph and a list of spoke vertices in teh graph this will modify the location of the spokes so that they are laid out in a circle around the hub started with first spoke at an angle of 135 degrees (left of V).
 void connect(com.jgraph.graph.Port source, com.jgraph.graph.Port target)
           
 void connectCells(JBGraphCell sourceCell, com.jgraph.graph.DefaultGraphCell targetCell, java.lang.String relationshipName, boolean reverseDirection)
          DOCUMENT ME!
protected  com.jgraph.graph.EdgeView createEdgeView(com.jgraph.graph.Edge e, com.jgraph.graph.CellMapper cm)
           
 javax.swing.JToolBar createToolBar()
          DOCUMENT ME!
 void export()
           
 JBGraphCell getJBGraphCellAt(com.jgraph.graph.DefaultGraphCell parent, int x, int y)
           
 javax.swing.JToolBar getToolBar()
          DOCUMENT ME!
 com.jgraph.graph.DefaultGraphCell group(java.lang.Object[] cells)
           
 void insert(java.awt.Point point)
           
 boolean isEditable()
          Tells whether this dialog is read-only or editable.
 boolean isGroup(java.lang.Object cell)
           
 void keyPressed(java.awt.event.KeyEvent e)
          DOCUMENT ME!
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
          DOCUMENT ME!
 void redo()
           
 void retrieveItem(JBGraphCell cell)
          DOCUMENT ME!
 void save()
           
 void setEditable(boolean editable)
          Sets whether this dialog is read-only or editable.
 void showAuditTrail(JBGraphCell cell)
          DOCUMENT ME!
 void toBack(java.lang.Object[] c)
           
 void toFront(java.lang.Object[] c)
           
 void undo()
           
 void ungroup(java.lang.Object[] cells)
           
protected  void updateHistoryButtons()
           
 void valueChanged(com.jgraph.event.GraphSelectionEvent e)
           
 
Methods inherited from class com.jgraph.JGraph
addGraphSelectionListener, addSampleData, addSelectionCell, addSelectionCells, cancelEditing, clearSelection, cloneCells, convertValueToString, createBounds, createDefaultGraphView, createPortView, createVertexView, createView, fireValueChanged, fromScreen, fromScreen, getCellBounds, getCellBounds, getDescendants, getEditClickCount, getEditingCell, getFirstCellForLocation, getGridColor, getGridSize, getHandleColor, getHandleSize, getHighlightColor, getInvokesStopCellEditing, getLockedHandleColor, getMarqueeColor, getMarqueeHandler, getMinimumMove, getModel, getNextCellForLocation, getNextViewAt, getNextViewAt, getPortForLocation, getPortViewAt, getPreferredScrollableViewportSize, getRoots, getRoots, getScale, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionCell, getSelectionCells, getSelectionCount, getSelectionModel, getSnapSize, getToolTipText, getUI, getUIClassID, getView, graphDidChange, isAntiAliased, isBendable, isCellEditable, isCellSelected, isCloneable, isConnectable, isDisconnectable, isDisconnectOnMove, isDragEnabled, isDropEnabled, isEditing, isGridEnabled, isGridVisible, isMoveable, isPortsVisible, isSelectionEmpty, isSelectNewCells, isSizeable, main, paramString, removeGraphSelectionListener, removeSelectionCell, scrollCellToVisible, scrollPointToVisible, setAntiAliased, setBendable, setCloneable, setConnectable, setDisconnectable, setDisconnectOnMove, setDragEnabled, setDropEnabled, setEditClickCount, setGridColor, setGridEnabled, setGridSize, setGridVisible, setHandleColor, setHandleSize, setHighlightColor, setInvokesStopCellEditing, setLockedHandleColor, setMarqueeColor, setMarqueeHandler, setMinimumMove, setModel, setMoveable, setPortsVisible, setScale, setSelectionCell, setSelectionCells, setSelectionModel, setSelectNewCells, setSizeable, setSnapSize, setUI, setView, snap, startEditingAtCell, stopEditing, toScreen, toScreen, updateAutoSize, 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, getAccessibleContext, 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, 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
 
Methods inherited from interface javax.accessibility.Accessible
getAccessibleContext
 

Field Detail

undoManager

protected com.jgraph.graph.GraphUndoManager undoManager
DOCUMENT ME!


undo

protected javax.swing.Action undo

redo

protected javax.swing.Action redo

remove

protected javax.swing.Action remove

tofront

protected javax.swing.Action tofront

toback

protected javax.swing.Action toback
Constructor Detail

JBGraph

public JBGraph()
Creates a new JBGraph object.


JBGraph

public JBGraph(JBGraphModel model)
Creates a new JBGraph object.

Parameters:
model - DOCUMENT ME!
Method Detail

createEdgeView

protected com.jgraph.graph.EdgeView createEdgeView(com.jgraph.graph.Edge e,
                                                   com.jgraph.graph.CellMapper cm)

insert

public void insert(java.awt.Point point)

save

public void save()

export

public void export()

connect

public void connect(com.jgraph.graph.Port source,
                    com.jgraph.graph.Port target)

group

public com.jgraph.graph.DefaultGraphCell group(java.lang.Object[] cells)

ungroup

public void ungroup(java.lang.Object[] cells)

isGroup

public boolean isGroup(java.lang.Object cell)

toFront

public void toFront(java.lang.Object[] c)

toBack

public void toBack(java.lang.Object[] c)

undo

public void undo()

redo

public void redo()

updateHistoryButtons

protected void updateHistoryButtons()

valueChanged

public void valueChanged(com.jgraph.event.GraphSelectionEvent e)
Specified by:
valueChanged in interface com.jgraph.event.GraphSelectionListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
DOCUMENT ME!

Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
e - DOCUMENT ME!

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
DOCUMENT ME!

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
e - DOCUMENT ME!

addRegistryObject

public JBGraphCell addRegistryObject(javax.xml.registry.infomodel.RegistryObject ro,
                                     java.awt.Rectangle bounds,
                                     boolean createIcon)
DOCUMENT ME!

Parameters:
ro - DOCUMENT ME!
bounds - DOCUMENT ME!
createIcon - DOCUMENT ME!
Returns:
DOCUMENT ME!

addRelatedObject

public JBGraphCell addRelatedObject(JBGraphCell sourceCell,
                                    javax.xml.registry.infomodel.RegistryObject ro,
                                    java.awt.Rectangle bounds,
                                    java.lang.String relationshipName,
                                    boolean reverseDirection)
DOCUMENT ME!

Parameters:
sourceCell - DOCUMENT ME!
ro - DOCUMENT ME!
bounds - DOCUMENT ME!
relationshipName - DOCUMENT ME!
reverseDirection - DOCUMENT ME!
Returns:
DOCUMENT ME!

connectCells

public void connectCells(JBGraphCell sourceCell,
                         com.jgraph.graph.DefaultGraphCell targetCell,
                         java.lang.String relationshipName,
                         boolean reverseDirection)
DOCUMENT ME!

Parameters:
sourceCell - DOCUMENT ME!
targetCell - DOCUMENT ME!
relationshipName - DOCUMENT ME!
reverseDirection - DOCUMENT ME!

retrieveItem

public void retrieveItem(JBGraphCell cell)
DOCUMENT ME!

Parameters:
cell - DOCUMENT ME!

showAuditTrail

public void showAuditTrail(JBGraphCell cell)
DOCUMENT ME!

Parameters:
cell - DOCUMENT ME!

createToolBar

public javax.swing.JToolBar createToolBar()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getToolBar

public javax.swing.JToolBar getToolBar()
DOCUMENT ME!

Returns:
DOCUMENT ME!

circleLayout

public static void circleLayout(com.jgraph.JGraph graph)
DOCUMENT ME!

Parameters:
graph - DOCUMENT ME!

circleLayout

public static void circleLayout(com.jgraph.JGraph graph,
                                com.jgraph.graph.GraphCell hubCell,
                                java.util.ArrayList spokeCells)
Given a graph, a hub vertex in a graph and a list of spoke vertices in teh graph this will modify the location of the spokes so that they are laid out in a circle around the hub started with first spoke at an angle of 135 degrees (left of V).

Parameters:
graph - DOCUMENT ME!
hubCell - DOCUMENT ME!
spokeCells - DOCUMENT ME!

getJBGraphCellAt

public JBGraphCell getJBGraphCellAt(com.jgraph.graph.DefaultGraphCell parent,
                                    int x,
                                    int y)

setEditable

public void setEditable(boolean editable)
Sets whether this dialog is read-only or editable.


isEditable

public boolean isEditable()
Tells whether this dialog is read-only or editable.



Copyright © 2001-2004 OASIS. All Rights Reserved.