|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
aminePlatform.guis.graphDrawing.GraphDrawPanel
Title : GraphDrawPanel
Description : GraphDrawPanel is the Panel for Graph Drawing. Draw methods are defined here, as well as mouse actions and other related UI components.
Copyright : Copyright (c) Adil KABBAJ 2004-2009
Nested Class Summary | |
class |
GraphDrawPanel.CmdCtxtMenu
|
(package private) class |
GraphDrawPanel.SelectCtxtMenu
|
class |
GraphDrawPanel.TxtFldVEdge
The textField of ListBox is editable ; user can specify his own name or he can select a primitive name (from the list) and change it. |
class |
GraphDrawPanel.TxtFldVNode
Inner Classes : UIs |
(package private) class |
GraphDrawPanel.VEdgeCtxtMenu
|
class |
GraphDrawPanel.VNodeCtxtMenu
Title : NodeCtxtMenu Description : NodeCtxtMenu is a JPopupMenu for Node in a 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 |
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.Container |
|
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 | |
GraphDrawPanel(Lexicon lexicon)
Create a GraphDrawPanel for the specified GraphDrawFrame, taking into account the specified Lexicon |
Method Summary | |
protected boolean |
canNodeBeEdited()
|
void |
clear()
Clear the content of the current GraphDrawPanel |
(package private) static int |
computeDistance(java.awt.Point p,
java.awt.Point p0,
java.awt.Point p1)
Compute the distance between a point p and the segment (p0, p1). |
(package private) static boolean |
computeIntersection(java.awt.Point p0,
java.awt.Point p1,
java.awt.Point n0,
java.awt.Point n1,
java.awt.Point px)
Compute the intersection between (p0, p1) and (n0, n1) and returns the result |
void |
copy()
Copy the selected elements |
Edge |
createEdge()
Create an Edge. |
Graph |
createGraph()
Create a Graph. |
void |
cut()
Cut the selected elements |
protected void |
cutWithoutBuffering()
|
protected void |
displayContent(VisualNode vnode)
Display the content of the specified Visual Node. |
(package private) void |
drawVEdgeInEdition(java.awt.Graphics g)
Draw the VisualEdge that is in edition |
boolean |
drawVNode(java.awt.Graphics g,
VisualNode vnode,
Lexicon lexicon)
Draw VisualNode. |
void |
ExeTreatVnode(java.lang.String contenu)
|
void |
finalize()
|
void |
getBorderForSelection()
Get the minimal rectangle for the tracker |
int |
getFontSize()
return the font size of the current VisualGraph |
(package private) static java.awt.Point |
getIntersect(java.awt.Point p0,
java.awt.Point p1,
java.awt.Rectangle rect)
Auxiliary Methods |
(package private) void |
getSelectedVEdges(java.util.ArrayList lstVEdgeASel,
java.util.ArrayList lstVNodeSel)
|
(package private) void |
getSelectedVNodes(java.util.ArrayList lst)
|
protected java.lang.String |
getTxtInEdition(int caretPosition)
|
boolean |
graphWithDrawingInf(Graph graph)
|
protected boolean |
insertText(java.lang.String s2Insert,
int insertPosition)
|
(package private) static boolean |
isBetween(int v,
int b1,
int b2)
|
(package private) static boolean |
isRectangleInRectangle(java.awt.Rectangle rct1,
java.awt.Rectangle rct2)
|
(package private) void |
onKeyPressed(java.awt.event.KeyEvent e)
|
void |
onMouseClicked(java.awt.event.MouseEvent e)
|
(package private) void |
onMouseDragged(java.awt.event.MouseEvent e)
|
protected void |
onMouseEntered(java.awt.event.MouseEvent e1)
|
(package private) void |
onMouseExited(java.awt.event.MouseEvent e1)
|
(package private) void |
onMouseMoved(java.awt.event.MouseEvent e1)
|
void |
onMousePressed(java.awt.event.MouseEvent e)
|
protected void |
onMouseReleased(java.awt.event.MouseEvent e)
|
void |
paintComponent(java.awt.Graphics g)
PaintComponent of the current GraphDrawPanel |
void |
paste()
Paste the content of the buffer at the position specified by the attribute clickPoint |
void |
rearrange()
ADDED By Nabil this method allow the automatic reorganizing of graph's nodes |
(package private) static java.awt.Rectangle |
rectangleBoundTxt(java.lang.String s,
java.awt.Point p)
|
void |
selectAll()
Select all the elements (visual nodes and visual edges) of the current GraphDrawPanel |
protected void |
selectElements(int caretPosition)
|
void |
selectVEdge(VisualEdge vedge)
Set the specified vedge as the selected Visual Edge. |
void |
selectVEdgeName(VisualEdge vedge)
Set the specified vedge as the selected Visual Edge. |
void |
selectVNode(VisualNode vnode)
Set the specified vnode as the selected Visual Node. |
void |
setCursorTolinkMode()
Set the cursor for the current GraphDrawPanel to Link Mode VEdge. |
void |
setCursorToModeCmd()
Set the cursor for the current GraphDrawPanel to Mode Command |
void |
setCursorToModeEdit()
Set the cursor for the current GraphDrawPanel to Mode Edition |
void |
setCursorToModePaste()
Set the cursor for the current GraphDrawPanel to Mode Paste. |
void |
setCursorToModeZoom()
Set the cursor for the current GraphDrawPanel to Mode Zoom |
void |
setCursorTovedgeMode()
Set the cursor for the current GraphDrawPanel to Mode VEdge (for the creation of a Visual Edge). |
void |
setCursorTovnodeMode()
Set the cursor for the current GraphDrawPanel to Mode VNode (for the creation of a Visual Node). |
protected void |
setElemsInTxtFldVEdge()
|
void |
SetFontSize(int fontsize)
Set the font size of the current VisualGraph |
protected void |
setIndividualElements()
|
protected void |
setTypeElements()
It should be redefined by subclasses of GraphDrawPanel |
void |
SetZoomScale(int zoom)
Set the scale zoom of the current VisualGraph |
protected void |
treatVEdge(java.lang.String txt)
|
(package private) void |
undoVEdgeEdition()
Undo Visual Edge Edition |
void |
unselectTracker()
Deselect the tracker. |
void |
unselectVEdge()
Deselect the selected Visual Edge. |
void |
unselectVEdgeName()
Deselect the selected Visual Edge. |
void |
unselectVNode()
Deselect the selected Visual Node. |
void |
update(VisualNode vnode,
java.lang.String contenu,
java.awt.Rectangle rectangle)
Update the specified vnode according to the new content (contenu) and with the new rectangle. |
void |
updateCursorMode(byte btCursMode)
|
void |
updateDeletingEdge()
|
protected void |
updateItemsNdeCtxtMn()
It should be redefined by subclasses of GraphDraPanel |
protected void |
updatePanels(Node source)
|
void |
updateScroll()
Update the scroll of the frame of the current GraphDrawPanel |
protected void |
updateTreePanel()
|
(package private) boolean |
vedgeClicked(java.awt.Point p)
|
(package private) boolean |
vedgeNameClicked(java.awt.Point p)
|
protected boolean |
vnodeClicked(java.awt.Point p)
|
void |
vnodesInTracker()
Determine the visual nodes that are enclosed by the tracker and put them in the attribute listOfSelectedVNodes. |
void |
ZoomIn()
|
void |
ZoomOut()
|
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, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.awt.Cursor curs_default
public static final java.awt.Cursor curs_Text
public static final java.awt.Cursor curs_Crosshair
public static final java.awt.Cursor curs_Move
public static final java.awt.Cursor curs_Hand
public static final java.awt.Cursor curs_North
public static final java.awt.Point locVGraphFrm
public static final byte cstbt_ModeCmd
public static final byte cstbt_vnodeMode
public static final byte cstbt_vedgeMode
public static final byte cstbt_ModePaste
public static final byte cstbt_linkMode
public static final byte cstbt_ModeEdit
public static final byte cstbt_ModeZoom
public VisualEdge vedgeInEdition
public VisualGraph vgraphBuffer
public java.awt.Rectangle rectangleBuffer
public VisualNode vnodePressed
public VisualEdge vedgeNamePressed
static java.awt.Point initPosOfVEdgeName
public java.awt.Point spt_DebDrag
public static boolean dragMode
public java.awt.Dimension prefSize
protected java.awt.Point clickPoint
public static final java.awt.Font fontTxtFld
public static final java.awt.Color lemon_Chiffon
public int currFontSize
public Lexicon currentLexicon
public GraphDrawPanel.TxtFldVNode tfldVNode
public GraphDrawPanel.TxtFldVEdge tfldVEdge
GraphDrawPanel.SelectCtxtMenu selctCtxtMenu
public GraphDrawPanel.VNodeCtxtMenu vnodeCtxtMenu
GraphDrawPanel.VEdgeCtxtMenu vedgeCtxtMenu
public GraphDrawPanel.CmdCtxtMenu cmdCtxtMenu
public VisualGraph vgraph
java.util.ArrayList listOfSelectedVNodes
public byte mbt_Curs
public VisualNode vnodeSelected
public VisualEdge vedgeSelected
public VisualEdge vedgeNameSelected
public java.awt.Rectangle rectangleTracker
java.awt.event.MouseMotionAdapter mouseMotAdapt
java.awt.event.MouseAdapter mouseAdapt
java.awt.event.KeyListener keyListener
public VisualNode vNodeCopy
public int ZoomScale
public double m_zoom
Constructor Detail |
public GraphDrawPanel(Lexicon lexicon)
lexicon
- A LexiconMethod Detail |
public void finalize()
public void updateCursorMode(byte btCursMode)
public void setCursorToModeCmd()
public void setCursorToModeEdit()
public void setCursorToModeZoom()
public void setCursorTovnodeMode()
public void setCursorTovedgeMode()
public void setCursorTolinkMode()
public void setCursorToModePaste()
public Edge createEdge()
public Graph createGraph()
public void selectVNode(VisualNode vnode)
vnode
- A Visual Nodepublic void unselectVNode()
public void selectVEdge(VisualEdge vedge)
vedge
- A Visual Edgepublic void unselectVEdge()
public void selectVEdgeName(VisualEdge vedge)
vedge
- A Visual Edgepublic void unselectVEdgeName()
public void unselectTracker()
void undoVEdgeEdition()
void drawVEdgeInEdition(java.awt.Graphics g)
g
- Graphicsprotected boolean vnodeClicked(java.awt.Point p)
boolean vedgeClicked(java.awt.Point p)
boolean vedgeNameClicked(java.awt.Point p)
public void selectAll()
public void getBorderForSelection()
public void vnodesInTracker()
public void updateScroll()
public void update(VisualNode vnode, java.lang.String contenu, java.awt.Rectangle rectangle) throws java.lang.Exception
java.lang.Exception
public boolean graphWithDrawingInf(Graph graph)
public void paintComponent(java.awt.Graphics g)
g
- Graphicsvoid getSelectedVNodes(java.util.ArrayList lst)
void getSelectedVEdges(java.util.ArrayList lstVEdgeASel, java.util.ArrayList lstVNodeSel)
public void copy()
public void paste()
public void cut()
protected void cutWithoutBuffering()
public void updateDeletingEdge()
public void clear()
public void onMouseClicked(java.awt.event.MouseEvent e)
public void onMousePressed(java.awt.event.MouseEvent e)
void onMouseDragged(java.awt.event.MouseEvent e)
protected void onMouseEntered(java.awt.event.MouseEvent e1)
void onMouseExited(java.awt.event.MouseEvent e1)
void onMouseMoved(java.awt.event.MouseEvent e1)
protected boolean canNodeBeEdited()
protected void updatePanels(Node source)
protected void updateTreePanel()
protected void onMouseReleased(java.awt.event.MouseEvent e)
void onKeyPressed(java.awt.event.KeyEvent e)
protected void updateItemsNdeCtxtMn()
protected void setTypeElements()
protected void setIndividualElements()
protected void setElemsInTxtFldVEdge()
protected boolean insertText(java.lang.String s2Insert, int insertPosition)
protected java.lang.String getTxtInEdition(int caretPosition)
protected void selectElements(int caretPosition)
public boolean drawVNode(java.awt.Graphics g, VisualNode vnode, Lexicon lexicon)
protected void displayContent(VisualNode vnode)
public void ExeTreatVnode(java.lang.String contenu) throws java.lang.Exception
java.lang.Exception
protected void treatVEdge(java.lang.String txt)
static java.awt.Point getIntersect(java.awt.Point p0, java.awt.Point p1, java.awt.Rectangle rect)
static boolean computeIntersection(java.awt.Point p0, java.awt.Point p1, java.awt.Point n0, java.awt.Point n1, java.awt.Point px)
static boolean isBetween(int v, int b1, int b2)
static int computeDistance(java.awt.Point p, java.awt.Point p0, java.awt.Point p1)
static boolean isRectangleInRectangle(java.awt.Rectangle rct1, java.awt.Rectangle rct2)
static java.awt.Rectangle rectangleBoundTxt(java.lang.String s, java.awt.Point p)
public void rearrange()
public void SetFontSize(int fontsize)
public int getFontSize()
public void SetZoomScale(int zoom)
public void ZoomOut()
public void ZoomIn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |