|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.creamtec.ajaxswing.gui.AjaxSwingUIManager
public class AjaxSwingUIManager
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 java.lang.String[] |
JAVA_PACKAGE_NAMES
|
static boolean |
LFInstalled
|
| Constructor Summary | |
|---|---|
AjaxSwingUIManager(ClientAgent agent)
Instantiates the manager for the given client agent |
|
| Method Summary | |
|---|---|
static boolean |
checkForDisabled(java.awt.Container cont,
java.awt.Component comp)
|
void |
closeWindow(java.awt.Window window)
Closes given window |
static boolean |
componentHasListeners(ClientAgent agent,
java.awt.Component comp)
|
static boolean |
dynamicEventsEnabled(AbstractDocument 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 |
java.awt.Component |
getComponentByName(java.lang.String htmlName)
Iterates tree starting from visible window, slow |
AjaxSwingInternalFrameListener |
getInternalFrameListener()
|
java.util.List |
getTopWindows()
Returns the top level window for this agent |
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 |
java.util.List |
getWindows()
|
static boolean |
hasCustomClasses(java.lang.Object[] list)
|
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 |
static boolean |
isCustomClass(java.lang.String className)
|
void |
maximizeFrame(java.awt.Frame frame)
Sets the window size to the maximim possible for the current browser window |
void |
preRenderWindows()
Called after the emulation of the request is finished |
static boolean |
recursevlyEnabled(java.awt.Container cont,
java.awt.Component comp)
|
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 AjaxSwing 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 |
void |
setInternalFrameListener(AjaxSwingInternalFrameListener internalFrameListener)
|
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)
|
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 |
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 java.lang.String[] JAVA_PACKAGE_NAMES
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 AjaxSwingUIManager(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 java.util.List getTopWindows()
throws java.lang.Exception
java.lang.Exceptionpublic java.util.List getWindows()
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 checkForDisabled(java.awt.Container cont,
java.awt.Component comp)
public static boolean recursevlyEnabled(java.awt.Container cont,
java.awt.Component comp)
public static boolean dynamicEventsEnabled(AbstractDocument page,
java.awt.Component comp)
public static boolean componentHasListeners(ClientAgent agent,
java.awt.Component comp)
public static boolean shouldRenderStandardFileOpenDialog(ClientAgent agent,
java.awt.Container cont)
public void preRenderWindows()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getWindowInFocusTitle()
public static boolean hasCustomClasses(java.lang.Object[] list)
public static boolean isCustomClass(java.lang.String className)
public AjaxSwingInternalFrameListener getInternalFrameListener()
public void setInternalFrameListener(AjaxSwingInternalFrameListener internalFrameListener)
public java.awt.Component getComponentByName(java.lang.String htmlName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||