|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnextapp.echo2.app.ApplicationInstance
com.sptci.echo2.Application
public class Application
A base class that extends ApplicationInstance and
can serve as the base class for the application specific
global application instance.
Copyright 2006 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected String |
contentPane
The fully qualified name of the ContentPane class that will
be set as the content of window. |
protected static Logger |
logger
The logger to use to log errors/messages to. |
static int |
MINIMUM_INTERVAL
The minimum interval at which tasks will be enqueued. |
protected int |
pollingInterval
The polling interval as which any tasks in updateTasks will
be executed. |
protected String |
styleSheet
The fully qualified name of the StyleSheet class that will be
set for the application. |
private TaskQueueHandle |
taskQueue
The task queue handle for this application instance. |
static Map<String,TimeZone> |
TIME_ZONES
A map that is used to store the time offsets from UTC and their corresponding time zone short names. |
protected TimeZone |
timeZone
The time zone for the client browser. |
private Map<Controller.Updater,Runnable> |
updateTasks
A container used to store all the tasks that have been queued for the current application session. |
protected User |
user
The value object that represents the user currently logged on to the application. |
protected Window |
window
The Window instance that will be controlled by this
application. |
| Fields inherited from class nextapp.echo2.app.ApplicationInstance |
|---|
FOCUSED_COMPONENT_CHANGED_PROPERTY, ID_STRING, LOCALE_CHANGED_PROPERTY, MODAL_COMPONENTS_CHANGED_PROPERTY, WINDOWS_CHANGED_PROPERTY |
| Constructor Summary | |
|---|---|
Application()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addPane(FloatingPane pane)
Add the specified FloatingPane to the
ContentPane of window with an
appropriate z-index. |
protected void |
addTask(Controller.Updater updater,
Runnable runnable)
Add the specified updater task to the task queue. |
static Application |
getApplication()
Convenience method to return the active application as a properly typed object. |
String |
getContentPane()
Return contentPane, the fully qualified name of the
ContentPane used in window. |
Locale[] |
getLocales()
Return the Locales specified by the client browser for the
current session. |
static String |
getOffset(int offset)
Parse the specified offset from UTC in milliseconds and return it in HHmm format. |
static View |
getParentView(Component component)
Return the view component that is the parent of the specified component. |
String |
getStyleSheet()
Return styleSheet. |
TimeZone |
getTimeZone()
Return the timezone of the client browser. |
User |
getUser()
Returns user. |
Window |
getWindow()
Returns window. |
protected int |
getZIndex()
Get the z-index value to use for the next
FloatingPane component to be added. |
boolean |
hasQueuedTasks()
Over-ridden to enqueue each task in updateTasks. |
Window |
init()
The mandatory initialisation method. |
void |
processFatalException(Throwable t)
A global handler for exceptions encountered while updating the display. |
void |
removePane(FloatingPane pane)
Remove the specified FloatingPane from the
ContentPane of window. |
protected void |
removeTask(Controller.Updater updater)
Remove the specified updater task from the task queue. |
void |
setContentPane(String contentPane)
Sets the values of contentPane to the fully qualified name of
the ContentPane class. |
void |
setStyleSheet(String styleSheet)
Sets the value of styleSheet. |
void |
setUser(User user)
Set user. |
protected void |
updatePollingInterval()
Update pollingInterval to the maximum value in the
intervals for all the tasks that are queued. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger logger
public static final int MINIMUM_INTERVAL
public static final Map<String,TimeZone> TIME_ZONES
private TaskQueueHandle taskQueue
private Map<Controller.Updater,Runnable> updateTasks
protected int pollingInterval
updateTasks will
be executed.
protected TimeZone timeZone
protected Window window
Window instance that will be controlled by this
application.
protected String contentPane
ContentPane class that will
be set as the content of window.
protected String styleSheet
StyleSheet class that will be
set for the application.
protected User user
| Constructor Detail |
|---|
public Application()
| Method Detail |
|---|
public static Application getApplication()
Application instance.public Window init()
window
and returns it.
init in class ApplicationInstancewindow.ServerDelayMessage,
setStyleSheet(java.lang.String),
Window.setContent(nextapp.echo2.app.ContentPane)public void processFatalException(Throwable t)
t - The fatal exceptionpublic Window getWindow()
window.
public void addPane(FloatingPane pane)
FloatingPane to the
ContentPane of window with an
appropriate z-index.
pane - The window pane that is to be added.getZIndex()public void removePane(FloatingPane pane)
FloatingPane from the
ContentPane of window.
pane - The pane window pane that is to be removed.protected int getZIndex()
z-index value to use for the next
FloatingPane component to be added.
protected void addTask(Controller.Updater updater,
Runnable runnable)
protected void removeTask(Controller.Updater updater)
protected void updatePollingInterval()
pollingInterval to the maximum value in the
intervals for all the tasks that are queued.
public boolean hasQueuedTasks()
updateTasks.
hasQueuedTasks in class ApplicationInstancepublic Locale[] getLocales()
Locales specified by the client browser for the
current session. The getLocale method inherited from
ApplicationInstance returns only the locale of the server.
public TimeZone getTimeZone()
timeZone lazily.
public static String getOffset(int offset)
HHmm format. This is used to lookup TimeZone
instances.
offset - The offset from UTC in milliseconds.
public static View getParentView(Component component)
component - The component whose parent view is to be returned.
null if no parent that is an
instance of view exists.public String getContentPane()
contentPane, the fully qualified name of the
ContentPane used in window.
public void setContentPane(String contentPane)
contentPane to the fully qualified name of
the ContentPane class.
contentPane - The value to set.public String getStyleSheet()
styleSheet.
public void setStyleSheet(String styleSheet)
styleSheet.
styleSheet - The fully qualified name to set.public User getUser()
user.
public void setUser(User user)
user.
user - The value to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||