|
|||||||||||
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
jcreek.gui.conceptmap.ConceptMapView
Nested Class Summary |
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 java.awt.image.BufferedImage |
backImage
|
protected java.awt.Rectangle |
bounds
|
protected ConceptMapModel |
concepMapModel
|
protected ConceptMapController |
conceptMapController
|
protected java.awt.Point |
offset
|
protected double |
scale
|
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 | |
ConceptMapView(ConceptMapModel model)
Creates a new ConceptMap using the supplied ConceptMapmodel as the model and the default ConceptMapController as the configuration. |
|
ConceptMapView(ConceptMapModel model,
ConceptMapController configuration)
Creates a new ConceptMap using the supplied ConceptMapModel as the model of this view. |
Method Summary | |
void |
calculateBounds()
(Re)calculates the outer boundaries of the ConceptMap. |
void |
centerOn(Node node)
Centers the view on a node in the graph. |
void |
centerOn(java.awt.geom.Point2D p)
Change the center position of the ConceptMap view to match this coordinate in model space. |
void |
drawEdge(java.awt.Graphics2D graphics,
VisualRelation relation,
int cnt)
|
void |
drawNode(java.awt.Graphics2D graphics,
VisualEntity entity)
|
void |
drawObjects(java.awt.Graphics2D graphics,
java.awt.Rectangle clipArea)
|
void |
edgeAdded(GraphChangeEvent e)
|
void |
edgeChanged(GraphChangeEvent e)
|
void |
edgeRemoved(GraphChangeEvent e)
|
VisualEntity |
findVisualEntity(java.awt.Point viewPoint)
|
VisualRelation |
findVisualRelation(java.awt.Point p)
|
java.awt.Rectangle |
getBoundingBox()
Returns the bounding box, in model space coordinates of all the nodes. |
java.awt.Point |
getCenterPoint()
Returns the point located closest to the center of this view, in model space coordinates. |
ConceptMapController |
getController()
Returns the controller (ConceptMapController object) for this ConceptMap. |
ConceptMapTool |
getCurrentTool()
Returns the current tools used on this view. |
ConceptMapModel |
getModel()
Returns the model (ConceptMapModel object) this ConceptMap is a display of. |
java.awt.Rectangle |
getModelVisibleRect()
Returns the rectangle in model space coordinates that represents what this view displays of the model. |
double |
getScale()
Returns the current scale as a double larger than 0.0. |
java.awt.Point |
intersectWithLineTo(java.awt.Point to,
java.awt.Point from)
|
java.awt.Point |
modelToViewTransform(java.awt.Point modelSpacePoint)
Transforms a point in model space to a point in view space. |
void |
nodeAdded(GraphChangeEvent e)
|
void |
nodeChanged(GraphChangeEvent e)
|
void |
nodeMoved(GraphChangeEvent e)
|
void |
nodeRemoved(GraphChangeEvent e)
|
void |
paintComponent(java.awt.Graphics g)
(Re)paints this component. |
void |
selectionAdd(SelectionChangeEvent e)
|
void |
selectionClear(SelectionChangeEvent e)
|
void |
selectionRemove(SelectionChangeEvent e)
|
void |
setBounds(int x,
int y,
int a,
int b)
Overrides the standard setSize() to maintain the center point when the size is changed. |
void |
setController(ConceptMapController controller)
Sets the controlle (ConceptMapController object) for this ConceptMap. |
void |
setDropEnable(boolean b)
|
void |
setScale(double newScale)
Changes the scale of the view. |
void |
setTool(ConceptMapTool tool)
Sets the current tool of this view. |
void |
suspendBoundingBoxUpdate(boolean susp)
Suspends or restarts the recalculation of the bounding box when a node is added or removed from the model. |
java.awt.Point |
viewToModelTransform(java.awt.Point viewSpacePoint)
Transforms a point in view space to a point in model space. |
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, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI |
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, 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 ConceptMapModel concepMapModel
protected ConceptMapController conceptMapController
protected double scale
protected java.awt.Rectangle bounds
protected java.awt.Point offset
protected java.awt.image.BufferedImage backImage
Constructor Detail |
public ConceptMapView(ConceptMapModel model, ConceptMapController configuration)
configuration
- The ConceptMapController as the configuration of the view.public ConceptMapView(ConceptMapModel model)
Method Detail |
public ConceptMapModel getModel()
public ConceptMapController getController()
public void setController(ConceptMapController controller)
controller
- The ConceptMapController object.public void calculateBounds()
public void suspendBoundingBoxUpdate(boolean susp)
public java.awt.Rectangle getModelVisibleRect()
public java.awt.Rectangle getBoundingBox()
public void centerOn(java.awt.geom.Point2D p)
p
- A point in the model space.public void centerOn(Node node)
public java.awt.Point getCenterPoint()
public java.awt.Point modelToViewTransform(java.awt.Point modelSpacePoint)
modelSpacePoint
- A point in the model space.
public java.awt.Point viewToModelTransform(java.awt.Point viewSpacePoint)
viewSpacePoint
- A point in the view space.
public void setScale(double newScale)
newScale
- The new scale to set this view to.public double getScale()
public void setBounds(int x, int y, int a, int b)
public VisualEntity findVisualEntity(java.awt.Point viewPoint)
public VisualRelation findVisualRelation(java.awt.Point p)
public void setTool(ConceptMapTool tool)
tool
- The new current toolpublic ConceptMapTool getCurrentTool()
public void paintComponent(java.awt.Graphics g)
public void drawObjects(java.awt.Graphics2D graphics, java.awt.Rectangle clipArea)
public void drawNode(java.awt.Graphics2D graphics, VisualEntity entity)
public void drawEdge(java.awt.Graphics2D graphics, VisualRelation relation, int cnt)
public java.awt.Point intersectWithLineTo(java.awt.Point to, java.awt.Point from)
public void nodeMoved(GraphChangeEvent e)
nodeMoved
in interface GraphChangeListener
public void nodeChanged(GraphChangeEvent e)
nodeChanged
in interface GraphChangeListener
public void nodeAdded(GraphChangeEvent e)
nodeAdded
in interface GraphChangeListener
public void nodeRemoved(GraphChangeEvent e)
nodeRemoved
in interface GraphChangeListener
public void edgeAdded(GraphChangeEvent e)
edgeAdded
in interface GraphChangeListener
public void edgeRemoved(GraphChangeEvent e)
edgeRemoved
in interface GraphChangeListener
public void edgeChanged(GraphChangeEvent e)
edgeChanged
in interface GraphChangeListener
public void selectionClear(SelectionChangeEvent e)
selectionClear
in interface SelectionChangeListener
public void selectionRemove(SelectionChangeEvent e)
selectionRemove
in interface SelectionChangeListener
public void selectionAdd(SelectionChangeEvent e)
selectionAdd
in interface SelectionChangeListener
public void setDropEnable(boolean b)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |