public interface G9DialogController
| Modifier and Type | Method and Description |
|---|---|
void |
blockDialog()
Blocks dialog from receving any events whatsoever
|
ECheckResult |
callHookCheckChange(String roleName)
Internal use.
|
ECheckResult |
callHookCheckClear(String roleName)
Internal use.
|
ECheckResult |
callHookCheckClose(String roleName)
Internal use.
|
ECheckResult |
callHookCheckDelete(String roleName)
Internal use.
|
ECheckResult |
callHookCheckFind(String roleName)
Internal use.
|
ECheckResult |
callHookCheckPrint(String roleName)
Internal use.
|
ECheckResult |
callHookCheckRowSelect(String roleName,
int curSel,
int newSel)
Internal use.
|
ECheckResult |
callHookCheckSave(String roleName)
Internal use.
|
boolean |
checkClear(String roleName)
Perfoms checkClear on the specified root role
|
boolean |
checkClose()
Performs checkClose on this dialog.
|
void |
clearDialog()
Clears all window blocks in this dialog.
|
void |
clearObjectSelection()
Recursivly clears all nodes from the object selection.
|
boolean |
dialogExceptionHandler(Throwable bad)
Default handler for alle Runtime Exceptions.
|
void |
display(String objSelAttr,
Object value)
Performs display on the given object selection with the given value found
in this controller.
|
void |
display(String objSelAttr,
Object value,
boolean resetState)
Updates the specified field from the object selection, and displays the
new value.
|
void |
disposeDialog()
Destroys this dialog.
|
boolean |
g9Accelerator(KeyEvent event)
Callback from keyevents pass through this method.
|
void |
g9DataEvent(G9DataEvent eventData)
Is called when someone sends a data event to the application.
|
ApplicationMethods |
getApplication()
Returns the controller for the application
|
String |
getDialogName()
Returns the dialog name of the dialog as defined in g9.
|
DomainObjectProxy |
getNewProxy(Object o,
String roleName)
Internal use, returns a new DomainObjectProxy for the specified object and role name
|
ObjectSelectionNode |
getObjectSelectionNode(String roleName)
Gets the role name method pointer, e.g if the roleName is "Order" it
returns the field
theOrder |
Map |
getRoleObjects()
Returns a map of the role objects.
|
List |
getRoleObjects(Object anObject)
Returns the a list of role objects contained in this dialog representing
the specified domain object.
|
String |
getServerApplicationName()
Returns the name of the server application for the dialogs object
selection
|
Vector |
getToolBarElements()
Deprecated.
|
G9DialogFrame |
getView()
Gets the dialog window representing this dialog.
|
Container |
getWindow()
Returns the window used by this controller.
|
String |
getWindowTitle()
Returns the title of the main window as defined in the WindowBlock in
g9.
|
boolean |
ignoreCheckChanged()
Returns the ignoreCheckChanged property.
|
void |
init()
Called upon startup of the dialog - used by the runtime system.
|
boolean |
isBlocked()
Returns true if the dialog is blocked.
|
boolean |
isChanged(String osAttributeName)
Check if the specified role attribute is changed.
|
String |
obtain(String objSelAttr)
Performs obtain on the given object selection attribute found in this
controller.
|
void |
returnToCaller(Object returnObject)
Handles the return from another dialog
|
void |
setAccessPolicy()
This method is invoked after the dialog is fully realized and
drawn on screen, so that you migth modify fields, set values etc.
|
void |
setEnabledComponent(Component component,
boolean enabled)
Recursivly enables or disables a component and all its children.
|
void |
setEnabledComponent(Component component,
boolean enabled,
boolean delay)
Internal use.
|
void |
setEnabledComponent(String name,
boolean enable)
Recursivly enables or disables a component and all its children.
|
void |
setIgnoreCheckChanged(boolean ignoreCheckChange)
Sets whether check change is to be executed or not.
|
void |
setModal(boolean isModal)
Make this dialog modal.
|
void |
setNormalCursor()
Changes cursos for this dialog into a normal cursor.
|
void |
setServerApplicationName(String serverApplicationName)
Sets the server application name for the dialogs object selection
|
void |
setVisibleComponent(Component component,
boolean visible)
Recursivly hides or shows a component and all its children.
|
void |
setVisibleComponent(Component component,
boolean visible,
boolean delay)
Internal use.
|
void |
setVisibleComponent(String name,
boolean visible)
Recursivly hides or shows a component and all its children.
|
void |
setWaitCursor()
Changes cursor for this dialog into a wait cursor.
|
void |
setWindowTitle(String title)
Set the title of the dialog window.
|
void |
startInit(Object returnObject,
Object startObject)
Handles initialization of a dialog from another dialog
|
void |
toBack()
Sends this dialog to the back of the MDI.
|
void |
toFront()
Sends this dialog to the front of the MDI.
|
void |
unblockDialog()
UnBlocks dialog so it may again receive events.
|
Container getWindow()
void init()
boolean dialogExceptionHandler(Throwable bad)
bad - the caught exception@Deprecated Vector getToolBarElements()
G9DialogFrame.getG9ToolBar()void g9DataEvent(G9DataEvent eventData)
eventData - The data object - user defined.void disposeDialog()
String getWindowTitle()
void setWindowTitle(String title)
title - the new title.String getServerApplicationName()
void setServerApplicationName(String serverApplicationName)
serverApplicationName - (missing javadoc)String getDialogName()
String obtain(String objSelAttr)
objSelAttr - The object selection to obtain value from.void display(String objSelAttr, Object value)
objSelAttr - The object selection to display value to.value - The value to display.void display(String objSelAttr, Object value, boolean resetState)
objSelAttr - the name of the attribute (as in the object selection)value - the (domain) object with the acutal value to displayresetState - Set to false to avoid resetting the attribute state.void toBack()
void toFront()
void setEnabledComponent(Component component, boolean enabled)
component - the component to disableenabled - if true the component is enabled.void setEnabledComponent(Component component, boolean enabled, boolean delay)
component - (missing javadoc)enabled - (missing javadoc)delay - (missing javadoc)void setEnabledComponent(String name, boolean enable)
name - the (logical) name of the component to disableenable - if true the component is enabled.void setVisibleComponent(Component component, boolean visible)
component - the component to show or hidevisible - if true the component is shown.void setVisibleComponent(Component component, boolean visible, boolean delay)
component - the component to show or hidevisible - if true the component is made visible,
otherwise hiddendelay - if true the visible task is delayed allowing
other tasks on the EDT to finish.void setVisibleComponent(String name, boolean visible)
name - the (locical) name the component to show or hidevisible - if true the component is shown.void setWaitCursor()
void setModal(boolean isModal)
isModal - True if modal, false to remove.void blockDialog()
void unblockDialog()
boolean isBlocked()
void setNormalCursor()
boolean g9Accelerator(KeyEvent event)
event - The key event.G9DialogFrame getView()
boolean checkClear(String roleName)
roleName - the name of the roleboolean checkClose()
void returnToCaller(Object returnObject)
returnObject - (missing javadoc)void startInit(Object returnObject, Object startObject)
returnObject - (missing javadoc)startObject - (missing javadoc)void clearDialog()
ObjectSelectionNode getObjectSelectionNode(String roleName)
theOrderroleName - the name of the roleObjectSelectionNode associated with the
roleName.ApplicationMethods getApplication()
List getRoleObjects(Object anObject)
anObject - the domain objectDomainObjectProxy getNewProxy(Object o, String roleName)
o - the objectroleName - the role namevoid setAccessPolicy()
NoteThis method is called from the EDT, thus if you need to do some time consuming task, you should set up a dedicated thread and let the gui carry on (you might want to block the dialog though...).
The pattern below show how to both set up a dedicated thread for the
(possibly) time consuming task, and how to get back to the EDT for
updating the dialog window.:
// SET UP NEW THREAD CODE
Runnable longTask = new Runnable() {
public void run() {
final Object someObject = LINES WITH TIME CONSUMING CODE...
// G9_INTERNAL_DISPLAY CODE - GET BACK TO EDT
SwingUtilities.invokeLater(new Runnable() {
public void run() {
// GUI CODE
display(someObject);
}
});
}
};
// INIT THREAD
Thread longTimeThread = new Thread(longTask, "thread name");
longTimeThread.setPriority(Thread.NORM_PRIORITY);
// START THREAD
longTimeThread.start();
boolean ignoreCheckChanged()
setIgnoreCheckChanged(boolean)void setIgnoreCheckChanged(boolean ignoreCheckChange)
true, check change will
not be executed on nodes in the dialog.ignoreCheckChange - the value of the checkChanged property.void clearObjectSelection()
Map getRoleObjects()
boolean isChanged(String osAttributeName) throws G9ClientException
osAttributeName - the name of the attributetrue if the field is changed, otherwise
falseG9ClientException - if the specified field is not found.ObjectSelectionNode.isChanged(String)ECheckResult callHookCheckSave(String roleName)
roleName - the name of the node to checkECheckResult callHookCheckDelete(String roleName)
roleName - the name of the node to checkECheckResult callHookCheckClose(String roleName)
roleName - the name of the node to checkECheckResult callHookCheckClear(String roleName)
roleName - the name of the node to checkECheckResult callHookCheckFind(String roleName)
roleName - the name of the node to checkECheckResult callHookCheckChange(String roleName)
roleName - the name of the node to checkECheckResult callHookCheckRowSelect(String roleName, int curSel, int newSel)
roleName - the name of the node to checkcurSel - the current selectionnewSel - the new selectionECheckResult callHookCheckPrint(String roleName)
roleName - the name of the node to checkCopyright © 2006–2017 Esito AS. All rights reserved.