org.ceryle.ui.graph
Class EditorLayoutPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.ceryle.graph.GraphLayoutPanel
                      extended by org.ceryle.graph.tm.TMLayoutPanel
                          extended by org.ceryle.ui.graph.EditorLayoutPanel
All Implemented Interfaces:
TGScrollPane, ImageObserver, MenuContainer, Serializable, Accessible

public class EditorLayoutPanel
extends TMLayoutPanel

Extends TMLayoutPanel as an editing panel for visualized Topic Map objects. This allows presetting and limiting various features as appropriate to its editor functionality. This includes a built-in prototype graph whose features can be directly set, and also disables many of the "normal" navigation and editing listeners, since they aren't necessary in the editor.

Since:
JDK1.4
Version:
$Id: EditorLayoutPanel.java,v 3.13 2007-06-15 12:09:43 altheim Exp $
Author:
Murray Altheim
See Also:
Serialized Form

Nested Class Summary
protected  class EditorLayoutPanel.EANode
           
 class EditorLayoutPanel.EditorNavigateUI
          Inner class EditorNavigateUI extends the GraphNavigateUI to provide minimal support for the Association Editor.
protected  class EditorLayoutPanel.ETNode
           
 
Nested classes/interfaces inherited from class org.ceryle.graph.tm.TMLayoutPanel
TMLayoutPanel.LocalityAdjustmentListener, TMLayoutPanel.TopicViewer
 
Nested classes/interfaces inherited from class org.ceryle.graph.GraphLayoutPanel
GraphLayoutPanel.ButtonListener
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int ASSOC_TYPE
           
static String[] COMP_ID
           
 ANode e_anode
           
 GraphEdge e_edge_LA
           
 GraphEdge e_edge_RA
           
 TNode e_tnode_L
           
 TNode e_tnode_R
           
 TNode e_tnode_rL
           
 TNode e_tnode_rR
           
static int INFO_DISPLAY
           
static int LEFT_PLAYER
           
static int LEFT_ROLE
           
static int RIGHT_PLAYER
           
static int RIGHT_ROLE
           
 
Fields inherited from class org.ceryle.graph.tm.TMLayoutPanel
anodes, btn_closeLeg, colorizeByDistance, defaultOntology, dirtyEvent, enableMakeConsistent, favInTransition, findTopicDlog, listenerList, m_aedlog, m_canEdit, m_clut, m_dirty, m_favorites, m_favoritesBox, m_legend, m_maxListSize, m_tmSysIDs, m_topicmaps, m_xidTxferHandler, maps, MIDDLE_ONTOLOGY, MINIMAL_ONTOLOGY, NO_BASE_ONTOLOGY, onodes, ovViewMode, rnodes, showAssociations, showEdges, showOccurrences, snodes, tedlog, tmlp, tmpedit, tmproc, tmviz, tnodes, UPPER_ONTOLOGY, useDragAndDrop
 
Fields inherited from class org.ceryle.graph.GraphLayoutPanel
btn_hyper, btn_infinity, btn_locality, btn_rotate, btn_sequence, btn_zoom, DEFAULT_HYPERBOLIC, DEFAULT_LOCALITY, DEFAULT_SEQUENCE, defaultColor, editUI, gp, gPopupMenu, hvScroll, HYPER_SCROLL, hyperSB, hyperScroll, includeEdit, INFINITE_LOCALITY, lastClick, LOCALITY_SCROLL, localitySB, localityScroll, m_desktop, m_graphContainer, m_legendPanel, m_localityEnabled, m_mouseWheelListener, m_selectedSB, m_verbose, m_view, MAXIMUM_LOCALITY, mh, modeSelect, navigateUI, pm, popPanel, ROTATE_SCROLL, rotateSB, rotateScroll, scrollPanel, SEQUENCE_SCROLL, sequenceSB, sequenceScroll, srvs, tgLensSet, tgUIManager, UI_EDIT, UI_NAVIGATE, UI_ROTATEDRAG, zero, ZOOM_SCROLL, zoomSB, zoomScroll
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
EditorLayoutPanel(AssociationEditorDialog parent)
          Constructor with a parent panel, whose visibility is used to determine whether the auto-centering is active.
 
Method Summary
protected  void addUIs()
          Extends org.ceryle.graph.GraphNavigateUI to use a TMNavigateUI.
 void clear()
          Generically relabels and clears the TopicMap content from the graph objects.
protected  void droppedOnBackground(Point p, String uri)
          Called as a result of a drag 'n drop process, in this class the message is trapped and does nothing.
protected  void droppedOnNode(TMNode node, String uri)
          Called as a result of a drag 'n drop process, alters the dropped-upon Topic or Association based on the dropped Topic.
protected  String getLabel_AssocType()
          Returns the label of the Association Type node.
protected  String getLabel_PlayerLeft()
          Returns the label of the Player Left node.
protected  String getLabel_PlayerRight()
          Returns the label of the Player Right node.
protected  String getLabel_RoleLeft()
          Returns the label of the Role Left node.
protected  String getLabel_RoleRight()
          Returns the label of the Role Right node.
 int getNodeID(TMNode node)
          Provided a node, returns its String identifier.
protected  void resetPrototype()
          Resets the graph parameters.
 void setAssociationMode(boolean mode)
          Sets the display mode of this panel.
protected  void setLabel_AssocType(String label)
          Sets the label of the Association Type node to the value of label.
protected  void setLabel_PlayerLeft(String label, Color color)
          Sets the label of the Player Left node to the value of label.
protected  void setLabel_PlayerRight(String label, Color color)
          Sets the label of the Player Right node to the value of label.
protected  void setLabel_RoleLeft(String label)
          Sets the label of the Role Left node to the value of label.
protected  void setLabel_RoleRight(String label)
          Sets the label of the Role Right node to the value of label.
 void setSelected(String id)
          Select the Node whose ID matches the parameter.
 void setTopicMap(TopicMap topicmap)
          Sets the TopicMap of this TMLayoutPanel to the provided parameter.
 void setTopicMapProcessor(TopicMapProcessor tmprocessor)
          Sets the TopicMapProcessor of this TMLayoutPanel to the provided parameter.
 void updatePrototypeFont()
          Updates the font of the prototype graph based on the current GraphNode font size.
 
Methods inherited from class org.ceryle.graph.tm.TMLayoutPanel
addANode, addANode, addANode, addDirtyListener, addEdge, addFavoritesList, addOccurrence, addONode, addONode, addRNode, addScope, addSNode, addSNode, addSubGraph, addTNode, addTNode, addTNode, addToFavorites, addTopicMap, changeNodeID, clearLegend, contains, defloat, deleteNode, deleteSelected, editAssociation, editTopic, editTopicMap, find, findNext, findTNodeByLabel, fireDirtyStateChanged, getANodeForAssociation, getANodes, getAssociationEditor, getAssociationEditor, getCLUT, getColorizeByDistance, getEditor, getFavoritesList, getFindTopicDialog, getFindTopicPanel, getGraphPanel, getRequestedBaseLocators, getTMPanel, getTNodeByLabel, getTNodeForTopic, getTNodes, getTopicEditor, getTopicMap, getTopicMapBaseLocators, getTopicMapProcessor, getTopicMaps, getTopicReference, getTopics, getVisualizer, graphStatus, gridNodes, initiateDrag, isDirty, isEditable, isEmpty, keyPressed, loadTopicMap, makeAllConsistent, makeColorsPermanent, mergeTopics, nodeDoubleClicked, nodeFixAll, nodeUnfixAll, openBase, openBase, openOccurrence, openOccurrence, openOccurrence, openOccurrences, randomTMGraph, removeDirtyListener, replaceBaseLocator, restoreFavorites, saveProperties, searchTopics, selectAll, selectByLabel, selectFavorite, selectFromTree, selectHierarchy, selectNode, setAssociationVisibility, setCLUT, setColorFlags, setColorizeByDistance, setDefaultSelection, setDefaultStylesheet, setDirty, setEdgeVisibility, setEditable, setFixed, setLegend, setSizeByDistance, setStylesheet, showFindTopic, storeFavorites, tmEngineRecover, topicsToTNodes, traverseGraph, updateOccurrenceCount
 
Methods inherited from class org.ceryle.graph.GraphLayoutPanel
activateUI, addGraphPanel, buildLens, buildScrollBars, buildScrollPanel, centerNode, centerSelectedNode, centerSelectedNode, clearGraph, findNode, findNode, getAllEdges, getGraphView, getHVScroll, getHyperbolicDistortion, getHyperRadius, getHyperScroll, getLastClickPoint, getLeftOf, getLegend, getLocalityRadius, getLocalityScroll, getNodeCount, getNodeFont, getOffset, getPopPanel, getPopupMenu, getPosition, getPosition, getRotateScroll, getRotationAngle, getScrollPanel, getSelectedCount, getSelectedLocation, getSelectedNode, getSequenceDistortion, getSequenceScroll, getTGPanel, getTopOf, getView, getZoomScroll, getZoomValue, hideNode, initialize, initialize, isEditActive, isLocalityEnabled, nodeClicked, releaseGraphPanel, repaintNode, reset, selectFirstNode, selectFirstNode, selectNode, selectSB, setFixedSelectedNode, setGraphPriority, setGraphPriority, setHyperbolicDistortion, setHyperRadius, setLastClickPoint, setLocalityEnabled, setLocalityRadius, setNavigateVerbosity, setNodeFont, setOffset, setPosition, setRotationAngle, setScrollBarsEnabled, setScrollPanelVisibility, setSequenceDistortion, setToolVisibility, setZoomValue, update
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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

ASSOC_TYPE

public static final int ASSOC_TYPE
See Also:
Constant Field Values

LEFT_PLAYER

public static final int LEFT_PLAYER
See Also:
Constant Field Values

LEFT_ROLE

public static final int LEFT_ROLE
See Also:
Constant Field Values

RIGHT_PLAYER

public static final int RIGHT_PLAYER
See Also:
Constant Field Values

RIGHT_ROLE

public static final int RIGHT_ROLE
See Also:
Constant Field Values

INFO_DISPLAY

public static final int INFO_DISPLAY
See Also:
Constant Field Values

COMP_ID

public static final String[] COMP_ID

e_anode

public ANode e_anode

e_tnode_L

public TNode e_tnode_L

e_tnode_R

public TNode e_tnode_R

e_tnode_rL

public TNode e_tnode_rL

e_tnode_rR

public TNode e_tnode_rR

e_edge_LA

public GraphEdge e_edge_LA

e_edge_RA

public GraphEdge e_edge_RA
Constructor Detail

EditorLayoutPanel

public EditorLayoutPanel(AssociationEditorDialog parent)
                  throws TopicMapException
Constructor with a parent panel, whose visibility is used to determine whether the auto-centering is active.

Throws:
TopicMapException
Method Detail

setTopicMap

public void setTopicMap(TopicMap topicmap)
Sets the TopicMap of this TMLayoutPanel to the provided parameter.


setTopicMapProcessor

public void setTopicMapProcessor(TopicMapProcessor&nb