|
|||||||||
| 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
simtools.diagram.DiagramComponent
simtools.diagram.test.TestComponent
public class TestComponent
A test implementation of an abstract diagram
| Nested Class Summary | |
|---|---|
class |
TestComponent.TestSelection
A model selection enables to select and edit several parts of a model diagram at a time |
class |
TestComponent.TestShape
|
class |
TestComponent.TestShapeLink
|
| Nested classes/interfaces inherited from class simtools.diagram.DiagramComponent |
|---|
DiagramComponent.ContextualDrawing, DiagramComponent.ContextualDrawingProvider |
| 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 |
|---|
| Fields inherited from class simtools.diagram.DiagramComponent |
|---|
_action, _autoScrollRect, _compoundEdit, _connection, _dashStroke, _defaultColor, _defaultStroke, _dragging, _dragPoint, _gridColor, _headerTitle, _inputConnector, _linking, _listenerList, _outputConnector, _param, _popup, _printSelectionOnly, _resizeWay, _selection, _selectionColor, _size, _translating, _undoHandler, _undoManager, autofit, canEdit, contextualDrawing, fullScreen, fullScreenDevice, fullScreenFrame, hasBeenModified, windowedModeParent |
| 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.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TestComponent()
|
|
| Method Summary | |
|---|---|
protected void |
copyAt(java.util.Vector v,
int x,
int y)
Copy clipboard at this point |
protected DiagramConnection |
createConnection(DiagramConnector input,
int x,
int y)
This method is called to create a new link |
void |
createSelection()
Creates a default diagram selection |
protected void |
drawClipboardElements(java.awt.Graphics2D g2,
java.awt.Point pMax)
This method is called by the drawDiagram method to perform the drawing of each clipboard elements |
protected void |
drawConnection(java.awt.Graphics2D g2,
java.awt.Point pMax)
This method is called by the drawDiagram method to perform the drawing of a new link |
protected void |
drawDiagramElements(java.awt.Graphics2D g2,
java.awt.Point pMax)
This method is called by the drawDiagram method to perform the drawing of each diagram elements |
protected void |
getMin(java.awt.Point p)
Gets the coordinates ot the element at the top left of the diagram |
void |
load()
|
void |
mousePressed(java.awt.event.MouseEvent _e)
|
void |
mouseReleased(java.awt.event.MouseEvent _e)
|
protected void |
performConnection(DiagramConnection c,
DiagramConnector input,
DiagramConnector output)
This method is called to connect a new link to its output connector |
protected void |
printDiagramElements(java.awt.Graphics2D g2,
java.awt.Point pMax)
This method is called by the drawDiagram method to perform the printing of each diagram elements |
protected void |
translate(int x,
int y)
Abstract method to translate the diagram elements |
protected void |
translateConnection(DiagramConnection c,
int dx,
int dy)
This method is called to move the end of the link after creation |
protected void |
translationEnd()
This method is called at the end of the transaltion of the selection i.e when the mouse is released |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, 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, updateUI |
| 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, 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, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TestComponent()
| Method Detail |
|---|
public void createSelection()
DiagramComponent
createSelection in class DiagramComponentpublic void load()
protected void translate(int x,
int y)
DiagramComponent
translate in class DiagramComponentx - translation value along the X axisy - translation value along the Y axispublic void mousePressed(java.awt.event.MouseEvent _e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class DiagramComponentpublic void mouseReleased(java.awt.event.MouseEvent _e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class DiagramComponentprotected void translationEnd()
DiagramComponent
translationEnd in class DiagramComponentprotected void getMin(java.awt.Point p)
DiagramComponent
getMin in class DiagramComponentp - the coordinates to be compared with the elements coordinates
and to be modified if an element has lower coordinates
protected void copyAt(java.util.Vector v,
int x,
int y)
copyAt in class DiagramComponentv - a vector of diagram elementsx - the x coordinate destinationy - the y coordinate destination
protected void drawDiagramElements(java.awt.Graphics2D g2,
java.awt.Point pMax)
DiagramComponent
drawDiagramElements in class DiagramComponentg2 - the current graphicspMax - the coordinates of the elements at the bottom right
protected void printDiagramElements(java.awt.Graphics2D g2,
java.awt.Point pMax)
DiagramComponent
printDiagramElements in class DiagramComponentg2 - the current graphicspMax - the coordinates of the elements at the bottom right
protected void drawClipboardElements(java.awt.Graphics2D g2,
java.awt.Point pMax)
DiagramComponent
drawClipboardElements in class DiagramComponentg2 - the current graphicspMax - the coordinates of the elements at the bottom right
protected void drawConnection(java.awt.Graphics2D g2,
java.awt.Point pMax)
DiagramComponent
drawConnection in class DiagramComponentg2 - the current graphicspMax - the coordinates of the elements at the bottom right
protected DiagramConnection createConnection(DiagramConnector input,
int x,
int y)
DiagramComponent
createConnection in class DiagramComponentinput - the input connectorx - the end link x coordinatey - the end link y coordinate
protected void translateConnection(DiagramConnection c,
int dx,
int dy)
DiagramComponent
translateConnection in class DiagramComponentc - the linkdx - the end link move along x axisdy - the end link moce along y axis
protected void performConnection(DiagramConnection c,
DiagramConnector input,
DiagramConnector output)
DiagramComponent
performConnection in class DiagramComponentc - the linkinput - the input connectoroutput - the output connector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||