svg.groups
Class SVGActivableGroup

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--svg.groups.SVGGroup
                    |
                    +--svg.groups.SVGActivableGroup
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
SVGActorGroup, SVGAssociationGroup, SVGClassGroup, SVGGeneralizationGroup, SVGInterfaceGroup, SVGLinkGroup, SVGObjectGroup, SVGPackageGroup, SVGRealizationGroup, SVGUseCaseGroup

public class SVGActivableGroup
extends SVGGroup

SVGActivableGroup class represents a group defined in a SVG document (<g> tag), that can be activated in some way. Each group contains the definition of the graphical objects that make up a more sophisticated object (for example an element of a UML diagram). A basic way to activate the group is provided by the methods activate and deactivate. Subclasses need to override these methods for implementing more sophisticated activations.

See Also:
Serialized Form

Nested Class Summary
 
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.Rectangle groupBounds
           
protected  SVGPanel parent
           
 
Fields inherited from class svg.groups.SVGGroup
components, messageLocation, name, size, type, uuid
 
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
SVGActivableGroup()
          Constructor.
 
Method Summary
 void activate()
          Provides a basic way for activating the group: it simply fills all the component using yellow.
 void add(SVGEllipse ellipse)
          Adds an ellipse to the group.
 void add(SVGPolyline polyline)
          Adds a polyline to the group.
 void add(SVGRect rect)
          Adds a rectangle to the group.
 void deactivate()
          Provides a basic way for deactivating the group.
 int[][] fillMap(int[][] diagramMap, int groupId)
          Returns a map containint all the points of the region occupied by this group.
 java.awt.Rectangle getBounds()
          Gets the bounds of the group.
 void setParent(SVGPanel parent)
          Sets the object that added this group, i.e.
 
Methods inherited from class svg.groups.SVGGroup
add, add, add, getMessage, getName, getType, getUuid, paint, printMessage, setName, setSize, setType, setUuid, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, 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, getAccessibleContext, getBackground, 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, 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

groupBounds

protected java.awt.Rectangle groupBounds

parent

protected SVGPanel parent
Constructor Detail

SVGActivableGroup

public SVGActivableGroup()
Constructor.

Method Detail

add

public void add(SVGRect rect)
Adds a rectangle to the group. Overrides the same method from class SVGGroup.

Overrides:
add in class SVGGroup

add

public void add(SVGEllipse ellipse)
Adds an ellipse to the group. Overrides the same method from class SVGGroup.

Overrides:
add in class SVGGroup

add

public void add(SVGPolyline polyline)
Adds a polyline to the group. Overrides the same method from class SVGGroup.

Overrides:
add in class SVGGroup

getBounds

public java.awt.Rectangle getBounds()
Gets the bounds of the group.

Overrides:
getBounds in class java.awt.Component

setParent

public void setParent(SVGPanel parent)
Sets the object that added this group, i.e. SVGPanel.


fillMap

public int[][] fillMap(int[][] diagramMap,
                       int groupId)
Returns a map containint all the points of the region occupied by this group.

Returns:
diagramMap the filled map for this group.

activate

public void activate()
Provides a basic way for activating the group: it simply fills all the component using yellow.


deactivate

public void deactivate()
Provides a basic way for deactivating the group.