public class DBTableJoin extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DBTableDesktopPane |
mDesktopPane |
protected java.util.Vector |
mJoinItems |
protected DSSchemaIFace |
mSchema |
protected DBTableJoinItem |
mSelectedItem |
Constructor and Description |
---|
DBTableJoin(DBTableDesktopPane aDeskTopPane)
Constructor takes Schema object (interface)
|
Modifier and Type | Method and Description |
---|---|
void |
addJoin(DBSelectTableModelItem aLeft,
DBSelectTableModelItem aRight)
Add a Join by item
|
void |
addJoin(DBTableField aItem1,
DBTableField aItem2)
Add a Join
|
void |
clear()
Clears all of the join items
|
java.util.Vector |
getJoins()
Returns the Vector of Joins
|
void |
paint(java.awt.Graphics g)
Implements a paint method for painting all joins
|
void |
refresh()
Refreshes the DesktopPane
|
boolean |
removeSelectedLink()
Removes a link or "join" between two tables
|
void |
removeTable(int aTableId,
java.lang.String aTableName)
Removes a tables to and from joins.
|
void |
selectLink(java.awt.event.MouseEvent ev)
Uses the mouse event to select or deselect a link
|
protected java.util.Vector mJoinItems
protected DSSchemaIFace mSchema
protected DBTableDesktopPane mDesktopPane
protected DBTableJoinItem mSelectedItem
public DBTableJoin(DBTableDesktopPane aDeskTopPane)
aDeskTopPane
- desktop pane that implements DSSchemaIFacepublic java.util.Vector getJoins()
public void clear()
public void removeTable(int aTableId, java.lang.String aTableName)
aTableId
- the id of the tableaTableName
- the name of the tablepublic void addJoin(DBTableField aItem1, DBTableField aItem2)
aItem1
- the left itemaItem2
- the right itempublic void addJoin(DBSelectTableModelItem aLeft, DBSelectTableModelItem aRight)
aLeft
- the left part of the linkaRight
- the right part of the linkpublic void paint(java.awt.Graphics g)
g
- the graphics objectpublic void refresh()
public boolean removeSelectedLink()
public void selectLink(java.awt.event.MouseEvent ev)
ev
- mouse event