aminePlatform.guis.cgDrawing
Class CGDrawPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byaminePlatform.guis.graphDrawing.GraphDrawPanel
                      extended byaminePlatform.guis.cgDrawing.CGDrawPanel
All Implemented Interfaces:
javax.accessibility.Accessible, AmineConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CGDrawPanel
extends GraphDrawPanel
implements AmineConstants

Title : CGDrawPanel

Description : CGDrawPanel extends GraphDrawPanel to suit the drawing of CG. Specific features of CG (like state for concepts) are treated here.

Copyright : Copyright (c) Adil KABBAJ 2004-2009

See Also:
Serialized Form

Nested Class Summary
 class CGDrawPanel.JConceptStates
           
 class CGDrawPanel.LabelConc
           
(package private)  class CGDrawPanel.LBoxEtat
           
 
Nested classes inherited from class aminePlatform.guis.graphDrawing.GraphDrawPanel
GraphDrawPanel.CmdCtxtMenu, GraphDrawPanel.TxtFldVEdge, GraphDrawPanel.TxtFldVNode, GraphDrawPanel.VNodeCtxtMenu
 
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
 
Field Summary
(package private) static java.awt.Font fontTxtFldBold
           
(package private)  GraphDrawFrame graphDrawFrame
           
 CGDrawPanel.LabelConc labelConcRef
           
(package private)  CGDrawPanel.JConceptStates lstStates
           
 javax.swing.DefaultListModel model
           
 
Fields inherited from class aminePlatform.guis.graphDrawing.GraphDrawPanel
clickPoint, cmdCtxtMenu, cstbt_linkMode, cstbt_ModeCmd, cstbt_ModeEdit, cstbt_ModePaste, cstbt_ModeZoom, cstbt_vedgeMode, cstbt_vnodeMode, currentLexicon, currFontSize, curs_Crosshair, curs_default, curs_Hand, curs_Move, curs_North, curs_Text, dragMode, fontTxtFld, lemon_Chiffon, locVGraphFrm, m_zoom, mbt_Curs, prefSize, rectangleBuffer, rectangleTracker, spt_DebDrag, tfldVEdge, tfldVNode, vedgeInEdition, vedgeNamePressed, vedgeNameSelected, vedgeSelected, vgraph, vgraphBuffer, vNodeCopy, vnodeCtxtMenu, vnodePressed, vnodeSelected, ZoomScale
 
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 aminePlatform.util.AmineConstants
ANALOGY, B_ASSIGN, B_DSPLY_WT_DELAY, B_DSPLY_WTT_DELAY, B_TRIGGER, B_WTT_DSPLY, BLOCK_BACKWARD_PROPAGATION, BLOCK_FORWARD_PROPAGATION, CANON, CGIF, CGRAPHIC, CHECK_PRECONDITIONS, COMPARE, COMPOSED_GOAL, CONCEPT_TYPE_IDENT, CONTEXT, COVERED_BY, CPLTE_CONTRACT, DEFINITION, EQ_OR_MORE_SPCFQ, EQUAL, EXPAND, FALSE_FOCUS_LIST, FUNCTIONAL, GENERALISE, GENERALIZE, HAVE_AN_INTERSECTION, ID_ADD, ID_DIV, ID_EQ, ID_INF, ID_IS, ID_MESSAGE, ID_MUL, ID_NOT, ID_NULL, ID_OPER_AND, ID_OPER_OR, ID_SUB, ID_SUP, IN_ACTIVATION, IN_MODE, IN_MODE2, INDIVIDUAL, INDIVIDUAL_IDENT, INTEGRATED, IS_CANONIC, KEY_GLOBAL_RULE, LC_ADD, LC_AMINE_BOOLEAN, LC_AMINE_DOUBLE, LC_AMINE_INTEGER, LC_AND, LC_BOOLEAN, LC_CG, LC_CLOSE_BRKT, LC_CLOSE_PARENT, LC_CLOSE_SET, LC_COMMA, LC_COMMA_SEMI, LC_CONCEPT, LC_CONSTRUCTOR, LC_CS, LC_CUT, LC_DIFF, LC_DIV, LC_DOUBLE, LC_DSBL_BKWRD_PRPGTN, LC_DSBL_FRWRD_PRPGTN, LC_EOF, LC_EQ, LC_FOUR_POINTS, LC_IDENTIFIER, LC_IF, LC_INF, LC_INTEGER, LC_INTEROG, LC_IS, LC_JAVA_OBJECT, LC_LEFT_ARROW, LC_LIST, LC_NULL, LC_OPEN_BRKT, LC_OPEN_PARENT, LC_OPEN_SET, LC_OPER_AND, LC_OPER_OR, LC_POINT, LC_RELATION, LC_RGHT_ARROW, LC_SEMI_COMMA, LC_SET, LC_STAR, LC_STATE, LC_STRING, LC_SUB, LC_SUP, LC_TERM, LC_TWO_POINTS, LC_VAR_LIST_CONSTRUCTOR, LC_VARIABLE, LF, MAXIMAL_JOIN, MORE_GENERAL, MORE_SPECIFIC, NOTHING_TO_INTEGRATE, OPERS_WITH_RSLT, OUT_MODE, OUT_MODE2, PARTIAL_CONTRACT, PARTIAL_SUBSUME, PRJCT_OPERS, PROJECT, READ, READ_SENTENCE, RELATION_TYPE_IDENT, S_AND, S_BOOLEAN, S_CG, S_CLOSE_BRKT, S_CLOSE_PARENT, S_CLOSE_SET, S_COMMA, S_CONCEPT, S_CONSTRUCTOR, S_CUT, S_DIFF, S_DOUBLE, S_EOF, S_EQUAL, S_EXPAND, S_FALSE, S_FOUR_POINTS, S_GENERALISE, S_GENERALIZE, S_IDENTIFIER, S_IF, S_INTEGER, S_INTEROG, S_IS, S_IS_CANONIC, S_LEFT_ARROW, S_LIST, S_MAXIMAL_JOIN, S_OPEN_BRKT, S_OPEN_PARENT, S_OPEN_SET, S_POINT, S_RGHT_ARROW, S_SEMI_COMMA, S_SOURCE, S_SPECIALIZE, S_STATE, S_STRING, S_SUBSUME, S_SUBSUME_WITH_RESULT, S_SUPER, S_TARGET, S_TERM, S_THIS, S_TRUE, S_TWO_POINTS, S_UNIFY, S_VARIABLE, SITUATION, SPECIALIZE, STEADY, SUBSUME, SUBSUME_WITH_RSLT, TRIGGER, UNCOMPARABLE, UNIFY, VAR_SUPER, WAIT_ASSIGNMENT, WAIT_END_OF_ASSIGNMENT, WAIT_PRECONDITIONS, WAIT_VALUE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CGDrawPanel(GraphDrawFrame graphDrawFrame, Lexicon lexicon)
           
 
Method Summary
 void copy()
          Copy the selected elements
 Edge createEdge()
          Create an Edge.
 Graph createGraph()
          Create a Graph.
protected  void cutWithoutBuffering()
           
 void displayContent(VisualNode vnode)
          Display the content of the specified Visual Node.
 void drawConcept(java.awt.Graphics g, Concept concept)
           
(package private)  void drawState(java.awt.Graphics g, VisualNode vnode)
           
 boolean drawVNode(java.awt.Graphics g, VisualNode vnode, Lexicon lexicon)
          Draw VisualNode.
 void ExeTreatVnode(java.lang.String contenu)
           
protected  java.lang.String getTxtInEdition(int caretPosition)
           
 boolean graphWithDrawingInf(Graph graph)
           
 void InitRelEnConstr()
           
protected  boolean insertText(java.lang.String s2Insert, int insertPosition)
           
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 resizeFrm()
          Resize the frame of the current GraphDrawPanel
protected  void selectElements(int caretPosition)
           
protected  void setElemsInTxtFldVEdge()
           
protected  void setIndividualElements()
           
protected  void setTypeElements()
          It should be redefined by subclasses of GraphDrawPanel
(package private)  void showLstStates()
           
protected  void treatVEdge(java.lang.String txt)
           
 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.
 
Methods inherited from class aminePlatform.guis.graphDrawing.GraphDrawPanel
canNodeBeEdited, clear, cut, finalize, getBorderForSelection, getFontSize, onMouseClicked, onMouseEntered, onMousePressed, rearrange, selectAll, selectVEdge, selectVEdgeName, selectVNode, setCursorTolinkMode, setCursorToModeCmd, setCursorToModeEdit, setCursorToModePaste, setCursorToModeZoom, setCursorTovedgeMode, setCursorTovnodeMode, SetFontSize, SetZoomScale, unselectTracker, unselectVEdge, unselectVEdgeName, unselectVNode, updateCursorMode, updateDeletingEdge, updateItemsNdeCtxtMn, updatePanels, updateScroll, updateTreePanel, vnodeClicked, vnodesInTracker, ZoomIn, 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

fontTxtFldBold

static final java.awt.Font fontTxtFldBold

lstStates

CGDrawPanel.JConceptStates lstStates

model

public javax.swing.DefaultListModel model

labelConcRef

public CGDrawPanel.LabelConc labelConcRef

graphDrawFrame

GraphDrawFrame graphDrawFrame
Constructor Detail

CGDrawPanel

public CGDrawPanel(GraphDrawFrame graphDrawFrame,
                   Lexicon lexicon)
Method Detail

InitRelEnConstr

public void InitRelEnConstr()

showLstStates

void showLstStates()

graphWithDrawingInf

public boolean graphWithDrawingInf(Graph graph)
Overrides:
graphWithDrawingInf in class GraphDrawPanel

paintComponent

public void paintComponent(java.awt.Graphics g)
Description copied from class: GraphDrawPanel
PaintComponent of the current GraphDrawPanel

Overrides:
paintComponent in class GraphDrawPanel
Parameters:
g - Graphics

copy

public void copy()
Description copied from class: GraphDrawPanel
Copy the selected elements

Overrides:
copy in class GraphDrawPanel

paste

public void paste()
Description copied from class: GraphDrawPanel
Paste the content of the buffer at the position specified by the attribute clickPoint

Overrides:
paste in class GraphDrawPanel

cutWithoutBuffering

protected void cutWithoutBuffering()
Overrides:
cutWithoutBuffering in class GraphDrawPanel

ExeTreatVnode

public void ExeTreatVnode(java.lang.String contenu)
                   throws java.lang.Exception
Overrides:
ExeTreatVnode in class GraphDrawPanel
Throws:
java.lang.Exception

treatVEdge

protected void treatVEdge(java.lang.String txt)
Overrides:
treatVEdge in class GraphDrawPanel

insertText

protected boolean insertText(java.lang.String s2Insert,
                             int insertPosition)
Overrides:
insertText in class GraphDrawPanel

getTxtInEdition

protected java.lang.String getTxtInEdition(int caretPosition)
Overrides:
getTxtInEdition in class GraphDrawPanel

selectElements

protected void selectElements(int caretPosition)
Overrides:
selectElements in class GraphDrawPanel

setTypeElements

protected void setTypeElements()
Description copied from class: GraphDrawPanel
It should be redefined by subclasses of GraphDrawPanel

Overrides:
setTypeElements in class GraphDrawPanel

setIndividualElements

protected void setIndividualElements()
Overrides:
setIndividualElements in class GraphDrawPanel

setElemsInTxtFldVEdge

protected void setElemsInTxtFldVEdge()
Overrides:
setElemsInTxtFldVEdge in class GraphDrawPanel

onMouseReleased

protected void onMouseReleased(java.awt.event.MouseEvent e)
Overrides:
onMouseReleased in class GraphDrawPanel

createEdge

public Edge createEdge()
Description copied from class: GraphDrawPanel
Create an Edge. This method does nothing here, it should be redefined in subclasses of GraphDrawPanel.

Overrides:
createEdge in class GraphDrawPanel
Returns:
an Edge

createGraph

public Graph createGraph()
Description copied from class: GraphDrawPanel
Create a Graph. This method does nothing here, it should be redefined in subclasses of GraphDrawPanel.

Overrides:
createGraph in class GraphDrawPanel
Returns:
a Graph

drawConcept

public void drawConcept(java.awt.Graphics g,
                        Concept concept)

drawVNode

public boolean drawVNode(java.awt.Graphics g,
                         VisualNode vnode,
                         Lexicon lexicon)
Description copied from class: GraphDrawPanel
Draw VisualNode. It should be redefined by subclasses of GraphDraPanel

Overrides:
drawVNode in class GraphDrawPanel

drawState

void drawState(java.awt.Graphics g,
               VisualNode vnode)

update

public void update(VisualNode vnode,
                   java.lang.String contenu,
                   java.awt.Rectangle rectangle)
            throws java.lang.Exception
Description copied from class: GraphDrawPanel
Update the specified vnode according to the new content (contenu) and with the new rectangle. This method does nothing here but it should be redefined in subclasses of GraphDrawPanel (for instance in CGDrawPanel and OntologyDrawPanel)

Overrides:
update in class GraphDrawPanel
Throws:
java.lang.Exception

resizeFrm

public void resizeFrm()
Resize the frame of the current GraphDrawPanel


displayContent

public void displayContent(VisualNode vnode)
Description copied from class: GraphDrawPanel
Display the content of the specified Visual Node. It should be redefined by subclasses of GraphDraPanel

Overrides:
displayContent in class GraphDrawPanel