mascoptLib.gui.views
Class Link

java.lang.Object
  |
  +--java.awt.Component
        |
        +--mascoptLib.gui.views.GObject
              |
              +--mascoptLib.gui.views.Link
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
ArrowedLink

public class Link
extends GObject

A link graphical object.

Version:
Thu Mar 21 18:38:16 2002
Author:
bbongiov@bing.inria.fr
See Also:
Serialized Form

Field Summary
 Color color
           
 
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
Link(mascoptLib.gui.views.GObject source, mascoptLib.gui.views.GObject target, Color color)
          Construct a link.
Link(mascoptLib.gui.views.GObject source, mascoptLib.gui.views.GObject target, Color color, int shift)
          Construct a link.
Link(mascoptLib.gui.views.GObject source, mascoptLib.gui.views.GObject target, int offSetSourceX, int offSetSourceY, int offSetTargetX, int offSetTargetY, Color color)
          Construct a link.
Link(mascoptLib.gui.views.GObject source, mascoptLib.gui.views.GObject target, int offSetSourceX, int offSetSourceY, int offSetTargetX, int offSetTargetY, Color color, int shift)
          Construct a link.
 
Method Summary
 boolean contains(int x, int y)
          Say if this link is pointed by (x,y).
 Color getColor()
          Returns the color of the link.
 int getShift()
          Give the shift for this link.
 mascoptLib.gui.views.GObject getSource()
          Return the source of the link.
 mascoptLib.gui.views.GObject getTarget()
          Return the target of the link.
 void paint(Graphics g)
          Repaint this link.
 void setColor(Color c)
          Change the color of the link.
 void setLocation(int x, int y)
          Deprecated. not implemented !
 void setShift(int s)
          Change the shift between links.
 
Methods inherited from class mascoptLib.gui.views.GObject
repaint, translate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

color

public Color color
Constructor Detail

Link

public Link(mascoptLib.gui.views.GObject source,
            mascoptLib.gui.views.GObject target,
            Color color)
Construct a link.

Parameters:
source - from this source.
target - to this target.
color - with this color.

Link

public Link(mascoptLib.gui.views.GObject source,
            mascoptLib.gui.views.GObject target,
            Color color,
            int shift)
Construct a link.

Parameters:
source - from this source.
target - to this target.
color - with this color.
shift - with this shift.

Link

public Link(mascoptLib.gui.views.GObject source,
            mascoptLib.gui.views.GObject target,
            int offSetSourceX,
            int offSetSourceY,
            int offSetTargetX,
            int offSetTargetY,
            Color color)
Construct a link.

Parameters:
source - from this source.
target - to this target.
offSetSourceX - move the X coordinates of the source
offSetSourceY - move the Y coordinates of the source
offSetTargetX - move the X coordinates of the target
offSetTargetY - move the Y coordinates of the target
color - with this color

Link

public Link(mascoptLib.gui.views.GObject source,
            mascoptLib.gui.views.GObject target,
            int offSetSourceX,
            int offSetSourceY,
            int offSetTargetX,
            int offSetTargetY,
            Color color,
            int shift)
Construct a link.

Parameters:
source - from this source.
target - to this target.
offSetSourceX - move the X coordinates of the source
offSetSourceY - move the Y coordinates of the source
offSetTargetX - move the X coordinates of the target
offSetTargetY - move the Y coordinates of the target
color - whith this color
shift - whith this shift
Method Detail

setLocation

public void setLocation(int x,
                        int y)
Deprecated. not implemented !

move this link.

Overrides:
setLocation in class Component
Parameters:
x -
y -

getSource

public mascoptLib.gui.views.GObject getSource()
Return the source of the link.

Returns:
a GObject.

getTarget

public mascoptLib.gui.views.GObject getTarget()
Return the target of the link.

Returns:
a GObject.

contains

public boolean contains(int x,
                        int y)
Say if this link is pointed by (x,y).

Overrides:
contains in class Component
Parameters:
x - the x coordinate
y - the y coordinate
Returns:
true if it is pointed.

setColor

public void setColor(Color c)
Change the color of the link.

Parameters:
c - the color.

getColor

public Color getColor()
Returns the color of the link.

Returns:
the color.

setShift

public void setShift(int s)
Change the shift between links.

Parameters:
s - the distance in pixels.

getShift

public int getShift()
Give the shift for this link.

Returns:
the distance in pixels.

paint

public void paint(Graphics g)
Repaint this link.

Overrides:
paint in class Component
Parameters:
g - the graphic.