|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.appworx.Hook
public class Hook
Delegates certain (mostly interactive) functionality to the concrete implementation.
For example, applications should not instantiate AppDbObjectDialog directly, but use Hook.edit() instead. By using this technique it is fairly easy to change the implementation at runtime. Poolkeepers replication framework relies on that, for example.
| Field Summary | |
|---|---|
protected static String |
CLASSNAME
The classname of the hook. |
protected AppDbObjectDialogPool |
dialogPool
|
protected static Hook |
hook
global hook (singleton) |
| Constructor Summary | |
|---|---|
protected |
Hook()
Creates a hook. |
| Method Summary | |
|---|---|
boolean |
delete(AppDbObject object)
Deletes an AppDbObject.The user will be prompted for confirmation. |
void |
edit(AppDbObject object)
Edits an AppDbObject in a non-modal dialog. |
void |
edit(AppDbObject object,
boolean disposeOnDeleteOrSave)
Edits an AppDbObject in a non-modal dialog. |
void |
edit(AppDbObject object,
Component comp,
boolean disposeOnDeleteOrSave)
Edits an AppDbObject in a non-modal dialog. |
AppDbObject |
editModal(AppDbObject object)
Edits an AppDbObject in a modal dialog. |
AppDbObject |
editModal(AppDbObject object,
Component comp)
Edits an AppDbObject in a modal dialog. |
AppDbObjectDialogPool |
getDialogPool()
Gets the dialog pool. |
static Hook |
hook()
Gets the global hook. |
static void |
install(String className)
Installs the hook (overriding any existing hook) for the given public CLASSNAME. |
protected void |
shutdown()
Shuts the hook down (for being replaced) |
protected void |
startup()
Initializes a new hook. |
void |
view(AppDbObject object)
Shows an AppDbObject in a non-modal dialog. |
void |
view(AppDbObject object,
Component comp)
Shows an AppDbObject in a non-modal dialog. |
void |
viewModal(AppDbObject object)
Shows an AppDbObject in a modal dialog. |
void |
viewModal(AppDbObject object,
Component comp)
Shows an AppDbObject in a modal dialog. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static String CLASSNAME
protected static Hook hook
protected AppDbObjectDialogPool dialogPool
| Constructor Detail |
|---|
protected Hook()
| Method Detail |
|---|
public static Hook hook()
public static void install(String className)
className - the classname of the hookprotected void startup()
AppDbObjectDialogPool.
protected void shutdown()
public AppDbObjectDialogPool getDialogPool()
public void view(AppDbObject object,
Component comp)
AppDbObject in a non-modal dialog.
object - the AppDbObject to view-onlycomp - optional component to determine the window owner, null = no ownerpublic void view(AppDbObject object)
AppDbObject in a non-modal dialog.
object - the AppDbObject to view-only
public void viewModal(AppDbObject object,
Component comp)
AppDbObject in a modal dialog.
object - the AppDbObject to view-onlycomp - optional component to determine the window owner, null = no ownerpublic void viewModal(AppDbObject object)
AppDbObject in a modal dialog.
object - the AppDbObject to view-only
public void edit(AppDbObject object,
Component comp,
boolean disposeOnDeleteOrSave)
AppDbObject in a non-modal dialog.
object - the AppDbObject to editcomp - optional component to determine the window owner, null = no ownerdisposeOnDeleteOrSave - true if dispose dialog after delete or save
public void edit(AppDbObject object,
boolean disposeOnDeleteOrSave)
AppDbObject in a non-modal dialog.
object - the AppDbObject to editdisposeOnDeleteOrSave - true if dispose dialog after delete or savepublic void edit(AppDbObject object)
AppDbObject in a non-modal dialog.
object - the AppDbObject to edit
public AppDbObject editModal(AppDbObject object,
Component comp)
AppDbObject in a modal dialog.
object - the AppDbObject to editcomp - optional component to determine the window owner, null = no owner
public AppDbObject editModal(AppDbObject object)
AppDbObject in a modal dialog.
object - the AppDbObject to edit
public boolean delete(AppDbObject object)
AppDbObject.
object - the AppDbObject to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||