|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
ikbs.tools.utils.IkbsPanel
ikbs.tools.utils.PanelBuffer
ikbs.tools.trees.GraphViewer
public class GraphViewer
IKBS - Panel d'affichage des arbres (sans action) Class GraphViewer : Panel générique pour la gestion et le formattage de graphe Définition de GraphViewer, sous classe de Canvas David Grosser - 28 Aout 1997
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
java.awt.Panel.AccessibleAWTPanel |
| 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 | |
|---|---|
protected boolean |
active
|
protected boolean |
affAttributs
|
static java.awt.Image |
backgroundPicture
|
static int |
BG_BOTTOM
|
static int |
BG_CENTER
|
static int |
BG_FITTED
|
static int |
BG_GRILLE
|
static int |
BG_LEFT
|
static int |
BG_NONE
|
static int |
BG_REPEAT
|
protected int |
bgAlignment
|
protected boolean |
drag
|
protected java.awt.Font |
fontAtt
|
protected java.awt.Font |
fontObj
|
protected java.awt.Font |
fontRel
|
protected Formatter |
formatter
|
static int |
FORMATTER_GD
|
static int |
FORMATTER_GD2
|
static int |
FORMATTER_GD3
|
static int |
FORMATTER_GD4
|
static int |
FORMATTER_GD5
|
static int |
FORMATTER_HB
|
protected int |
formeRelation
|
protected Information |
info
|
protected Noeud |
noeudRacine
|
protected java.util.Vector |
noeuds
|
protected Noeud |
noeudSelect
|
static int |
NORMAL
|
static int |
OFFSCREEN
|
protected boolean |
painted
|
protected boolean |
paintInfo
|
protected java.lang.String |
policeAtt
|
protected java.lang.String |
policeObj
|
protected java.lang.String |
policeRel
|
protected java.awt.Point |
pos
|
protected int |
posLien
|
protected java.awt.Rectangle |
rect
|
protected boolean |
relationMode
|
protected RelationSelect |
relationSelect
|
protected boolean |
select
|
protected boolean |
shadow
|
protected boolean |
shiftPressed
|
protected boolean |
showArrow
|
protected boolean |
showLabelRelation
|
protected int |
styleAtt
|
protected int |
styleObj
|
protected int |
styleRel
|
protected int |
x
|
protected int |
y
|
protected int |
zoom
|
protected ZoomViewer |
zoomCanvas
|
| Fields inherited from class ikbs.tools.utils.PanelBuffer |
|---|
doubleBuffer, offgraphics, offscreen, offscreensize |
| Fields inherited from class ikbs.tools.utils.IkbsPanel |
|---|
c |
| 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 | |
|---|---|
GraphViewer()
* Les constructeurs ** |
|
GraphViewer(java.util.Vector n)
|
|
| Method Summary | |
|---|---|
void |
activeTextRelations()
|
void |
addRect(java.awt.Rectangle r)
|
void |
affAttributs(boolean aff)
* Les méthodes pour gerer les attributs ** |
void |
afficherInfo(boolean b)
|
void |
affSousArbre(Noeud unNoeud,
boolean aff)
Affichage ou masquage des fils d'un noeud |
void |
affSousArbreRec(Noeud unNoeud,
boolean aff)
Affichage ou masquage récursif des fils d'un noeud |
int |
ajouterNoeud(Noeud unNoeud)
* Les méthodes pour gérer les noeuds ** |
void |
bougeNoeud(Noeud unNoeud,
int dx,
int dy)
|
void |
bougeNoeudRec(Noeud unNoeud,
int dx,
int dy)
Deplacer le sous arbre de racine unNoeud |
void |
bougeNoeudRecs(Noeud unNoeud,
int dx,
int dy)
|
void |
calculDimension(Noeud n)
Pour calculer la dimension d'un noeud |
void |
calculDimension(Relation r)
Pour calculer la dimension d'une relation |
void |
calculDimensionAtt(Noeud n)
Pour calculer la dimension de la liste d'attributs d'un noeud |
void |
calculDimensionObj(Noeud n)
|
void |
calculDimensionRel(Noeud n)
Pour calculer la dimension des relations d'un noeud |
void |
changeAffAttributs(Noeud n,
boolean aff)
|
void |
changeBgColor(java.awt.Color c)
/* Les methodes pour afficher l'arbre ** |
void |
changeBgColorAtt(java.awt.Color c)
|
void |
changeFormeRelation(int forme)
* Les méthodes pour gerer les relations ** |
void |
changeLabelColor(java.awt.Color c)
|
void |
changeLabelColorAtt(java.awt.Color c)
|
Noeud |
creerNoeud(int x,
int y)
|
Noeud |
creerNoeud(java.lang.String s)
|
Noeud |
creerNoeud(java.lang.String s,
int x,
int y)
|
Noeud |
creerNoeudRacine(java.lang.String s)
|
protected void |
demarquer()
Demarquer tous les noeuds |
protected void |
demarquer2()
|
void |
deplacer(int x,
int y)
Déplacement du canvas |
void |
desactiveTextRelations()
|
java.awt.Rectangle |
dimension()
Le rectangle englobant de tous les noeuds |
void |
drawZoom(java.awt.Graphics g,
java.awt.Dimension d)
Méthode surchargée |
void |
editer(Attribut a,
Noeud n)
|
void |
editer(Noeud n)
|
void |
effacerNoeud(int index)
|
void |
effacerNoeud(Noeud unNoeud)
|
void |
effacerNoeudsRec(Noeud unNoeud)
Effacement de tous les noeuds fils récursivement |
void |
formatter()
On applique la méthode de formattage |
void |
formatter2()
On applique la méthode de formattage en repositionnant la racine à son ancienne position |
void |
formatter3(Noeud noeudSelect)
formatter en laissant inchangé la position du noeud passé en paramètre |
static java.awt.Image |
getBackgroundPicture(java.awt.Image img)
retourne l'image à dessiner au fond |
java.awt.Frame |
getFrame()
Retourne la fenêtre englobante du composant qui implémente GetFrame |
java.lang.String |
getInfo()
|
Noeud |
getNoeudSelect()
Accès à la variable noeudSelect |
int |
getPosX()
|
int |
getPosY()
|
int |
getX()
|
int |
getY()
|
int |
getZoom()
|
int |
indexOf(Noeud unNoeud)
|
void |
init()
* Initialisation ** |
void |
initFont()
Initialisation des fontes des objets, des attributs et des relations |
void |
initRelation(Relation r)
|
protected void |
marquer()
Gestion du premier marqueur (pour éviter les cycles lors d'un parcours récursif) |
protected void |
marquer2()
|
protected int |
nbNoeuds()
* Les méthodes d'accès aux composants du canvas ** |
Noeud |
noeudRacine()
Accès à la racine de l'arbre |
protected java.util.Vector |
noeuds()
|
Noeud |
noeuds(int i)
|
void |
paint(java.awt.Graphics g)
Méthode utilisée pour dessiner l'arbre (la portion comprise dans rect) aux coordonnées relatives (xRel, yRel) |
void |
paint(java.awt.Graphics g,
java.awt.Rectangle rect,
int mode)
Dessiner les composants aux coordonnées réelles |
void |
paintBackground(java.awt.Graphics g)
dessine le fond de l'écran |
void |
posLienRelations(int pos)
|
void |
putLastPosition(Noeud unNoeud)
Positionne le noeud |
void |
reCalculDimension()
Pour recalculer la dimension de tous les noeuds |
void |
recentre(int x,
int y)
|
void |
recentre(Noeud unNoeud)
Permet de recentrer le canvas au coordonnées du noeud |
int |
rechNoeud(int x,
int y)
Retourne l'index du noeud cliqué. -1 si on ne clic pas sur un noeud |
int |
rechNoeud(java.lang.String s)
|
java.awt.Rectangle |
rect()
|
void |
refreshNoeud(Noeud o)
Pour rafraichir l'affichage d'un noeud et ses attributs |
void |
rePositionne(int x,
int y)
permet de repositionner le canvas au coordonnées x y |
static void |
setBackgroundPicture(java.awt.Image img)
|
void |
setBgAlignment(java.lang.String salign)
|
void |
setFormatter(int i)
Choix de la méthode de formattage |
void |
setInfo(java.lang.String s)
|
protected void |
setNoeuds(java.util.Vector n)
|
void |
setNoeudSelect(Noeud s)
Affectation de la variable noeudSelect |
void |
setPoliceAtt(java.lang.String p)
|
void |
setPoliceObj(java.lang.String p)
|
void |
setPoliceRel(java.lang.String p)
|
void |
setPosClic(int x,
int y)
* Les méthodes d'accès aux paramètres graphiques du canvas ** |
void |
setPosX(int x)
|
void |
setPosY(int y)
|
void |
setRacine(Noeud unNoeud)
Elimine l'ancienne racine et positionne la nouvelle racine |
void |
setRect(Noeud n)
|
void |
setRect(java.awt.Rectangle r)
|
void |
setRect(Relation r)
Affectation de la zone à rafraichir |
void |
setShowArrow(boolean b)
|
void |
setStyleAtt(int p)
|
void |
setStyleObj(int p)
|
void |
setStyleRel(int p)
|
void |
setX(int x)
|
void |
setY(int y)
|
void |
setZoom(int zoom)
|
void |
setZoomViewer(ZoomViewer zc)
|
void |
update(java.util.Observable o,
java.lang.Object args)
Implémente Observer |
void |
ZM()
|
ZoomViewer |
zoomCanvas()
|
void |
ZP()
|
| Methods inherited from class ikbs.tools.utils.PanelBuffer |
|---|
dispose, getDoubleBuffer, initOffGraphics, offscreen, setBounds, setDoubleBuffer, update |
| Methods inherited from class ikbs.tools.utils.IkbsPanel |
|---|
adaptedSize, initGridBagConstraint, xyPosition, xyPosition |
| 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, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, 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, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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 static final int FORMATTER_GD
public static final int FORMATTER_GD2
public static final int FORMATTER_GD3
public static final int FORMATTER_GD4
public static final int FORMATTER_GD5
public static final int FORMATTER_HB
public static final int NORMAL
public static final int OFFSCREEN
public static java.awt.Image backgroundPicture
public static final int BG_REPEAT
public static final int BG_CENTER
public static final int BG_FITTED
public static final int BG_LEFT
public static final int BG_NONE
public static final int BG_BOTTOM
public static final int BG_GRILLE
protected int x
protected int y
protected java.awt.Point pos
protected java.util.Vector noeuds
protected Noeud noeudSelect
protected Noeud noeudRacine
protected RelationSelect relationSelect
protected boolean select
protected boolean relationMode
protected boolean shiftPressed
protected int zoom
protected int formeRelation
protected java.lang.String policeObj
protected java.lang.String policeAtt
protected java.lang.String policeRel
protected int styleObj
protected int styleAtt
protected int styleRel
protected java.awt.Font fontObj
protected java.awt.Font fontAtt
protected java.awt.Font fontRel
protected java.awt.Rectangle rect
protected int bgAlignment
protected boolean drag
protected boolean painted
protected boolean shadow
protected boolean paintInfo
protected boolean active
protected boolean showArrow
protected boolean affAttributs
protected boolean showLabelRelation
protected int posLien
protected Formatter formatter
protected ZoomViewer zoomCanvas
protected Information info
| Constructor Detail |
|---|
public GraphViewer()
public GraphViewer(java.util.Vector n)
| Method Detail |
|---|
public void init()
public void setPosClic(int x,
int y)
public int getX()
getX in class java.awt.Componentpublic void setX(int x)
public int getY()
getY in class java.awt.Componentpublic void setY(int y)
public java.awt.Rectangle rect()
public void setRect(java.awt.Rectangle r)
public void addRect(java.awt.Rectangle r)
public void setZoom(int zoom)
public int getZoom()
public int getPosX()
public int getPosY()
public void setPosX(int x)
public void setPosY(int y)
public java.awt.Frame getFrame()
GetFrame
getFrame in interface GetFramegetFrame in class IkbsPanelpublic void setZoomViewer(ZoomViewer zc)
public ZoomViewer zoomCanvas()
public void setInfo(java.lang.String s)
public java.lang.String getInfo()
public void setNoeudSelect(Noeud s)
public Noeud getNoeudSelect()
protected int nbNoeuds()
protected java.util.Vector noeuds()
protected void setNoeuds(java.util.Vector n)
public Noeud noeuds(int i)
public void setShowArrow(boolean b)
public int ajouterNoeud(Noeud unNoeud)
public Noeud creerNoeud(int x,
int y)
public Noeud creerNoeud(java.lang.String s,
int x,
int y)
public Noeud creerNoeud(java.lang.String s)
public void editer(Noeud n)
public void editer(Attribut a,
Noeud n)
public void calculDimension(Noeud n)
public void calculDimensionObj(Noeud n)
public void calculDimensionAtt(Noeud n)
public void calculDimensionRel(Noeud n)
public void calculDimension(Relation r)
public void reCalculDimension()
public Noeud noeudRacine()
public void setRacine(Noeud unNoeud)
public Noeud creerNoeudRacine(java.lang.String s)
public void initRelation(Relation r)
public int indexOf(Noeud unNoeud)
public void effacerNoeud(int index)
public void effacerNoeud(Noeud unNoeud)
public void effacerNoeudsRec(Noeud unNoeud)
public int rechNoeud(int x,
int y)
public int rechNoeud(java.lang.String s)
public void bougeNoeudRec(Noeud unNoeud,
int dx,
int dy)
public void bougeNoeudRecs(Noeud unNoeud,
int dx,
int dy)
public void bougeNoeud(Noeud unNoeud,
int dx,
int dy)
public void putLastPosition(Noeud unNoeud)
en - dernière positionprotected void marquer()
protected void demarquer()
protected void marquer2()
protected void demarquer2()
public void changeFormeRelation(int forme)
public void activeTextRelations()
public void desactiveTextRelations()
public void afficherInfo(boolean b)
public void posLienRelations(int pos)
public void affSousArbre(Noeud unNoeud,
boolean aff)
public void affSousArbreRec(Noeud unNoeud,
boolean aff)
public void affAttributs(boolean aff)
public void changeAffAttributs(Noeud n,
boolean aff)
public void changeBgColor(java.awt.Color c)
public void changeBgColorAtt(java.awt.Color c)
public void changeLabelColor(java.awt.Color c)
public void changeLabelColorAtt(java.awt.Color c)
public void setPoliceObj(java.lang.String p)
public void setStyleObj(int p)
public void setPoliceAtt(java.lang.String p)
public void setStyleAtt(int p)
public void setPoliceRel(java.lang.String p)
public void setStyleRel(int p)
public void ZP()
public void ZM()
public java.awt.Rectangle dimension()
public void initFont()
public void paint(java.awt.Graphics g)
paint in class java.awt.Container
public void paint(java.awt.Graphics g,
java.awt.Rectangle rect,
int mode)
public static void setBackgroundPicture(java.awt.Image img)
public static java.awt.Image getBackgroundPicture(java.awt.Image img)
public void paintBackground(java.awt.Graphics g)
public void setBgAlignment(java.lang.String salign)
public void drawZoom(java.awt.Graphics g,
java.awt.Dimension d)
drawZoom in class PanelBufferpublic void setRect(Noeud n)
public void setRect(Relation r)
public void recentre(int x,
int y)
public void recentre(Noeud unNoeud)
public void deplacer(int x,
int y)
public void rePositionne(int x,
int y)
public void formatter()
public void formatter2()
public void formatter3(Noeud noeudSelect)
public void setFormatter(int i)
public void refreshNoeud(Noeud o)
public void update(java.util.Observable o,
java.lang.Object args)
update in interface java.util.Observer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||