|
||||||||||
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
ARoad0.Gui2.GraphicView
ARoad0.Gui2.GraphicEPRView
ARoad0.Gui2.GraphicSketchView
public class GraphicSketchView
This class is responsible for displaying an EPRViewInBase in the sketch view of any BaseObject selected in the desktop, which is named the view center. The sketch view displays all the direct access sources and direct access targets of the center, in a diagram where the center sources on the top line, and the center targets at the bottom line under the center node.
Sees the parent GraphicEPRView, for a general understanding of this class work. In GraphicSketchView, GraphicEPRView.l_AccessTargetSources_ and l_NoSourceTargets_ never contain the center object. GraphicView.l_allNodesInLinks_ is never used since there is no extended view. l_AccessTargetSources_ and l_SourcesForCenter_ are set from the links ViewInBase_Facade.populateSketchView() discovers, while l_NoSourceTargets_ is set from the ViewInBase. This means there is never a source without a link to the center, and it is possible to have a target without link from the center. The GraphicView function of node moving and switching is disabled. As resetGraphicView() is called after a full change of the view nodes, the node storing during a node adding is also disabled.
The method setGraphicNodesPositions() produces an empty sketcher in grey, if the number of nodes around the center is superior to 21, or if there are more than 10 sources or more than 10 targets.
EPRViewInBaseImpl
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected int |
accessTargetSourcesCount_
The size of GraphicEPRView.l_AccessTargetSources_, which does not include the center. |
protected BaseObject |
center_
This is the central object for which the access sources and targets are displayed in the sketch view. |
protected java.util.List |
l_SourcesForCenter_
List of sources that are access sources for the center, to put above the center node. |
protected int |
sourcesForCenterCount_
The size of l_SourcesForCenter_ |
Fields inherited from class ARoad0.Gui2.GraphicEPRView |
---|
l_AccessTargetSources_, l_NoSourceTargets_, noSourceTargetsCount_, sourcesCount_ |
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 | |
---|---|
GraphicSketchView(EPRViewInBase _view)
This constructor prepare a sketch view where a central object is displayed with all its near-access objects around it. |
Method Summary | |
---|---|
void |
finalizeForGui()
Called by InternalFrame to finalize the instance and to set is a a new object before the initialization, with the exception of whyText_ that is set to null to indicate the finalizing operation. |
protected BaseObject |
getSelectedObjectOnMouseClicked(java.awt.event.MouseEvent _e)
Called by mouseClicked() to find the BaseObject in the view on which the user has clicked. |
protected void |
initialize(java.util.Map _m_l_DisplayableLinks)
This method must be called through resetGraphicView() to have an operational instance. |
void |
mouseDragged(java.awt.event.MouseEvent _e)
This method deletes the GraphicView process of switching between nodes. |
void |
mouseReleased(java.awt.event.MouseEvent _e)
This method deletes the GraphicView process of switching between nodes. |
int |
resetGraphicView(BaseObject _center,
java.util.Map _m_l_DisplayableLinks)
This method must be called after the constructor to have an operational instance. |
void |
resetRights()
UNUSED - Draws the new arrows and rights after a change in the rights, without changing in GraphicNodes. |
protected void |
setGraphicNodes()
Sets the GraphicNodes in a 7, 11 or 21 nodes layout in the JPanel, with their absolute coordinates in 3 levels. |
protected java.awt.Point[] |
setGraphicNodesPositions()
Sets the allowed positions of the node in the view. |
protected void |
setViewSize(int _nodesNumber)
Sets the size of the JPanel when the view contains less than 21 elements. |
Methods inherited from class ARoad0.Gui2.GraphicEPRView |
---|
buildUpArrowsAndRights, hasFirstRateLinkInOneDLink, hasOwnerContainLinkToGroupIDMember, hasStrengthenLinksInOneDLink, initialize, setArrowHead, setRightsRelatedBaseObjects, setWhyText |
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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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 |
---|
protected BaseObject center_
protected final java.util.List l_SourcesForCenter_
protected int accessTargetSourcesCount_
protected int sourcesForCenterCount_
Constructor Detail |
---|
public GraphicSketchView(EPRViewInBase _view)
_view
- to associate to this instance.Method Detail |
---|
protected final void initialize(java.util.Map _m_l_DisplayableLinks) throws ProcessError
_m_l_DisplayableLinks
- is the map of DisplayableLinkImpls in this view.
May be null only if center_ is null and viewInBase_ empty.
ProcessError
- if there is a loop in the rights searchpublic void finalizeForGui()
finalizeForGui
in class GraphicEPRView
public final void resetRights() throws ProcessError, java.lang.InterruptedException
resetRights
in class GraphicEPRView
ProcessError
- if there is a loop in the rights search
java.lang.InterruptedException
public final int resetGraphicView(BaseObject _center, java.util.Map _m_l_DisplayableLinks) throws ProcessError
_center
- is the central object of the view for which this sketch view
is displayed. May be null if the EPRViewInBase has currently no elements._m_l_DisplayableLinks
- is the map of DisplayableLinkImpls in this view.
No use if _center is null. May be null.
ProcessError
- if there is a loop in the rights search, or InternalError
if the center is not in the view.protected BaseObject getSelectedObjectOnMouseClicked(java.awt.event.MouseEvent _e)
getSelectedObjectOnMouseClicked
in class GraphicView
_e
- is the event
public final void mouseReleased(java.awt.event.MouseEvent _e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class GraphicView
_e
- is the eventpublic final void mouseDragged(java.awt.event.MouseEvent _e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class GraphicView
_e
- is the eventGraphicView.mouseReleased(java.awt.event.MouseEvent)
protected void setViewSize(int _nodesNumber)
setViewSize
in class GraphicView
_nodesNumber
- is the number of BaseObjects in the view.protected final void setGraphicNodes()
setGraphicNodes
in class GraphicEPRView
protected final java.awt.Point[] setGraphicNodesPositions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |