public class DBTableField extends java.lang.Object implements java.awt.datatransfer.Transferable, DBDisplayItemIFace
Modifier and Type | Field and Description |
---|---|
protected java.awt.datatransfer.DataFlavor[] |
flavors |
protected boolean |
mIsDisplayed |
protected boolean |
mIsDragOver |
protected boolean |
mIsLinked |
protected java.util.Vector |
mMissingValueCode |
protected java.awt.Dimension |
mPreferredDim |
protected java.awt.Rectangle |
mRect |
protected DSTableFieldIFace |
mTableField |
protected DBTableFrame |
mTableFrame |
Constructor and Description |
---|
DBTableField()
Default Constructor
|
DBTableField(DSTableFieldIFace aField,
DBTableFrame aOwner)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.awt.Point aPnt)
Translates its position via the point
|
void |
addMissingValueCode(java.lang.String code)
Method to add missing value code into a vector.
|
java.awt.Rectangle |
getBounds()
Returns the bounds of the item
|
java.lang.String |
getDataType()
Return the datatype
|
boolean |
getLinked()
Return whether it is a link
|
java.util.Vector |
getMissingValueCode()
Method to return the vector which store the missing value code.
|
java.lang.String |
getName()
Return the name
|
java.awt.Dimension |
getPreferredDim()
Gets the preferred dimension
|
DBTableFrame |
getTable()
Returns the owner object
|
DSTableKeyIFace |
getTableKeyIFace()
Get the iface obj representing the key
|
java.lang.String |
getTableName()
Return the table name (returns the owner's name)
|
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
If the data was requested in the "java.lang.String" flavor, return the
String representing the selection.
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
Returns the array of flavors in which it can provide the data.
|
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Returns whether the requested flavor is supported by this object.
|
boolean |
isDisplayed()
Return whether it is being displayed
|
boolean |
isDragOver()
Returns if it is currently be dragged over
|
void |
setDisplayed(boolean aVal)
Set whether it is displayed or not
|
void |
setDragOver(boolean aVal)
Sets whether it is currently being dragged over
|
void |
setLinked(boolean aVal)
Set whether it is a link or not
|
void |
setMissingValueCode(java.util.Vector missingValueVector)
Method to return the vector which store the missing value code.
|
void |
setPreferredDim(java.awt.Dimension aDim)
Sets the preferred dimension
|
void |
setRect(int x,
int y,
int w,
int h)
Sets the rectangle
|
void |
setRect(java.awt.Rectangle aRect)
Sets the rectangle if the item
|
java.lang.String |
toString()
Returns the actual name or DBUIUtils.ALL_FIELDS if no name
|
protected DSTableFieldIFace mTableField
protected DBTableFrame mTableFrame
protected java.awt.Rectangle mRect
protected boolean mIsLinked
protected boolean mIsDragOver
protected boolean mIsDisplayed
protected java.awt.Dimension mPreferredDim
protected java.util.Vector mMissingValueCode
protected java.awt.datatransfer.DataFlavor[] flavors
public DBTableField()
public DBTableField(DSTableFieldIFace aField, DBTableFrame aOwner)
aField
- the database fieldaOwner
- the table owning the fieldpublic DSTableKeyIFace getTableKeyIFace()
public DBTableFrame getTable()
public void setLinked(boolean aVal)
aVal
- whether is it a linkpublic boolean getLinked()
public void setDisplayed(boolean aVal)
setDisplayed
in interface DBDisplayItemIFace
aVal
- true if the display attr is to be setpublic boolean isDisplayed()
isDisplayed
in interface DBDisplayItemIFace
public java.lang.String getName()
getName
in interface DSTableFieldIFace
public java.lang.String getTableName()
getTableName
in interface DBDisplayItemIFace
public java.lang.String getDataType()
getDataType
in interface DSTableFieldIFace
public void setDragOver(boolean aVal)
aVal
- true if dragged over otherwise falsepublic boolean isDragOver()
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.Rectangle getBounds()
public void setRect(java.awt.Rectangle aRect)
aRect
- public void setRect(int x, int y, int w, int h)
x
- X Do the same as dragOvery
- Y coordw
- Widthh
- Heightpublic void add(java.awt.Point aPnt)
aPnt
- the delta pointpublic void setPreferredDim(java.awt.Dimension aDim)
aDim
- public java.awt.Dimension getPreferredDim()
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
public java.util.Vector getMissingValueCode()
getMissingValueCode
in interface DSTableFieldIFace
public void addMissingValueCode(java.lang.String code)
addMissingValueCode
in interface DSTableFieldIFace
code
- public void setMissingValueCode(java.util.Vector missingValueVector)
setMissingValueCode
in interface DSTableFieldIFace