|
||||||||||
| 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.ContainerPane<SQLTable,SQLColumn>
ca.sqlpower.architect.swingui.TablePane
public class TablePane
| Field Summary | |
|---|---|
static int |
COLUMN_INDEX_END_OF_PK
A special column index that represents the gap between the last PK column and the PK line. |
static int |
COLUMN_INDEX_START_OF_NON_PK
A special column index that represents the gap between the PK line and the first non-PK column. |
protected java.util.Map<SQLColumn,java.util.List<java.awt.Color>> |
columnHighlight
Tracks current highlight colours of the columns in this table. |
protected SQLColumn |
draggingColumn
During a drag operation where a column is being dragged from this TablePane, this variable points to the column being dragged. |
protected java.util.Set<SQLColumn> |
hiddenColumns
Tracks which columns in this table are currently hidden. |
protected int |
insertionPoint
This is the column index at which to the insertion point is currently rendered. |
| Fields inherited from class ca.sqlpower.architect.swingui.ContainerPane |
|---|
ITEM_INDEX_NONE, ITEM_INDEX_TITLE, margin, model, selectedItems |
| Fields inherited from class ca.sqlpower.architect.swingui.PlayPenComponent |
|---|
backgroundColor, componentPreviouslySelected, foregroundColor, selected |
| Constructor Summary | |
|---|---|
TablePane(SQLTable m,
PlayPenContentPane parent)
|
|
TablePane(TablePane tp,
PlayPenContentPane parent)
|
|
| Method Summary | |
|---|---|
void |
addColumnHighlight(SQLColumn column,
java.awt.Color colour)
Changes the foreground colour of a column. |
java.awt.datatransfer.DataFlavor |
bestImportFlavor(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
Chooses the best import flavour from the flavors array for importing into c. |
boolean |
canImport(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
This is set up this way because this DropTargetListener was derived from a TransferHandler. |
int |
columnIndexToCentreY(int colidx)
Returns the centre Y coordinate of the given column index. |
java.awt.datatransfer.Transferable |
createTransferableForSelection()
Creates a Transferable representation of the currently-selected items. |
void |
destroy()
You must call this method when you are done with a TablePane component. |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Called while a drag operation is ongoing, when the mouse pointer enters the operable part of the drop site for the DropTarget registered with this listener. |
void |
dragExit(java.awt.dnd.DropTargetEvent dte)
Called while a drag operation is ongoing, when the mouse pointer has exited the operable part of the drop site for the DropTarget registered with this listener. |
void |
dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Called when a drag operation is ongoing, while the mouse pointer is still over the operable part of the drop site for the DropTarget registered with this listener. |
void |
drop(java.awt.dnd.DropTargetDropEvent dtde)
Called when the drag operation has terminated with a drop on the operable part of the drop site for the DropTarget registered with this listener. |
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Called if the user has modified the current drop gesture. |
java.awt.Color |
getColumnHighlight(int i)
Returns the current highlight colour for a particular column. |
java.awt.Color |
getColumnHighlight(SQLColumn column)
|
java.util.Set<SQLColumn> |
getHiddenColumns()
|
int |
getHiddenPkCount()
Returns the number of hidden primary key columns |
java.util.List<LayoutEdge> |
getInboundEdges()
|
int |
getInsertionPoint()
See insertionPoint. |
protected java.util.List<SQLColumn> |
getItems()
Returns a list of the items to be displayed with the model. |
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.util.List<LayoutEdge> |
getOutboundEdges()
|
javax.swing.JPopupMenu |
getPopup()
Returns an instance of the popup menu with menu items exclusive to manipulating tablepanes. |
void |
handleMouseEvent(java.awt.event.MouseEvent evt)
Performs the component specific actions for the given MouseEvent. |
boolean |
insertObjects(java.util.List<? extends SQLObject> items,
int insertionPoint)
Inserts the list of SQLObjects into this table at the specified location. |
boolean |
isFullyQualifiedNameInHeader()
|
boolean |
isShowAkTag()
|
boolean |
isShowFkTag()
|
boolean |
isShowPkTag()
|
int |
pointToItemIndex(java.awt.Point p)
Deprecated. |
void |
removeColumnHighlight(SQLColumn column,
java.awt.Color colour)
Removes the given colour highlight from the given column. |
void |
setFullyQualifiedNameInHeader(boolean fullyQualifiedNameInHeader)
|
void |
setInsertionPoint(int ip)
See insertionPoint. |
java.lang.String |
toString()
|
void |
updateHiddenColumns()
|
void |
updateUI()
|
| Methods inherited from class ca.sqlpower.architect.swingui.ContainerPane |
|---|
addItemSelectionListener, deSelectEverythingElse, deselectItem, deselectItem, dragDropEnd, dragEnter, dragExit, dragOver, dropActionChanged, fireItemsDeselected, fireItemsSelected, getLocationOnScreen, getMargin, getModel, getNodeName, getSelectedItemIndex, getSelectedItems, isDashed, isItemSelected, isItemSelected, isRounded, removeItemSelectionListener, selectItem, selectItem, selectNone, setDashed, setMargin, setRounded, setSelected |
| 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, getPreferredLocation, getPreferredSize, getSize, getToolTipText, getUI, getWidth, getX, getY, isOpaque, isSelected, 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 |
| Methods inherited from interface ca.sqlpower.architect.layout.LayoutNode |
|---|
getBounds, getBounds, getHeight, getLocation, getWidth, getX, getY, setBounds, setLocation, setLocation |
| Field Detail |
|---|
public static final int COLUMN_INDEX_END_OF_PK
public static final int COLUMN_INDEX_START_OF_NON_PK
protected int insertionPoint
protected java.util.Set<SQLColumn> hiddenColumns
protected java.util.Map<SQLColumn,java.util.List<java.awt.Color>> columnHighlight
protected SQLColumn draggingColumn
| Constructor Detail |
|---|
public TablePane(TablePane tp,
PlayPenContentPane parent)
public TablePane(SQLTable m,
PlayPenContentPane parent)
| Method Detail |
|---|
protected java.util.List<SQLColumn> getItems()
ContainerPane
getItems in class ContainerPane<SQLTable,SQLColumn>public java.lang.String toString()
toString in class java.lang.Objectpublic void updateUI()
public void destroy()
FIXME: this should be done automatically when the SQLTable model is removed, because the TablePane shouldn't have to be destroyed separately of the model.
public java.lang.String getName()
PlayPenComponent
getName in class PlayPenComponentpublic int getInsertionPoint()
insertionPoint.
public void setInsertionPoint(int ip)
insertionPoint.
public void updateHiddenColumns()
@Deprecated public int pointToItemIndex(java.awt.Point p)
pointToItemIndex in class ContainerPane<SQLTable,SQLColumn>public int columnIndexToCentreY(int colidx)
#COLUMN_INDEX_TITLE value for colidx
will produce the central Y coordinate for the title bar.
colidx - the column number to get the central Y coordinate of.
public boolean insertObjects(java.util.List<? extends SQLObject> items,
int insertionPoint)
throws ArchitectException
items - A list of SQLTable and/or SQLColumn objects. Other types are not allowed.insertionPoint - The position that the first item in the item list should go into.
This can be a nonnegative integer to specify a position in the column list, or one
of the constants COLUMN_INDEX_END_OF_PK or COLUMN_INDEX_START_OF_NON_PK to indicate a special position.
ArchitectException - If there are problems in the business model
public void addColumnHighlight(SQLColumn column,
java.awt.Color colour)
When highlighting for the given column is no longer desired, remove the
highlight with a call to removeColumnHighlight(SQLColumn, Color).
i - The column index to recolourcolour - The new colour to show the column in.
public void removeColumnHighlight(SQLColumn column,
java.awt.Color colour)
addColumnHighlight(SQLColumn, Color) with the same arguments.
public java.awt.Color getColumnHighlight(int i)
throws ArchitectException
i - The index of the column in question
ArchitectExceptionpublic java.awt.Color getColumnHighlight(SQLColumn column)
public void setFullyQualifiedNameInHeader(boolean fullyQualifiedNameInHeader)
public boolean isFullyQualifiedNameInHeader()
public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
dragEnter in class ContainerPane<SQLTable,SQLColumn>public void dragExit(java.awt.dnd.DropTargetEvent dte)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
dragExit in class ContainerPane<SQLTable,SQLColumn>public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
dragOver in class ContainerPane<SQLTable,SQLColumn>public void drop(java.awt.dnd.DropTargetDropEvent dtde)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
drop in class ContainerPane<SQLTable,SQLColumn>public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
dropActionChanged in class ContainerPane<SQLTable,SQLColumn>
public java.awt.datatransfer.DataFlavor bestImportFlavor(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
bestImportFlavor in class ContainerPane<SQLTable,SQLColumn>
public boolean canImport(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
public java.util.List<LayoutEdge> getInboundEdges()
public java.util.List<LayoutEdge> getOutboundEdges()
public int getHiddenPkCount()
public boolean isShowPkTag()
public boolean isShowFkTag()
public boolean isShowAkTag()
public java.util.Set<SQLColumn> getHiddenColumns()
public javax.swing.JPopupMenu getPopup()
getPopup in class PlayPenComponentpublic void handleMouseEvent(java.awt.event.MouseEvent evt)
PlayPenComponent
handleMouseEvent in class ContainerPane<SQLTable,SQLColumn>public java.awt.datatransfer.Transferable createTransferableForSelection()
ContainerPane
createTransferableForSelection in class ContainerPane<SQLTable,SQLColumn>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||