|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--menu.menuComponent
|
+--menu.Node
Node class represents a generic node of a menu. Each node has an image and a name.
When the node is painted, the name is printed near the image.
A node can represent, for example, a class of a UML class diagram, an actor of a UML use cases diagram, etc.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| 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 | |
java.awt.Dimension |
NODE_IMAGE_SIZE
|
| Fields inherited from class menu.menuComponent |
bounds |
| 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 | |
Node()
Constructor. |
|
| Method Summary | |
void |
add(Node node)
Adds a sub-node to this node. |
void |
computeBounds()
Computes the bounds of the node. |
java.awt.Dimension |
getMinimumSize()
Determines the minimum size of the node. |
java.lang.String |
getName()
Gets the name of the node. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of the node. |
java.lang.String |
getType()
Gets the type of the node (e.g.: class, actor, use_case etc.). |
java.lang.String |
getXmiId()
Gets the ID of the node. |
java.lang.String |
getXmiUuid()
Gets the UUID (Universally Unique IDentifier) of the node. |
boolean |
hasChildren()
Determines if this node has sub-nodes. |
boolean |
isClosed()
Gets the visibility status of this node. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Method from interface java.awt.event.MouseListener.
|
void |
paint(java.awt.Graphics g)
|
void |
setClosed(boolean closed)
Sets the visibility status of this node. |
void |
setName(java.lang.String name)
Sets the name of the node. |
void |
setType(java.lang.String type)
Sets the type of the node (e.g.: class, actor, use_case etc.). |
void |
setXmi(XMI Xmi)
Sets a reference to the object menu.XMI. |
void |
setXmiId(java.lang.String xmiId)
Sets the ID of the node. |
void |
setXmiUuid(java.lang.String xmiUuid)
Sets the UUID (Universally Unique IDentifier) of the node. |
void |
update(java.awt.Graphics g)
|
| Methods inherited from class menu.menuComponent |
mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, 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 |
public final java.awt.Dimension NODE_IMAGE_SIZE
| Constructor Detail |
public Node()
| Method Detail |
public void setName(java.lang.String name)
setName in class java.awt.Componentpublic java.lang.String getName()
getName in class java.awt.Componentname the name of the node.public void setType(java.lang.String type)
public java.lang.String getType()
type the type of the node.public void setXmiId(java.lang.String xmiId)
xmi.id).
public java.lang.String getXmiId()
xmi.id).
xmiId the ID of the node.public void setXmiUuid(java.lang.String xmiUuid)
xmi.uuid).
public java.lang.String getXmiUuid()
xmi.uuid).
xmiUuid the UUID of the node.public void setXmi(XMI Xmi)
menu.XMI.
public void setClosed(boolean closed)
true, the corresponding switch is closed and the node is not visible.
public boolean isClosed()
true, the corresponding switch is closed and the node is not visible.
closed the visibility status.public boolean hasChildren()
hasChildren true if this node has sub-nodes.public java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.ContainerpreferredSize the preferred size of the node.public java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.ContainerminimumSize the minimum size of the node.public void add(Node node)
public void update(java.awt.Graphics g)
update in class java.awt.Containerpublic void paint(java.awt.Graphics g)
paint in class java.awt.Containerpublic void computeBounds()
computeBounds in class menuComponentpublic void mouseClicked(java.awt.event.MouseEvent e)
java.awt.event.MouseListener.
This method manages mouse clicks.
When a node is clicked the correnspondig component in the UML diagram is activated and is selected in the data dictionary.
If the correnspondig component is a class or an interface of a UML class diagram, the code is selected in the code generator.
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class menuComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||