|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsemorg.gui.list.ListWindow
public abstract class ListWindow
Super class for all list window classes. Encapsulates all properties and methods, which have all list window classes in common.
Field Summary | |
---|---|
protected org.eclipse.swt.widgets.Button |
chooseButton
The button to select an existing data record. |
protected Vector<DBColumn> |
columns
The DBColumns corresponding to the displayed data records. |
private org.eclipse.swt.widgets.ToolItem |
configureItem
The button to configure the GUI table. |
protected org.eclipse.swt.widgets.ToolItem |
deleteItem
The button to delete an existing data record. |
protected org.eclipse.swt.widgets.ToolItem |
editItem
The button to edit an existing data record. |
(package private) ExtensibleSearchControl |
filter
The search widget in the list window. |
protected org.eclipse.swt.widgets.ToolItem |
filterItem
Item which allows to filter entries in the list window. |
protected org.eclipse.swt.widgets.Table |
mainTable
The GUI table wrapped by the mainTableViewer . |
protected org.eclipse.jface.viewers.TableViewer |
mainTableViewer
MVC wrapper around the GUI table for seperating presentation from data. |
protected org.eclipse.swt.widgets.ToolItem |
newItem
The button to create a new data record. |
protected org.eclipse.swt.widgets.Shell |
shell
The window itself. |
protected String |
sortString
String which is used for sorting the rows of the GUI table. |
protected org.eclipse.swt.widgets.Composite |
toolBar
The toolbar of the list window. |
private DBTableChangedListener |
updateListener
A listener which reacts on changes of the database table. |
Constructor Summary | |
---|---|
ListWindow(org.eclipse.swt.widgets.Shell parent,
Vector<DBColumn> columns)
Constructor for list windows called from the main menu, i.e. non-popup list windows. |
|
ListWindow(org.eclipse.swt.widgets.Shell parent,
Vector<DBColumn> columns,
AssociationTabControl caller)
Constructor for ListWindow instances created by user operations in the AssociationTabControl . |
|
ListWindow(org.eclipse.swt.widgets.Shell parent,
Vector<DBColumn> columns,
ForeignKeyConstraintSelector caller)
Constructor for list window instances invoked by instances of the class ForeignKeyConstraintSelector . |
Method Summary | |
---|---|
protected void |
addUpdateListener(int type)
Listener which reacts on changes of the database. |
private org.eclipse.swt.widgets.Composite |
createButtonArea()
Creates a composite containing the buttons choose and abort and returns it. |
protected abstract void |
createChooseButtonListener(AssociationTabControl caller)
Creates a SelectionListener for the choose button which passes the SimpleIDKeys of the selected elements to the calling AssociationTabControl by invoking the method addSelectedIds of the caller instance. |
protected abstract void |
createChooseButtonListener(ForeignKeyConstraintSelector caller)
Creates a SelectionListener for the choose button which passes the database id of the selected element to the calling ForeignKeyConstraintSelector by invoking the method setSelectedId of the caller instance. |
protected void |
createListToolbarBasics(boolean isPopup)
Creates the toolbar composite and its basic components. |
protected abstract void |
createSpecializedMainTableListener()
Creates a DBTableChangedListener and adds it to
the mainTableViewer . |
protected abstract void |
createSpecializedMainTableListener(AssociationTabControl caller)
This method creates two listener and adds them to the main table viewer. |
protected abstract void |
createSpecializedMainTableListener(ForeignKeyConstraintSelector caller)
This method creates two listener and adds them to the main table viewer. |
protected abstract void |
createSpecializedToolBarListeners()
Creates listeners for the toolbar buttons editItem ,
newItem and deleteItem which provide the functionality
of the buttons. |
protected void |
createTableBasics()
Creates for each db column ( columns ) a corresponding GUI
column. |
protected abstract Object |
getTableInputFromDB()
Returns a vector of table class instances which will be displayed in the GUI table of the list window. |
protected void |
setActive()
Sets the list window to active. |
void |
setVisible(boolean vis)
Sets the visibility of the list window according to the given parameter. |
void |
update()
Updates the GUI table with the actual records from a database query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.swt.widgets.Shell shell
protected org.eclipse.swt.widgets.Composite toolBar
protected org.eclipse.swt.widgets.ToolItem filterItem
protected org.eclipse.jface.viewers.TableViewer mainTableViewer
protected org.eclipse.swt.widgets.Table mainTable
mainTableViewer
.
protected final Vector<DBColumn> columns
ExtensibleSearchControl filter
protected String sortString
ORDER BY (column) [ASC|DSC]
.
protected org.eclipse.swt.widgets.ToolItem newItem
protected org.eclipse.swt.widgets.ToolItem editItem
protected org.eclipse.swt.widgets.ToolItem deleteItem
protected org.eclipse.swt.widgets.Button chooseButton
private org.eclipse.swt.widgets.ToolItem configureItem
private DBTableChangedListener updateListener
Constructor Detail |
---|
public ListWindow(org.eclipse.swt.widgets.Shell parent, Vector<DBColumn> columns)
parent
- the parent window of the list windowcolumns
- the columns corresponding to the displayed data.public ListWindow(org.eclipse.swt.widgets.Shell parent, Vector<DBColumn> columns, AssociationTabControl caller)
AssociationTabControl
.
parent
- the parent shell (window) of the new list windowcolumns
- the columns to be displayed in the new list windowcaller
- the AssociationTabControl
instance which invoked
this constructorpublic ListWindow(org.eclipse.swt.widgets.Shell parent, Vector<DBColumn> columns, ForeignKeyConstraintSelector caller)
ForeignKeyConstraintSelector
.
parent
- the parent shell (window) of the new list windowcolumns
- the columns to be displayed in the new list windowcaller
- the ForeignKeyConstraintSelector
instance which
invoked this constructorMethod Detail |
---|
private org.eclipse.swt.widgets.Composite createButtonArea()
protected void setActive()
public void setVisible(boolean vis)
vis
- if true the list window is set to visible, else (false)
it is set to invisiblepublic void update()
protected void createListToolbarBasics(boolean isPopup)
isPopup
- Indicates whether the list window is used as a popup
window (true) or as a normal list window
called by the main window menu (false).protected void createTableBasics()
columns
) a corresponding GUI
column.
protected void addUpdateListener(int type)
type
- the wanted type of the DBTableChangedListenerprotected abstract Object getTableInputFromDB()
protected abstract void createSpecializedToolBarListeners()
editItem
,
newItem
and deleteItem
which provide the functionality
of the buttons. These listeners opens edit windows or deleting
dialogs and invoke the deleting or creating methods.
protected abstract void createSpecializedMainTableListener()
DBTableChangedListener
and adds it to
the mainTableViewer
.
protected abstract void createSpecializedMainTableListener(AssociationTabControl caller)
DBTableChangedListener
which
reacts on changes of the database table. AssociationTabControl
instance which called the
list window by invoking the method
AssociationTabControl.addSelectedIds(semorg.sql.tables.SimpleIDKey[], boolean)
.
caller
- the AssociationTabControl
instance
which called the actual list windowprotected abstract void createSpecializedMainTableListener(ForeignKeyConstraintSelector caller)
DBTableChangedListener
which
reacts on changes of the database table. ForeignKeyConstraintSelector
instance which
called the list window by invoking the method
ForeignKeyConstraintSelector.setSelectedId(int)
.
caller
- the ForeignKeyConstraintSelector
instance which called the actual list windowprotected abstract void createChooseButtonListener(AssociationTabControl caller)
caller
- the AssociationTabControl instance which called the list
window.AssociationTabControl.addSelectedIds(semorg.sql.tables.SimpleIDKey[],
boolean)
protected abstract void createChooseButtonListener(ForeignKeyConstraintSelector caller)
caller
- the ForeignKeyConstraintSelector instance which called the
list window.ForeignKeyConstraintSelector.setSelectedId(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |