|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object creamtec.webcream.gui.WindowUpdater
public class WindowUpdater
Used to update GUI windows with the data, received from HTTP request. If there is an action to be emulated, WindowUpdater handles it
Constructor Summary | |
---|---|
WindowUpdater(ClientAgent agent)
Creates window updater for the given client agent |
Method Summary | |
---|---|
boolean |
actionOverridden(HTMLPage page,
ActionData actionData)
Returns true if this action is overidden by a configuration property |
static void |
checkActionOperation(HTMLPage page,
java.lang.String key)
Checks if an operation is configured for this action, and if it is, calls ClientAgent.beginOperation(). |
boolean |
defaultEmulateAction(HTMLPage page,
ActionData actionData)
The default emulation logic that is executed if no custom action processors claimed the responsibility for the action. |
boolean |
emulateAction(HTMLPage page,
ActionData actionData)
Emulates an action such as a button click, menu item selection or tabbed pane selection change. |
void |
emulateRequest(HTMLPage page,
HttpRequestData data)
Emulates HTTP request. |
static java.lang.String |
getButtonKeyName(java.lang.Object button)
Format of the key is: window.Window_Title.button.button_text |
static java.lang.String |
getComponentClassName(java.lang.Object obj)
Returns component class name without the package name |
static java.lang.String |
getComponentName(java.lang.Object obj)
Needed for components that must be accessible outside the context of HTMLPage |
ComponentUpdater |
getComponentUpdater(java.lang.String className)
Returns the component updater for the given class name If a custom component updater is not registered for the given class, a default one is returned |
ComponentUpdater |
getDefaultComponentUpdater()
Returns the default component updater that implements the default logic of component processing and updating in WebCream. |
static java.lang.String |
getItemString(java.lang.Object item)
Converts the item object to the proper stringified representation. |
static java.lang.String |
getMenuItemKeyName(java.lang.String actionString)
Format of the key is: window.Window_Title.menu.SubMenuIndex.MenuItemIndex.action |
void |
initCustomUpdatersAndEmulators(ClientAgent agent)
Loads custom updaters from the application properties file. |
void |
registerActionEmulator(ActionEmulator emulator)
Registers action emulator for all actions |
void |
registerActionEmulator(ActionEmulator emulator,
java.lang.String windowFilter)
Registers action emulator for windows whose title matches the specified filter string |
void |
resizeWindow(java.awt.Window window,
java.lang.String resizeString,
HTMLPage page)
Resize string should follow the format "resize:width,height" |
void |
unregisterActionEmulator(ActionEmulator emulator)
Removes the registration of action emulator |
void |
updateComponentTreeData(java.awt.Component comp,
HttpRequestData data,
ActionData actionData)
Updates components of the given window with the data |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindowUpdater(ClientAgent agent)
agent
- ClientAgentMethod Detail |
---|
public ComponentUpdater getComponentUpdater(java.lang.String className)
className
- fully qualified name of the class such as javax.swing.JButton
public void initCustomUpdatersAndEmulators(ClientAgent agent)
public ComponentUpdater getDefaultComponentUpdater()
public void registerActionEmulator(ActionEmulator emulator)
emulator
- ActionEmulatorpublic void registerActionEmulator(ActionEmulator emulator, java.lang.String windowFilter)
emulator
- ActionEmulatorwindowFilter
- the filter string, which can contain text and "*" to specify any text.public void unregisterActionEmulator(ActionEmulator emulator)
emulator
- ActionEmulatorpublic void emulateRequest(HTMLPage page, HttpRequestData data) throws java.lang.Exception
page
- HTMLPagedata
- HttpRequestData
java.lang.Exception
public boolean emulateAction(HTMLPage page, ActionData actionData) throws java.lang.Exception
emulateAction
in interface ActionEmulator
page
- HTMLPageactionData
- ActionData
java.lang.Exception
public boolean actionOverridden(HTMLPage page, ActionData actionData) throws java.lang.Exception
page
- HTMLPageactionData
- ActionData
java.lang.Exception
public boolean defaultEmulateAction(HTMLPage page, ActionData actionData) throws java.lang.Exception
page
- HTMLPageactionData
- ActionData
java.lang.Exception
public static void checkActionOperation(HTMLPage page, java.lang.String key)
page
- action keykey
- Stringpublic void updateComponentTreeData(java.awt.Component comp, HttpRequestData data, ActionData actionData) throws java.lang.Exception
comp
- component to be updateddata
- request dataactionData
- action parameters
java.lang.Exception
public void resizeWindow(java.awt.Window window, java.lang.String resizeString, HTMLPage page) throws WebCreamException
WebCreamException
public static java.lang.String getComponentClassName(java.lang.Object obj)
public static java.lang.String getComponentName(java.lang.Object obj)
public static java.lang.String getMenuItemKeyName(java.lang.String actionString)
actionString
- the action string submitted by the HTML page
public static java.lang.String getButtonKeyName(java.lang.Object button)
button
- the button that the key is generated for
public static java.lang.String getItemString(java.lang.Object item)
item
- Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |