ikbs.tools.trees
Class Relation

java.lang.Object
  extended by java.util.Observable
      extended by ikbs.tools.trees.Composant
          extended by ikbs.tools.trees.Relation
All Implemented Interfaces:
Selectable
Direct Known Subclasses:
RelationCompo, RelationHeritage, RelationSelect

public class Relation
extends Composant
implements Selectable

IKBS - Editeur d'arbre de description Définition de la hierarchie des classes relation David Grosser - Mars 1997 - IREMIA, Université de la Réunion Version 1.0 Revu le 7/04/97


Field Summary
protected static double angleArrow
           
protected static java.awt.Color backgroundColor
           
static boolean decalage2dPoint
           
static boolean doubleTrait
           
protected  Noeud extremite
           
protected  int forme
           
static int FORME_DROITE
           
static int FORME_ESCALIER
           
 java.awt.Color normal_color
           
protected static int numRel
           
protected  Noeud origine
           
protected  int posLien
           
protected  boolean selected
           
protected  boolean showArrow
           
protected static int widthArrow
           
 
Fields inherited from class ikbs.tools.trees.Composant
bgColor, cible_color, dimension, heightLabel, label, labelColor, shadow_color, shadowSize, show, widthLabel, x, y
 
Constructor Summary
Relation()
           
Relation(Noeud noeud1, Noeud noeud2)
           
Relation(Noeud noeud1, Noeud noeud2, java.lang.String nom)
           
Relation(Noeud noeud1, Noeud noeud2, java.lang.String nom, java.awt.FontMetrics fm)
           
 
Method Summary
 void calculDimension(java.awt.FontMetrics fm)
           
 Noeud extremite()
           
 boolean getClicked()
          L'objet est-il cliqué
protected  int getDecalage2dPoint()
           
 boolean getSelected()
          retourne true si l'objet est sélectionné
 int height()
           
 java.awt.Point infDroit()
           
 int infDroitX()
           
 int infDroitY()
           
protected  void init()
           
 java.lang.String labelExtremite()
           
 java.lang.String labelOrigine()
           
 boolean lieA(Noeud unNoeud)
           
 Noeud origine()
           
 void paint(java.awt.Graphics g, int xRel, int yRel)
           
 void paint1(java.awt.Graphics g, int xRel, int yRel)
          Relation dessinée en forme droite
 void paint2(java.awt.Graphics g, int xRel, int yRel)
          Relation dessinée en escalier
 void paintArrow(java.awt.Graphics g, int x1, int y1, int x2, int y2)
          Pour dessiner la flêche (x1, y1) : coordonnées du point d'origine (x2, y2) : coordonnées du point destination
 int posLien()
           
 java.awt.Rectangle rect()
           
static void setBackgroundColor(java.awt.Color c)
           
 void setClicked(boolean b)
          L'objet est cliqué
 void setExtremite(Noeud unNoeud)
           
 void setForme(int i)
           
 void setOrigine(Noeud unNoeud)
           
 void setPosLien(int i)
           
 void setSelected(boolean b)
          L'objet est sélectionné
 void setShowArrow(boolean b)
           
 java.awt.Point supGauche()
           
 int supGaucheX()
           
 int supGaucheY()
           
 int width()
           
 int widthLabel()
           
 
Methods inherited from class ikbs.tools.trees.Composant
bgColor, dansRect, dimension, getInfo, getLabel, heightLabel, hideLabel, labelColor, paintShadow, pos, setBgColor, setDimension, setHeight, setHeightLabel, setLabel, setLabelColor, setPos, setPos, setPos, setWidth, setWidthLabel, setX, setY, showed, showLabel, sourisDans, toString, x, xd, y
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ikbs.tools.trees.Selectable
getLabel
 

Field Detail

FORME_ESCALIER

public static final int FORME_ESCALIER
See Also:
Constant Field Values

FORME_DROITE

public static final int FORME_DROITE
See Also:
Constant Field Values

decalage2dPoint

public static boolean decalage2dPoint

doubleTrait

public static boolean doubleTrait

backgroundColor

protected static java.awt.Color backgroundColor

numRel

protected static int numRel

widthArrow

protected static int widthArrow

angleArrow

protected static double angleArrow

origine

protected Noeud origine

extremite

protected Noeud extremite

posLien

protected int posLien

showArrow

protected boolean showArrow

selected

protected boolean selected

forme

protected int forme

normal_color

public java.awt.Color normal_color
Constructor Detail

Relation

public Relation()

Relation

public Relation(Noeud noeud1,
                Noeud noeud2)

Relation

public Relation(Noeud noeud1,
                Noeud noeud2,
                java.lang.String nom)

Relation

public Relation(Noeud noeud1,
                Noeud noeud2,
                java.lang.String nom,
                java.awt.FontMetrics fm)
Method Detail

init

protected void init()

setBackgroundColor

public static void setBackgroundColor(java.awt.Color c)

getSelected

public boolean getSelected()
Description copied from interface: Selectable
retourne true si l'objet est sélectionné

Specified by:
getSelected in interface Selectable

setSelected

public void setSelected(boolean b)
Description copied from interface: Selectable
L'objet est sélectionné

Specified by:
setSelected in interface Selectable

getClicked

public boolean getClicked()
Description copied from interface: Selectable
L'objet est-il cliqué

Specified by:
getClicked in interface Selectable

setClicked

public void setClicked(boolean b)
Description copied from interface: Selectable
L'objet est cliqué

Specified by:
setClicked in interface Selectable

origine

public Noeud origine()

extremite

public Noeud extremite()

setOrigine

public void setOrigine(Noeud unNoeud)

setExtremite

public void setExtremite(Noeud unNoeud)

labelOrigine

public java.lang.String labelOrigine()

labelExtremite

public java.lang.String labelExtremite()

widthLabel

public int widthLabel()
Overrides:
widthLabel in class Composant

setShowArrow

public void setShowArrow(boolean b)

calculDimension

public void calculDimension(java.awt.FontMetrics fm)

setForme

public void setForme(int i)

posLien

public int posLien()

setPosLien

public void setPosLien(int i)

lieA

public boolean lieA(Noeud unNoeud)

supGaucheX

public int supGaucheX()

supGaucheY

public int supGaucheY()

supGauche

public java.awt.Point supGauche()

infDroitX

public int infDroitX()

infDroitY

public int infDroitY()

infDroit

public java.awt.Point infDroit()

width

public int width()
Overrides:
width in class Composant

height

public int height()
Overrides:
height in class Composant

rect

public java.awt.Rectangle rect()
Specified by:
rect in class Composant

paintArrow

public void paintArrow(java.awt.Graphics g,
                       int x1,
                       int y1,
                       int x2,
                       int y2)
Pour dessiner la flêche (x1, y1) : coordonnées du point d'origine (x2, y2) : coordonnées du point destination


paint

public void paint(java.awt.Graphics g,
                  int xRel,
                  int yRel)

getDecalage2dPoint

protected int getDecalage2dPoint()

paint1

public void paint1(java.awt.Graphics g,
                   int xRel,
                   int yRel)
Relation dessinée en forme droite


paint2

public void paint2(java.awt.Graphics g,
                   int xRel,
                   int yRel)
Relation dessinée en escalier