com.bonevich.erj.diagram
Class FigRelation

java.lang.Object
  |
  +--org.tigris.gef.presentation.Fig
        |
        +--org.tigris.gef.presentation.FigGroup
              |
              +--org.tigris.gef.presentation.FigNode
                    |
                    +--com.bonevich.erj.diagram.FigRelation
All Implemented Interfaces:
java.lang.Cloneable, ErjConstants, java.util.EventListener, org.tigris.gef.ui.Highlightable, java.awt.event.MouseListener, org.tigris.gef.ui.PopupGenerator, java.beans.PropertyChangeListener, java.io.Serializable

public class FigRelation
extends org.tigris.gef.presentation.FigNode
implements ErjConstants

A subclass of FigNode that presents tht view of a Relation

See Also:
Serialized Form

Field Summary
static int ROUTING_MARGIN
           
 
Fields inherited from class org.tigris.gef.presentation.FigNode
_blinkPorts, _figEdges, _highlight, ang135, ang225, ang315, ang45
 
Fields inherited from class org.tigris.gef.presentation.FigGroup
_dynObjects, _figs
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _displayed, _fillColor, _filled, _group, _h, _layer, _lineColor, _lineWidth, _locked, _resource, _shown, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, DASH_ARRAYS, DASHED_CHOICES, MIN_SIZE
 
Fields inherited from interface com.bonevich.erj.ErjConstants
EDITOR_COLOR, EDITOR_FONT, EMPTY_STR, ICON_AK, ICON_DOMAIN, ICON_FK, ICON_FOREIGNKEY, ICON_NOTNULL, ICON_NULL, ICON_PK, ICON_RELATION, ICON_SCHEMA, ICON_SPLASH, INITIAL_FRAME_SIZE, LABEL_COLOR, LABEL_FILL, LABEL_FONT, LABEL_FONT_ITALIC, LABEL_FONT_SIZE, LABEL_FONTMETRICS, STATUSBAR_COLOR, STATUSBAR_FONT, STATUSBAR_FONT_ITALIC, STATUSBAR_MOD_FILL, SUBLABEL_FILL
 
Constructor Summary
FigRelation()
           
FigRelation(org.tigris.gef.graph.GraphModel gm, java.lang.Object node)
           
 
Method Summary
 void delete()
           
 void dispose()
           
 java.awt.Dimension getMinimumSize()
           
 java.util.Vector getPopUpActions(java.awt.event.MouseEvent e)
           
 int getSector(java.awt.Point p)
          Reply the point's sector within the current view.
 void mouseClicked(java.awt.event.MouseEvent e)
          Open the default editor for this node's Relation.
 java.awt.Rectangle routingRect()
          Reply a rectangle that arcs should not route through.
 void setBounds(int x, int y, int w, int h)
           
 void setOwner(java.lang.Object own)
           
 
Methods inherited from class org.tigris.gef.presentation.FigNode
addFigEdge, bindPort, cleanUp, clone, contains, deepHitPort, endTrans, getBlinkPorts, getFigEdges, getHighlight, getPortFig, getPortFigs, getPortSector, hidePorts, hit, hitPort, hitPort, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, postLoad, propertyChange, removeFigEdge, removePort, setBlinkPorts, setEnclosingFig, setHighlight, showPorts, startTrans, superTranslate, translate, updateEdges
 
Methods inherited from class org.tigris.gef.presentation.FigGroup
addFig, calcBounds, elements, getDisplayedFigs, getFigs, getFillColor, getFilled, getFont, getFontFamily, getFontSize, getLineColor, getLineWidth, getPrivateData, getTextColor, getTextFillColor, getTextFilled, hitFig, isReshapable, isResizable, isRotatable, parseDynObjects, removeAll, removeFig, setFigs, setFillColor, setFilled, setFont, setFontFamily, setFontSize, setLineColor, setLineWidth, setPrivateData, setTextColor, setTextFillColor, setTextFilled
 
Methods inherited from class org.tigris.gef.presentation.Fig
addAnnotation, addPoint, addPropertyChangeListener, align, center, classNameAndBounds, connectionPoint, contains, contains, countCornersContained, createDrag, damage, drawDashedLine, drawDashedPerimeter, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLocation, getLocked, getNumPoints, getOwner, getPerimeterLength, getPoints, getPoints, getPreferedSize, getResource, getSize, getTipString, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, initAnnotations, insertPoint, intersects, isAnnotation, isDisplayed, isLowerRightResizable, isMovable, makeSelection, OK, pointAlongPerimeter, postSave, preSave, print, removeAnnotation, removePoint, removePropertyChangeListener, reorder, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setCenter, setContext, setDashed, setDashedString, setDisplayed, setGroup, setHandleBox, setHeight, setLayer, setLocation, setLocation, setLocked, setNumPoints, setPoints, setPoints, setPoints, setPoints, setPoints, setResource, setSavingAllowed, setSize, setSize, setVisState, setWidth, setX, setXs, setY, setYs, stuffBounds, stuffPointAlongPerimeter, unsetAnnotationOwner, updateAnnotationPositions, updateVisState, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tigris.gef.ui.Highlightable
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

ROUTING_MARGIN

public static final int ROUTING_MARGIN
See Also:
Constant Field Values
Constructor Detail

FigRelation

public FigRelation()

FigRelation

public FigRelation(org.tigris.gef.graph.GraphModel gm,
                   java.lang.Object node)
Method Detail

setOwner

public void setOwner(java.lang.Object own)
Overrides:
setOwner in class org.tigris.gef.presentation.FigNode

delete

public void delete()
Overrides:
delete in class org.tigris.gef.presentation.FigNode

dispose

public void dispose()
Overrides:
dispose in class org.tigris.gef.presentation.FigNode

getPopUpActions

public java.util.Vector getPopUpActions(java.awt.event.MouseEvent e)
Specified by:
getPopUpActions in interface org.tigris.gef.ui.PopupGenerator
Overrides:
getPopUpActions in class org.tigris.gef.presentation.Fig

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class org.tigris.gef.presentation.Fig

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Overrides:
setBounds in class org.tigris.gef.presentation.FigNode

routingRect

public java.awt.Rectangle routingRect()
Reply a rectangle that arcs should not route through. Basically this is the bounding box plus some margin around all egdes.

Overrides:
routingRect in class org.tigris.gef.presentation.Fig

getSector

public int getSector(java.awt.Point p)
Reply the point's sector within the current view. This version works with both square and non-square FigNodes.
Sectors
		      \  1   /
		       \    /
		        \  /
		     2   \/   -2
		         /\
		        /  \
		       /    \
		      /  -1  \ 


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Open the default editor for this node's Relation.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class org.tigris.gef.presentation.FigNode


Copyright © 2001-2003 bonevich.com. All Rights Reserved.