public class DBWhereModel extends javax.swing.AbstractListModel
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector |
mItems |
protected DBWhereIFace |
mRootObj |
Constructor and Description |
---|
DBWhereModel()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
add(DBWhereIFace aItem)
Adds an item to the model, the parent attr MUST be set before adding item
|
void |
add(DBWhereIFace aItem,
int aInx)
Adds an item to the model at a specified index, the parent attr MUST be
set before adding item
|
protected void |
buildFromWhereObj(DBWhereIFace aWhereObj)
Build it from the where object
|
void |
fillQueryDef(DBQueryDef aQueryDef)
Fills QueryDef from Model
|
void |
fireContentsChanged()
Expose the ability to send the UI a notification the model has been
updated
|
java.lang.Object |
getElementAt(int index)
Gets an element in the model at a specified index
|
protected int |
getInsertionIndexFromDrag()
Returns the current insertion index depending on the current drag over
item
|
int |
getSize()
Returns the size of the model
|
void |
initialize(DBWhereIFace aWhereObj)
Initialize it by clearing everything and building it from the root where
object
|
void |
remove(DBWhereIFace aObj)
Remove item from list, if operator, remove its closure and all the
children too
|
protected java.util.Vector mItems
protected DBWhereIFace mRootObj
public DBWhereModel()
public void initialize(DBWhereIFace aWhereObj)
aWhereObj
- protected void buildFromWhereObj(DBWhereIFace aWhereObj)
aWhereObj
- the new objectpublic int getSize()
public java.lang.Object getElementAt(int index)
protected int getInsertionIndexFromDrag()
public int add(DBWhereIFace aItem)
aItem
- item to be added, it finds the insert point via the lasted
dragged object if that can't be found then it adds it as the
last child of the parent.public void add(DBWhereIFace aItem, int aInx)
aItem
- item to be added, it finds the insert point via the lasted
dragged object if that can't be found then it adds it as the
last child of the parent.aInx
- index as to where it will be addedpublic void remove(DBWhereIFace aObj)
aObj
- item to be removedpublic void fireContentsChanged()
public void fillQueryDef(DBQueryDef aQueryDef)