|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.swingui.PlayPenComponent
ca.sqlpower.architect.swingui.Relationship
public class Relationship
| Nested Class Summary | |
|---|---|
protected static class |
Relationship.RelationshipDecorationMover
The RelationshipDecorationMover responds to mouse events on the relationship by moving either the PK or FK connection point so it is near the mouse's current position. |
| Field Summary |
|---|
| Fields inherited from class ca.sqlpower.architect.swingui.PlayPenComponent |
|---|
backgroundColor, componentPreviouslySelected, foregroundColor |
| Constructor Summary | |
|---|---|
Relationship(SQLRelationship model,
PlayPenContentPane parent)
This constructor simply creates a Relationship component for the given SQLRelationship and adds it to the playpen. |
|
| Method Summary | |
|---|---|
protected void |
createPopup()
|
void |
dbChildrenInserted(SQLObjectEvent e)
|
void |
dbChildrenRemoved(SQLObjectEvent e)
|
void |
dbObjectChanged(SQLObjectEvent e)
|
void |
dbStructureChanged(SQLObjectEvent e)
|
java.awt.Point |
getFkConnectionPoint()
|
TablePane |
getFkTable()
|
LayoutNode |
getHeadNode()
Returns the node whose inbound edge list includes this edge. |
SQLRelationship |
getModel()
|
java.lang.String |
getName()
Returns the user-visible name for this component--often the same as getModel().getName(), but this depends entirely on the subclass's idea of what in the model constitutes its name. |
java.awt.Point |
getPkConnectionPoint()
|
TablePane |
getPkTable()
|
javax.swing.JPopupMenu |
getPopup()
Returns a component specific popup menu. |
java.awt.Point |
getPreferredLocation()
The revalidate() call uses this to determine the component's correct location. |
LayoutNode |
getTailNode()
Returns the node whose outbound edge list includes this edge. |
java.lang.String |
getUIClassID()
|
void |
handleMouseEvent(java.awt.event.MouseEvent evt)
Performs the component specific actions for the given MouseEvent. |
boolean |
intersects(java.awt.Rectangle region)
Determines if the given rectangle is visibly touching this component. |
boolean |
isSelected()
See PlayPenComponent.selected. |
boolean |
isStraightLine()
|
void |
setConnectionPoints(java.awt.Point[] connectionPoints)
Sets the connectionPoints of the relationship from an array of points. |
void |
setFkConnectionPoint(java.awt.Point p)
|
void |
setFkTable(TablePane tp)
|
void |
setPkConnectionPoint(java.awt.Point p)
|
void |
setPkTable(TablePane tp)
|
void |
setSelected(boolean isSelected,
int multiSelectType)
Tells this component it is selected or deselected. |
protected void |
setup()
All constructors have to call this after setting pp, model, pkTable, and fkTable. |
java.lang.String |
toString()
|
void |
updateUI()
|
| Methods inherited from class ca.sqlpower.architect.swingui.PlayPenComponent |
|---|
addPropertyChangeListener, addPropertyChangeListener, addSelectionListener, contains, firePropertyChange, firePropertyChange, fireSelectionEvent, getBackgroundColor, getBounds, getBounds, getFont, getFontMetrics, getFontRenderContext, getForegroundColor, getHeight, getInsets, getLocation, getLocation, getParent, getPlayPen, getPreferredSize, getSize, getToolTipText, getUI, getWidth, getX, getY, isOpaque, paint, removePropertyChangeListener, removeSelectionListener, repaint, repaint, repaint, revalidate, setBackgroundColor, setBounds, setBoundsImpl, setForegroundColor, setInsets, setLocation, setLocation, setOpaque, setSize, setToolTipText, setUI, showPopup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Relationship(SQLRelationship model,
PlayPenContentPane parent)
throws ArchitectException
ArchitectException| Method Detail |
|---|
protected void setup()
protected void createPopup()
public java.awt.Point getPreferredLocation()
PlayPenComponent
getPreferredLocation in class PlayPenComponentpublic java.lang.String toString()
toString in class java.lang.Objectpublic void updateUI()
public void setSelected(boolean isSelected,
int multiSelectType)
PlayPenComponent
See PlayPenComponent.selected.
setSelected in interface SelectablesetSelected in class PlayPenComponentisSelected - The new selection state for this componentmultiSelectType - One of the type codes from SelectionEvent.public boolean isSelected()
PlayPenComponentPlayPenComponent.selected.
isSelected in interface SelectableisSelected in class PlayPenComponentpublic java.lang.String getUIClassID()
public SQLRelationship getModel()
getModel in class PlayPenComponentpublic java.lang.String getName()
PlayPenComponent
getName in class PlayPenComponentpublic void setPkTable(TablePane tp)
public TablePane getPkTable()
public void setFkTable(TablePane tp)
public TablePane getFkTable()
public java.awt.Point getPkConnectionPoint()
public java.awt.Point getFkConnectionPoint()
public void setPkConnectionPoint(java.awt.Point p)
public void setFkConnectionPoint(java.awt.Point p)
public void dbChildrenInserted(SQLObjectEvent e)
dbChildrenInserted in interface SQLObjectListenerpublic void dbChildrenRemoved(SQLObjectEvent e)
dbChildrenRemoved in interface SQLObjectListenerpublic void dbObjectChanged(SQLObjectEvent e)
dbObjectChanged in interface SQLObjectListenerpublic void dbStructureChanged(SQLObjectEvent e)
dbStructureChanged in interface SQLObjectListenerpublic boolean intersects(java.awt.Rectangle region)
region - The region to test.
public LayoutNode getHeadNode()
LayoutEdge
getHeadNode in interface LayoutEdgepublic LayoutNode getTailNode()
LayoutEdge
getTailNode in interface LayoutEdgepublic javax.swing.JPopupMenu getPopup()
PlayPenComponent
getPopup in class PlayPenComponentpublic boolean isStraightLine()
public void setConnectionPoints(java.awt.Point[] connectionPoints)
connectionPoints, - size of 2. The first element is a point
representing the pk connection point, and the second
element is a point representing the fk connection point.public void handleMouseEvent(java.awt.event.MouseEvent evt)
PlayPenComponent
handleMouseEvent in class PlayPenComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||