|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.client.Application
public abstract class Application
Basic class for Desktop (SWT) Applications. Includes connection and utility functions.
Field Summary | |
---|---|
org.eclipse.swt.graphics.Image |
appIcon
The Application icon |
java.lang.String |
application_MainMenu
The Application main menu |
Configuration |
conf
Configuration object |
static java.lang.String |
CONF_FILE_SECTION
"FILE" |
static java.lang.String |
CONF_VIEW_SECTION
"VIEW" |
java.util.Hashtable<java.lang.String,org.eclipse.swt.widgets.Shell> |
dialogs
The Application dialog registry |
java.lang.String |
dictionary_common_section
Dictionary section for Common labels |
java.lang.String |
dictionary_default_language
The default dictionary language |
java.lang.String |
dictionary_menu_section
Dictionary section for Menu labels |
java.lang.String |
dictionary_section
Dictionary section for Application labels |
org.eclipse.swt.widgets.Display |
display
Application SWT display |
static com.oberon.ooql.connection.DriverManager |
driverManager
Database JDBC driver manager |
Framework |
framework
OBEROn user framework |
static org.eclipse.swt.graphics.Font |
globalfont
The Application default font |
static java.lang.String |
ID
"ID" |
static boolean |
isRWT
RWT Application flag |
java.util.Locale |
locale
Default Locale |
java.lang.String |
name
The Application title |
java.lang.String |
name_revision_separator
Default name-revision separator |
java.lang.String |
number_separator_symbols
Use the fixed decimal separator |
static int |
ON_TOP
"ON TOP options for dialog windows" |
java.lang.String |
search_all_label
Label "All" for search selection item |
boolean |
selectApplication
Select Application from a list |
javax.servlet.http.HttpSession |
session
The Application session |
org.eclipse.swt.widgets.Shell |
shell
Application SWT shell |
boolean |
show_object_class
Show the Object class in the result lists |
boolean |
show_object_namerev
Show the Object name / revision in the result lists |
static java.lang.String |
sToken
Default separator token |
java.lang.String |
subname
The Application subtitle |
java.lang.String |
uploadDir
|
static java.lang.String |
URL_JAVAAPI
Java API documentation web link |
static java.lang.String |
URL_OBERON
OBEROn Web Site |
static java.lang.String |
URL_OOQL
OOQL syntax documentation web link |
boolean |
use_search_patterns
Use the search patterns for text fields |
Constructor Summary | |
---|---|
Application()
|
Method Summary | |
---|---|
static void |
addDialog(java.lang.String sName,
org.eclipse.swt.widgets.Shell dialog)
Add a dialog popup to the dialog-window registry |
static void |
addDownloadFile(java.lang.String sFileName)
Add a file name to the download list |
void |
closeConnections()
Close all OBEROn connections |
static int |
computeHeight(int height)
Scale the element height based on the application window height |
static int |
computeWidth(int width)
Scale the element width based on the application window width |
static org.eclipse.swt.graphics.Image |
convertImage(byte[] baImage,
int scx,
int scy)
Convert and resize a byte[] image |
org.eclipse.swt.widgets.Menu |
createMenu(java.lang.String menuName)
Generate the application main Menu |
static byte[] |
createProgressBarImage(float value,
int width,
int height,
javax.servlet.http.HttpSession httpSession)
Create an image representing a progress bar [need the SWT jar installed] |
static void |
errorMessage(org.eclipse.swt.widgets.Shell shell,
java.lang.Exception exception,
java.lang.String sTitle)
Display an Error Message for a thread Exception |
static Application |
getApp()
|
static java.lang.String |
getClassNameRevision(ObjectObj object,
javax.servlet.http.HttpSession session)
Compose the object Class-Name-Revision string |
java.util.Vector<int[]> |
getCommandCoords()
Get the command text coordinates for each OOQL command for the last performOOQLCommands execution |
static java.lang.String |
getCommonTranslation(java.lang.String key)
Translate a keyword searching in the Application Common dictionary-Section |
OBConnection |
getConnection()
Get OBEROn connection |
java.lang.String |
getConnectionProperty(java.lang.String property)
Get a configuration property value from the "CONNECTION" section |
static java.lang.Object |
getData(org.eclipse.swt.widgets.Widget widget,
java.lang.String tag)
Get a custom property value from SWT widget |
static org.eclipse.swt.widgets.Shell |
getDialog(java.lang.String sName)
Retrieve a dialog popup from the dialog-window registry |
static java.util.Vector<java.lang.String> |
getDownloadFiles()
Return the file download list |
static Framework |
getFramework(javax.servlet.http.HttpSession session)
Retrieve the current framework from the HttpSession |
static org.eclipse.swt.graphics.Image |
getIcon(java.lang.String iconName)
Retrieve an image/icon from the OBEROn JAR package |
static java.lang.String |
getIconFileName(org.eclipse.swt.widgets.Shell shell,
java.lang.String sTitle,
int style)
Open a File Selection Dialog for Image files |
org.eclipse.swt.graphics.Image |
getImage(int iAdminId,
int scx,
int scy)
Retrieve the administrative object icon using the internal ID and resize it |
org.eclipse.swt.graphics.Image |
getImage(java.lang.String sAdminType,
java.lang.String sAdminName,
int scx,
int scy)
Retrieve the administrative object icon from the OBEROn DB and resize it |
static java.lang.String |
getLinkData(Link link,
javax.servlet.http.HttpSession session)
Compose the link identification string as "Linktype From(Class/Name/Revision) -> To(Class/Name/Revision)" use the name_revision_separator between the object name and the revision |
static java.lang.String |
getMenuTranslation(java.lang.String key)
Translate a keyword searching in the Application Menu dictionary-Section |
static java.lang.String |
getNameRevision(java.lang.String sName,
java.lang.String sRevision)
Compose the Name-Revision string separated by name_revision_separator |
org.eclipse.swt.graphics.Image |
getObjImage(java.lang.String sObjectID,
int scx,
int scy)
Retrieve a object instance icon and resize it |
java.lang.String |
getProperty(java.lang.String section,
java.lang.String property)
Get a configuration property value |
static java.lang.String |
getTranslation(java.lang.String key)
Translate a keyword searching in the Application dictionary-Section |
static java.lang.String |
getTranslation(java.lang.String section,
java.lang.String key)
Translate a keyword searching in a specific dictionary-Section |
static java.lang.String |
getTranslation(java.lang.String language,
java.lang.String section,
java.lang.String key)
Translate a keyword to a specific language, searching in a specific dictionary-Section |
static org.eclipse.swt.widgets.Widget |
getWindow(org.eclipse.swt.widgets.Control view)
|
static int |
getWindowHeight()
Get the application window height |
static int |
getWindowWidth()
Get the application window width |
abstract boolean |
handleRequest(ApplicationRequest request)
Handle an Application request |
boolean |
isConnected()
Check if the Application is connected to the Database or to RMI/HTTP server |
boolean |
isDBConnection()
Check if the Connection is established directly to the DB |
static org.eclipse.swt.graphics.Font |
loadMonospacedFont(org.eclipse.swt.widgets.Display display)
Load the Segoe standard Font from the JAR package |
abstract void |
log(java.lang.String message)
Show a message in the application Log panel or in the status bar |
void |
openConnections()
Open the OBEROn Database/RMI/HTTP connections and perform the Login (open the Framework if user account is specified) |
boolean |
openFramework(java.lang.String sUserName,
java.lang.String sPassword)
Login into OBEROn |
java.lang.String |
parseOOQLCommands(java.lang.String sOOQLCommands)
Parse the OOQL command text |
java.util.Vector<java.lang.String> |
performOOQLCommands(java.lang.String sOOQLCommands)
Perform one or more OBEROn OOQL commands with current application Framework |
void |
performSearch(org.eclipse.swt.widgets.Table results,
java.util.Vector<?> vExclude,
java.lang.String sTypeName,
java.lang.String sFilter,
boolean append)
Perform a selection of administrative objects |
void |
performSearch(org.eclipse.swt.widgets.Table results,
java.util.Vector<?> vExclude,
java.lang.String sApplication,
java.lang.String sTypeName,
java.lang.String sFilter,
boolean append)
Perform a selection of administrative objects |
void |
releaseConnection(OBConnection conn)
Release an OBEROn connection |
void |
setApp(Application application)
|
static void |
setData(org.eclipse.swt.widgets.Widget widget,
java.lang.String tag,
java.lang.Object value)
Set a custom property to SWT widget |
abstract void |
setFramework()
Open the Framework dialog to login into OBEROn |
static void |
setFramework(javax.servlet.http.HttpSession session,
Framework framework)
Save the current framework into the HttpSession |
void |
setNoVerbose()
Turn off the verbose option |
static void |
setWindowHeight(int heigth)
Set the application window height |
static void |
setWindowWidth(int width)
Set the application window width |
static void |
showMessage(org.eclipse.swt.widgets.Shell shell,
java.lang.String sMessage,
java.lang.String sTitle,
int style)
Display a Message |
static org.eclipse.swt.widgets.Shell |
showSplash(java.lang.String sLogo)
Shows the OBEROn logo and info on start-up |
abstract java.lang.String |
translateOberonLanguageToISO639Language(java.lang.String language)
Convert the language code from the Application format to standard ISO code |
static org.eclipse.swt.widgets.Shell |
windowOpen(org.eclipse.swt.widgets.Composite parent,
ApplicationRequest request,
java.lang.String windowName,
java.lang.String style)
Open new PopUp window (dialog) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String sToken
public static final java.lang.String URL_OBERON
public static final java.lang.String URL_OOQL
public static final java.lang.String URL_JAVAAPI
public org.eclipse.swt.widgets.Display display
public org.eclipse.swt.widgets.Shell shell
public java.lang.String name
public java.lang.String subname
public static boolean isRWT
public org.eclipse.swt.graphics.Image appIcon
public static org.eclipse.swt.graphics.Font globalfont
public final java.util.Hashtable<java.lang.String,org.eclipse.swt.widgets.Shell> dialogs
public javax.servlet.http.HttpSession session
public Framework framework
public java.util.Locale locale
public boolean selectApplication
public static com.oberon.ooql.connection.DriverManager driverManager
public Configuration conf
public java.lang.String application_MainMenu
public java.lang.String dictionary_menu_section
public java.lang.String dictionary_common_section
public java.lang.String dictionary_section
public java.lang.String dictionary_default_language
public boolean show_object_class
public boolean show_object_namerev
public boolean use_search_patterns
public java.lang.String number_separator_symbols
public java.lang.String name_revision_separator
public java.lang.String search_all_label
public static final java.lang.String ID
public static final java.lang.String CONF_FILE_SECTION
public static final java.lang.String CONF_VIEW_SECTION
public static int ON_TOP
public java.lang.String uploadDir
Constructor Detail |
---|
public Application()
Method Detail |
---|
public void setApp(Application application)
public static Application getApp()
public java.lang.String getProperty(java.lang.String section, java.lang.String property)
section
- configuration file sectionproperty
- property namepublic java.lang.String getConnectionProperty(java.lang.String property)
property
- property namepublic void openConnections()
ConnectionManager.openConnections(Application)
public void closeConnections()
public OBConnection getConnection()
ConnectionManager.getConnection(Framework)
public void releaseConnection(OBConnection conn)
conn
- The OBEROn connectionConnectionManager.releaseConnection(OBConnection,Framework)
public boolean isConnected()
ConnectionManager.isConnected()
public boolean isDBConnection()
ConnectionManager.isDBConnection()
public static Framework getFramework(javax.servlet.http.HttpSession session)
public static void setFramework(javax.servlet.http.HttpSession session, Framework framework)
public boolean openFramework(java.lang.String sUserName, java.lang.String sPassword) throws java.lang.Exception
sUserName
- the user namesPassword
- the user password
java.lang.Exception
public java.util.Vector<java.lang.String> performOOQLCommands(java.lang.String sOOQLCommands) throws OberonException, com.oberon.ooql.parser.ParserLogException, com.oberon.ooql.parser.ParserCreationException
sOOQLCommands
- command text
OberonException
com.oberon.ooql.parser.ParserLogException
com.oberon.ooql.parser.ParserCreationException
public java.lang.String parseOOQLCommands(java.lang.String sOOQLCommands) throws OberonException, com.oberon.ooql.parser.ParserLogException, com.oberon.ooql.parser.ParserCreationException
sOOQLCommands
- command text
OberonException
com.oberon.ooql.parser.ParserLogException
com.oberon.ooql.parser.ParserCreationException
public java.util.Vector<int[]> getCommandCoords()
public void setNoVerbose()
public void performSearch(org.eclipse.swt.widgets.Table results, java.util.Vector<?> vExclude, java.lang.String sTypeName, java.lang.String sFilter, boolean append)
results
- SWT table to show the search resultvExclude
- Vector of object names excluded from the resultsTypeName
- object typesFilter
- filter patternappend
- if true append the found objects to the table; otherwise replace the current contentpublic void performSearch(org.eclipse.swt.widgets.Table results, java.util.Vector<?> vExclude, java.lang.String sApplication, java.lang.String sTypeName, java.lang.String sFilter, boolean append)
results
- SWT table to show the search resultvExclude
- Vector of object names excluded from the resultsApplication
- application namesTypeName
- object typesFilter
- filter patternappend
- if true append the found objects to the table; otherwise replace the current contentpublic static org.eclipse.swt.graphics.Image getIcon(java.lang.String iconName)
iconName
- the icon/image file namepublic static org.eclipse.swt.graphics.Image convertImage(byte[] baImage, int scx, int scy)
baImage
- byte array imagescx
- resize width (if 0 is ignored)scy
- resize height (if 0 is ignored)
public org.eclipse.swt.graphics.Image getImage(java.lang.String sAdminType, java.lang.String sAdminName, int scx, int scy)
sAdminType
- administrative object typesAdminName
- administrative object namescx
- resize width (if 0 is ignored)scy
- resize height (if 0 is ignored)public org.eclipse.swt.graphics.Image getImage(int iAdminId, int scx, int scy)
iAdminId
- the internal IDscx
- resize width (if 0 is ignored)scy
- resize height (if 0 is ignored)public org.eclipse.swt.graphics.Image getObjImage(java.lang.String sObjectID, int scx, int scy)
sObjectID
- the Object idscx
- resize width (if 0 is ignored)scy
- resize height (if 0 is ignored)public static byte[] createProgressBarImage(float value, int width, int height, javax.servlet.http.HttpSession httpSession) throws java.lang.Exception
value
- the percentage of completionwidth
- the image widthheight
- the image height
java.lang.Exception
public static int computeWidth(int width)
public static int computeHeight(int height)
public static void setWindowWidth(int width)
public static void setWindowHeight(int heigth)
public static int getWindowWidth()
public static int getWindowHeight()
public static org.eclipse.swt.graphics.Font loadMonospacedFont(org.eclipse.swt.widgets.Display display)
public static org.eclipse.swt.widgets.Shell showSplash(java.lang.String sLogo)
public static void errorMessage(org.eclipse.swt.widgets.Shell shell, java.lang.Exception exception, java.lang.String sTitle)
exception
- the thread ExceptionsTitle
- the message box titlepublic static void showMessage(org.eclipse.swt.widgets.Shell shell, java.lang.String sMessage, java.lang.String sTitle, int style)
sMessage
- the showed messagesTitle
- the message box titlestyle
- the message type ( see SWT MessageBox styles )public static java.lang.String getIconFileName(org.eclipse.swt.widgets.Shell shell, java.lang.String sTitle, int style)
sTitle
- the dialog titlestyle
- the dialog style (see SWT FileDialog styles)public static void addDialog(java.lang.String sName, org.eclipse.swt.widgets.Shell dialog)
sName
- the dialog window namedialog
- the dialogpublic static org.eclipse.swt.widgets.Shell getDialog(java.lang.String sName)
sName
- the dialog window namepublic static java.lang.String getClassNameRevision(ObjectObj object, javax.servlet.http.HttpSession session) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getNameRevision(java.lang.String sName, java.lang.String sRevision)
public static java.lang.String getLinkData(Link link, javax.servlet.http.HttpSession session) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getCommonTranslation(java.lang.String key)
public static java.lang.String getMenuTranslation(java.lang.String key)
public static java.lang.String getTranslation(java.lang.String key)
public static java.lang.String getTranslation(java.lang.String section, java.lang.String key)
public static java.lang.String getTranslation(java.lang.String language, java.lang.String section, java.lang.String key)
public org.eclipse.swt.widgets.Menu createMenu(java.lang.String menuName)
menuName
- the name of Menu
public static void setData(org.eclipse.swt.widgets.Widget widget, java.lang.String tag, java.lang.Object value)
widget
- the SWT widgettag
- the property namevalue
- the property valuepublic static java.lang.Object getData(org.eclipse.swt.widgets.Widget widget, java.lang.String tag)
widget
- the SWT widgettag
- the property namepublic static void addDownloadFile(java.lang.String sFileName)
public static java.util.Vector<java.lang.String> getDownloadFiles()
public static org.eclipse.swt.widgets.Shell windowOpen(org.eclipse.swt.widgets.Composite parent, ApplicationRequest request, java.lang.String windowName, java.lang.String style)
parent
- the parent shellrequest
- Application request with target urlwindowName
- the dialog window namestyle
- the HTML window style (width,height,resizable,scrollable...)
public static org.eclipse.swt.widgets.Widget getWindow(org.eclipse.swt.widgets.Control view)
public abstract void log(java.lang.String message)
public abstract void setFramework()
public abstract boolean handleRequest(ApplicationRequest request)
public abstract java.lang.String translateOberonLanguageToISO639Language(java.lang.String language)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |