Package com.dassault_systemes.catweb.base.util

   
Class CommonSupport

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catweb.base.util.CommonSupport
Class Location

Framework : PortalBase

Module : PLBbase

Class Description

public class CommonSupport

Class of utilities methods for getting desktop informations.

Field Summary
boolean APPLICATION_MODE
int MODE_APPLICATION
int MODE_HTTPAPPLI
int MODE_NOMAD
int MODE_APPLET
TimeZone TIME_ZONE
int WARNING_MESSAGE
int ERROR_MESSAGE
int INFO_MESSAGE

Constructor Summary

Method Summary
void removeInstance()
void showWaitingCursor()
void hideWaitingCursor()
void showWaitingMessage(String waitingMessage)
void hideWaitingMessage()
void destroyAckMessage()
void sendNonAckMessage(int boxType, String message)
String createCATlet(String catletName)
String[] getTypesforFileExtension(String fileExtension)
String[] getLabelsforType(String catletType)
String[] getInstanceNamesforType(String catletType)
void showCATletProperties()
void showURL(URL url)
void showURL(String url)
void showURLInNewWindow(URL url)
void showURLInNewWindow(String url)
void showCATletHelp()
Image getEnoviaIcon()
String getCurrentCATletName()
void activateCATlet(ICATlet catlet)
void activateCATlet(String instanceName)
void closeCATlet(ICATlet catlet)
void closeCATlet(ICATlet catlet, boolean checkPersistence)
String getCurrentDocumentNameOfCATlet(String instanceName)
void registerToHelpManager(Component component)
void unregisterFromHelpManager(Component component)
Frame getMainFrame()
Frame getLogonFrame()
void setLogonFrame(Frame frame)
void addBookmarkInProject(Object data, String projectName)
void addBookmarkInProject(String name, Object data, String projectName)
void addBookmarkInProject(Object data)
void addBookmarkInProject(Object[] dataList)
void addBookmarkInProject(String name, Object data)
void addBookmarkInProject(String[] nameList, Object[] dataList)
String getCurrentProjectName()
String[] getAvailableProjectNames()
Menu getAvailableProjectNamesMenu()
Applet getApplet()
int getRunningMode()
String getParameter(String paramName)
float getVersion()
String getLocalDomainName()


Field Detail

APPLICATION_MODE

    boolean APPLICATION_MODE
True when desktop is running in Application mode.


MODE_APPLICATION

    int MODE_APPLICATION
Defines the current extended mode of the desktop : Application, HTTP Application, Nomad or Applet.


MODE_HTTPAPPLI

    int MODE_HTTPAPPLI


MODE_NOMAD

    int MODE_NOMAD


MODE_APPLET

    int MODE_APPLET


TIME_ZONE

    TimeZone TIME_ZONE
time zone use for the application


WARNING_MESSAGE

    int WARNING_MESSAGE
Different message types


ERROR_MESSAGE

    int ERROR_MESSAGE


INFO_MESSAGE

    int INFO_MESSAGE


Constructor Detail

Method Detail

removeInstance

    void removeInstance()

Removes instance


showWaitingCursor

    void showWaitingCursor()

Informs the webtop to display WAIT cursor.


hideWaitingCursor

    void hideWaitingCursor()

Informs the webtop to stop display WAIT cursor.


showWaitingMessage

    void showWaitingMessage(String waitingMessage)

Shows a waiting message

Parameters:
waitingMessage
- the message to display

hideWaitingMessage

    void hideWaitingMessage()

Hides the waiting messages frame


destroyAckMessage

    void destroyAckMessage()

Destroys current message if generated by a sendAckMessage


sendNonAckMessage

    void sendNonAckMessage(int boxType, String message)

Displays a message without acknowledge

Parameters:
boxType
is the style of the box (@see WARNING_MESSAGE @see INFO_MESSAGE @see ERROR_MESSAGE)
message
is the string to display

createCATlet

    String createCATlet(String catletName)

Creates CATlet with this name

Parameters:
catletName
- the catlet name
Returns:
the instance name

getTypesforFileExtension

    String[] getTypesforFileExtension(String fileExtension)

Returns an array of CATlet types for the specified file extension Theses CATlets are defined in the 'application.properties' file

Parameters:
fileExtension
is the extension of path name (e.g "model", "draft")

getLabelsforType

    String[] getLabelsforType(String catletType)

Returns the labels of the catlets for the specified type

Parameters:
catletType
- the specified catlet type.

getInstanceNamesforType

    String[] getInstanceNamesforType(String catletType)

Returns the names of existing CATlets for the specified type

Parameters:
catletType
- the specified catlet type.

showCATletProperties

    void showCATletProperties()

Displays a properties editor for current active CATlet and its sub-controller if any


showURL

    void showURL(URL url)

Makes the Webtop display a page defined by the URL given

Parameters:
url
- the url on the page to display

showURL

    void showURL(String url)

Makes the Webtop display a page defined by the relative or full url path given

Parameters:
url
- a full or relative url path on the page to display

showURLInNewWindow

    void showURLInNewWindow(URL url)

Makes the Webtop display a page defined by the URL given in a new browser window

Parameters:
url
- the url on the page to display

showURLInNewWindow

    void showURLInNewWindow(String url)

Makes the Webtop display a page defined by the relative or full url path given in a new browser window

Parameters:
url
- a full or relative url path on the page to display

showCATletHelp

    void showCATletHelp()

Displays help for current active CATlet.


getEnoviaIcon

    Image getEnoviaIcon()

Gets the little icon that can be used when dialog boxes of the application are iconified. It is also the icon that is displayed on the title bar of NT frames.


getCurrentCATletName

    String getCurrentCATletName()

Returns the name of the current active CATlet.


activateCATlet

    void activateCATlet(ICATlet catlet)

Activates the specified catlet.

Parameters:
catlet
- the catlet instance to activate.
See Also:
com.dassault_systemes.catweb.base.catlet.ICATlet

activateCATlet

    void activateCATlet(String instanceName)

Activates the catlet specified by its instance name

Parameters:
instanceName
- the instance name of the catlet to activate.
See Also:
com.dassault_systemes.catweb.base.catlet.ICATlet#getCATletName()

closeCATlet

    void closeCATlet(ICATlet catlet)

Closes a CATlet. If catlet implements PersistentCATlet the isDirty method will be called to check if it need to be saved or not before being closed.

Parameters:
catlet
- the catlet instance to close.
See Also:
com.dassault_systemes.catweb.base.catlet.ICATlet

closeCATlet

    void closeCATlet(ICATlet catlet, boolean checkPersistence)

Closes a CATlet. If flag is set to true and catlet implements PersistentCATlet the isDirty method will be called to check if it need to be saved or not before being closed. If flag is set to false catlet is removed wether it needs to be saved or not.

Parameters:
catlet
- the catlet instance to close.
checkPersistence
- the boolean flag for persistence check.
See Also:
com.dassault_systemes.catweb.base.catlet.ICATlet

getCurrentDocumentNameOfCATlet

    String getCurrentDocumentNameOfCATlet(String instanceName)

Returns the name of the current document loaded in the CATlet specified by its instance name.

Parameters:
instanceName
- the instance name of the catlet.

registerToHelpManager

    void registerToHelpManager(Component component)

Registers a component to the HelpManager so that any key action as F1 or Shift+F1 are taken into acount and trigger the corresponding help action.

Parameters:
component
- the component to register to the HelpManager.

unregisterFromHelpManager

    void unregisterFromHelpManager(Component component)

Unregisters a component that was previously registered to the HelpManager

Parameters:
component
- the component to unregister.

getMainFrame

    Frame getMainFrame()

Returns the application main frame so that dialog box can attach themselves under this frame


getLogonFrame

    Frame getLogonFrame()


setLogonFrame

    void setLogonFrame(Frame frame)


addBookmarkInProject

    void addBookmarkInProject(Object data, String projectName)

Adds the following Object inside the project specfied by its name.

Parameters:
data
- the object to bookmark.
projectName
- the name of the destination project.

addBookmarkInProject

    void addBookmarkInProject(String name, Object data, String projectName)

Adds the following Object inside the project specfied by its name. The data will be bookmarked with the specified name

Parameters:
name
- the name with which the data will be bookmarked
data
- the object to bookmark.
projectName
- the name of the destination project.

addBookmarkInProject

    void addBookmarkInProject(Object data)

Adds the following Object in a project chosen interactively by the user.

Parameters:
data
- the object to bookmark.

addBookmarkInProject

    void addBookmarkInProject(Object[] dataList)

Adds the following list of Object in a project chosen interactively by the user.

Parameters:
dataList
- the list of objects to bookmark.

addBookmarkInProject

    void addBookmarkInProject(String name, Object data)

Adds the following Object in a project chosen interactively by the user. The data will be bookmarked with the specified name

Parameters:
name
- the name with which the data will be bookmarked
data
- the object to bookmark.

addBookmarkInProject

    void addBookmarkInProject(String[] nameList, Object[] dataList)

Adds the following list of Objects in a project chosen interactively by the user. The data will be bookmarked with the specified name (nameList[i] is the bookmark name for dataList[i])

Parameters:
nameList
- the list of names with which the data will be bookmarked
dataList
- the list of objects to bookmark.

getCurrentProjectName

    String getCurrentProjectName()

Returns the name of the current selected project.


getAvailableProjectNames

    String[] getAvailableProjectNames()

Returns the list of available project names.


getAvailableProjectNamesMenu

    Menu getAvailableProjectNamesMenu()

Returns a menu with the list of available project names.

See Also:
java.awt.Menu

getApplet

    Applet getApplet()

Returns the applet used to start the application. May be null if application was launched as a standalone application.


getRunningMode

    int getRunningMode()

Returns the current desktop mode:


getParameter

    String getParameter(String paramName)

Returns the specified launch argument. This method encapsulate System.getProperty and Applet.getParameter.

Parameters:
paramName
the parameter name defined in the command line or the html page.
Returns:
the parameter value. Null if no such parameter has been defined.

getVersion

    float getVersion()

Returns the current version number of the application.


getLocalDomainName

    String getLocalDomainName()

Returns the domain name of the local host.



Copyright © 2000, Dassault Systèmes. All rights reserved