|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.universAAL.ui.handler.gui.swing.Renderer
public class Renderer
Coordinator Class for Swing GUI Handler. It will provide all of the needed properties and constants for all other classes, as well as acting as placeholder for all the needed classes to work. This placeholding and mutual reference (between contained and container classes) enables the renderer to be loaded more than once per instance.
Nested Class Summary | |
---|---|
static class |
Renderer.RenderStarter
A bootstrap class to start Renderer(s). |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String |
CONFIGURED_USER
|
protected static String |
DEMO_MODE
The Key value for the demo mode configuration property. |
protected static String |
FORM_MANAGEMENT
The Key value for the Form manager selection configuration property. |
protected static String |
GUI_LOCATION
The Key value for the location configuration property. |
protected InitInterface |
initLAF
Maintenance of the instance created when initialising the LAF, so it can be accessed by LAF components through the renderer. |
protected ModelMapper |
modelMapper
The ModelMapper in order to find the correct
Model for each rdf class. |
protected ModuleContext |
moduleContext
uAAL ModuleContext to make uAAL operations. |
protected static String |
NO_SAVE
Error message to display when unable to save property file. |
protected Properties |
properties
The configuration properties read from the file. |
protected static String |
RENDERER_CONF
FileName for the main configuration File. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
Renderer()
Only to be used by TestCases. |
|
Renderer(ModuleContext mc)
Constructor. |
|
Renderer(ModuleContext mc,
File propFile)
Constructor for one Renderer on a certain file. |
|
Renderer(ModuleContext mc,
File propFile,
IContainerManager cmanager)
Constructor for one Renderer on a certain file with a container manager. |
|
Renderer(ModuleContext mc,
IContainerManager con)
Constructor. |
Method Summary | |
---|---|
boolean |
authenticate(String user,
String password)
Check if a user-password pair is registered. |
protected void |
checkPropertiesVersion()
Checks for updates the properties file, and updates the properties. |
void |
finish()
Terminate current dialog and all pending dialogs. |
static ModuleContext |
getContext()
Get the ModuleContext for the Renderer . |
Form |
getCurrentForm()
Gets the form being displayed right now. |
User |
getCurrentUser()
Get the logged in user, the one that is in theory receiving and manipulating the dialogs. |
FormManager |
getFormManagement()
Get the FormManager being used,
useful to access the current UIResquest
and current form. |
Handler |
getHandler()
get the Handler of this Renderer . |
static String |
getHomeDir()
Get the configuration directory. |
InitInterface |
getInitLAF()
get the Initial instance when the LAF was loaded. |
String |
getLanguage()
Get the Language that should be used. |
ModelMapper |
getModelMapper()
Returns the ModelMapper that automatically assigns this Renderer to the Models. |
ModuleContext |
getModuleContext()
get the ModuleContext . |
String |
getProperty(String string)
Access to the property file. |
String |
getProperty(String key,
String defaultVal)
Access to the property file. |
AbsLocation |
getRendererLocation()
|
boolean |
hasImpairment(AccessImpairment impariment)
Check if impairment is listed as present impairments for the current user and form. |
protected void |
loadFormManager(String FormManagerClassName)
Load the FormManager from name (to be configured in properties file). |
protected void |
loadProperties()
load configuration properties from a file, setting the default for those which are not defined. |
void |
logOffCurrentUser()
The user is requesting a logOff. |
void |
run()
Main, Top Level Renderer Logic. |
static void |
setHome(String absolutePath)
Only to be called by container activator. |
void |
setProperty(String key,
String newValue)
Update the property file. |
void |
shutdownContainer()
Callback the container to shutdown. |
protected void |
storeProperties()
Save the current properties in the file. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String DEMO_MODE
properties
,
Constant Field Valuesprotected static final String NO_SAVE
protected static final String GUI_LOCATION
UIResponse
s.
Default: gui.location = Unknown
properties
,
Constant Field Valuesprotected static final String FORM_MANAGEMENT
FormManager
s
Default: queued.forms=org.universAAL.ui.handler.gui.swing.formManagement.SimpleFormManager
fm
,
QueuedFormManager
,
SimpleFormManager
,
HierarchicalFormManager
,
OverlayFormManager
,
Constant Field Valuesprotected static final String RENDERER_CONF
public static final String CONFIGURED_USER
protected ModuleContext moduleContext
ModuleContext
to make uAAL operations.
protected Properties properties
protected ModelMapper modelMapper
ModelMapper
in order to find the correct
Model
for each rdf class.
protected InitInterface initLAF
Constructor Detail |
---|
protected Renderer()
public Renderer(ModuleContext mc)
mc
- the ModuleContext
to create UIHandler
and send logspublic Renderer(ModuleContext mc, IContainerManager con)
mc
- the ModuleContext
to create UIHandler
and send logscon
- the container manager.public Renderer(ModuleContext mc, File propFile)
mc
- the ModuleContext
to create UIHandler
and send logspropFile
- File
to use as property file for this Renderer
.public Renderer(ModuleContext mc, File propFile, IContainerManager cmanager)
mc
- the ModuleContext
to create UIHandler
and send logspropFile
- File
to use as property file for this Renderer
.cmanager
- the container manager that manages the container operations.Method Detail |
---|
protected final void loadFormManager(String FormManagerClassName)
FormManager
from name (to be configured in properties file).
FormManagerClassName
- the name of the FormManager
to be loaded, if not found SimpleFormManager
will be loaded.protected void loadProperties()
properties
protected void checkPropertiesVersion()
protected void storeProperties()
public final ModuleContext getModuleContext()
ModuleContext
.
moduleContext
public void run()
run
in interface Runnable
run
in class Thread
public void finish()
public final String getProperty(String string)
string
- Key of property to access
properties
public final String getProperty(String key, String defaultVal)
key
- Key of property to accessdefaultVal
- default value for the propertie if isn't int he property file.
properties
public final void setProperty(String key, String newValue)
key
- Key of property to accessnewValue
- New value for the property.properties
public final Form getCurrentForm()
Form
being processed.public final User getCurrentUser()
public final void logOffCurrentUser()
public final boolean hasImpairment(AccessImpairment impariment)
impariment
- the AccessImpairment
to be checked
AccessImpairment
,
UIRequest
public final String getLanguage()
public FormManager getFormManagement()
FormManager
being used,
useful to access the current UIResquest
and current form.
fm
public final ModelMapper getModelMapper()
public final Handler getHandler()
Handler
of this Renderer
.
Handler
public final InitInterface getInitLAF()
public final boolean authenticate(String user, String password)
user
- userID trying to authenticatepassword
- password of the user.
public final AbsLocation getRendererLocation()
public static void setHome(String absolutePath)
absolutePath
- Absolute path to configuration directorypublic static String getHomeDir()
public static ModuleContext getContext()
ModuleContext
for the Renderer
.
ModuleContext
.public void shutdownContainer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |