|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcreamtec.webcream.gui.WebCreamUIManager
public class WebCreamUIManager
Manages the UI elements such as windows and components. Maintains the information on the stack of windows (top to bottom) and provides various helper methods.
| Field Summary | |
|---|---|
static int |
END_OPERATION_NEW_WINDOW
Specifies taht the operation should be ended when a new window is displayed at the top (not an existing one moved to the top) |
static int |
END_OPERATION_NEXT_WINDOW
Specifies that the operation should be ended when there is a different top level window |
static int |
END_OPERATION_NONE
Specifies that the operation should not be ended by UI events |
static int |
END_OPERATION_TITLED_WINDOW
Specifies that the operation should be ended when a window with a certain title is shown |
static boolean |
LFInstalled
|
| Constructor Summary | |
|---|---|
WebCreamUIManager(ClientAgent agent)
Instantiates the manager for the given client agent |
|
| Method Summary | |
|---|---|
void |
afterEmulateRequest()
Called after the emulation of the request is finished |
static java.lang.String |
cleanupName(java.lang.String name)
Removes/replaces characters in the name that can cause problems when used in HTML and JavaScript |
static java.lang.String |
cleanupName(java.lang.String name,
java.lang.String appendToName)
Removes/replaces characters in the name that can cause problems when used in HTML and JavaScript |
void |
closeWindow(java.awt.Window window)
Closes given window |
static boolean |
dynamicEventsEnabled(HTMLPage page,
java.awt.Component comp)
Convenience method to determine if a component should be rendered with support for dynamic events Takes into account app properties but not component listeners |
static java.lang.String |
getComponentKeyName(HTMLPage page,
java.lang.Object object)
Returns the key that is used to identify this component in the application properties file The key format is window.Window_Title.Component_Title |
static java.lang.String |
getComponentKeyName(HTMLPage page,
java.lang.Object object,
java.lang.String appendKey)
Returns the key that is used to identify this component in the application properties file The key format is window.Window_Title.Component_Title |
static java.lang.String |
getComponentName(java.awt.Component comp)
Returns component name that can be used to identify it in a properties file If component has been given a name, it is used. |
java.awt.Window |
getWindowInFocus()
Returns the top level window for this agent |
java.lang.String |
getWindowInFocusTitle()
Convenience method that returns the title of the top level window If there is no window or if the focused window is not Dialog or Frame returns null |
void |
hideWindow(java.awt.Window window)
Called by Window peer to indicate that a window is being hidden Removes the window from top of the window stack and processes window-related operations |
void |
init()
Initializes the manager and installs a trap to prevent look and feel changes (they slow down the performance and can lead to various exceptions) |
void |
installLFTrap()
Installs look and feel trap |
void |
maximizeFrame(java.awt.Frame frame)
Sets the window size to the maximim possible for the current browser window |
void |
resizeWindows()
Updates sizes of maximized windows to match the client agent's current browser size |
void |
setEndOperationEvent(int eventCode)
Sets code of the operation that needs to be executed when a window is closed See WebCream documentation on how to configure and use operations |
void |
setEndOperationWindowTitle(java.lang.String windowTitle)
Sets the title of the window that should trigger an operation |
static boolean |
shouldRenderEnabled(ClientAgent agent,
java.awt.Component comp)
Convenience method to determine if a component should be rendered as enabled or disabled Takes into account app properties and the component state |
static boolean |
shouldRenderStandardFileOpenDialog(ClientAgent agent,
java.awt.Container cont)
Returns true if the given window should be rendered as a stanard file open dialog with the view of the client machine for file upload |
void |
showWindow(java.awt.Window window)
Called by Window peer to indicate that a window is being shown. |
void |
shutdown()
Disposes of all currently open windows |
static java.lang.String |
titleToKey(java.lang.String title)
Converts given string title to a form, acceptable as a property in the properties file (hash table) |
void |
windowToBack(java.awt.Window window)
Moves the given window to the bottom of the window stack |
void |
windowToFront(java.awt.Window window)
Moves the given window on top of the window stack |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean LFInstalled
public static final int END_OPERATION_NONE
public static final int END_OPERATION_NEXT_WINDOW
public static final int END_OPERATION_NEW_WINDOW
public static final int END_OPERATION_TITLED_WINDOW
| Constructor Detail |
|---|
public WebCreamUIManager(ClientAgent agent)
throws java.lang.Exception
agent - ClientAgent
java.lang.Exception| Method Detail |
|---|
public void init()
throws java.lang.Exception
java.lang.Exception
public java.awt.Window getWindowInFocus()
throws java.lang.Exception
java.lang.Exception
public void resizeWindows()
throws java.lang.Exception
java.lang.Exceptionpublic void maximizeFrame(java.awt.Frame frame)
frame - public void showWindow(java.awt.Window window)
window - Windowpublic void hideWindow(java.awt.Window window)
window - Windowpublic void windowToFront(java.awt.Window window)
window - Windowpublic void windowToBack(java.awt.Window window)
window - Windowpublic void closeWindow(java.awt.Window window)
public void shutdown()
public void setEndOperationEvent(int eventCode)
eventCode - one of END_OPERATION_XXX constantspublic void setEndOperationWindowTitle(java.lang.String windowTitle)
windowTitle - String
public void installLFTrap()
throws java.lang.Exception
java.lang.Exception
public static boolean shouldRenderEnabled(ClientAgent agent,
java.awt.Component comp)
public static boolean dynamicEventsEnabled(HTMLPage page,
java.awt.Component comp)
public static boolean shouldRenderStandardFileOpenDialog(ClientAgent agent,
java.awt.Container cont)
public static java.lang.String getComponentKeyName(HTMLPage page,
java.lang.Object object)
public static java.lang.String getComponentKeyName(HTMLPage page,
java.lang.Object object,
java.lang.String appendKey)
appendKey - if not null, is appended to the end of the auto-generated keypublic static java.lang.String getComponentName(java.awt.Component comp)
public static java.lang.String cleanupName(java.lang.String name)
name - String
public static java.lang.String cleanupName(java.lang.String name,
java.lang.String appendToName)
name - nameappendToName - this string is appended to the name before the cleanup takes place
public static java.lang.String titleToKey(java.lang.String title)
public void afterEmulateRequest()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getWindowInFocusTitle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||