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
public static boolean APPLICATION_MODE
True when desktop is running in Application mode.
public static final int ERROR_MESSAGE
public static final int INFO_MESSAGE
public static final int MODE_APPLET
public static final int MODE_APPLICATION
Defines the current extended mode of the desktop : Application, HTTP Application, Nomad or Applet.
public static final int MODE_HTTPAPPLI
public static final int MODE_NOMAD
public static TimeZone TIME_ZONE
time zone use for the application
public static final int WARNING_MESSAGE
Different message types

Constructor Summary

Method Summary
public static void activateCATlet(ICATlet catlet)
Activates the specified catlet.
public static void activateCATlet(String instanceName)
Activates the catlet specified by its instance name
public static void addBookmarkInProject(Object data)
Adds the following Object in a project chosen interactively by the user.
public static void addBookmarkInProject(Object[] dataList)
Adds the following list of Object in a project chosen interactively by the user.
public static void addBookmarkInProject(Object data, String projectName)
Adds the following Object inside the project specfied by its name.
public static void addBookmarkInProject(String[] nameList, Object[] dataList)
Adds the following list of Objects in a project chosen interactively by the user.
public static void addBookmarkInProject(String name, Object data)
Adds the following Object in a project chosen interactively by the user.
public static void addBookmarkInProject(String name, Object data, String projectName)
Adds the following Object inside the project specfied by its name.
public static void closeCATlet(ICATlet catlet)
Closes a CATlet.
public static void closeCATlet(ICATlet catlet, boolean checkPersistence)
Closes a CATlet.
public static String createCATlet(String catletName)
Creates CATlet with this name
public static final void destroyAckMessage()
Destroys current message if generated by a sendAckMessage
public static Applet getApplet()
Returns the applet used to start the application.
public static String[] getAvailableProjectNames()
Returns the list of available project names.
public static Menu getAvailableProjectNamesMenu()
Returns a menu with the list of available project names.
public static String getCurrentCATletName()
Returns the name of the current active CATlet.
public static String getCurrentDocumentNameOfCATlet(String instanceName)
Returns the name of the current document loaded in the CATlet specified by its instance name.
public static String getCurrentProjectName()
Returns the name of the current selected project.
public static Image getEnoviaIcon()
Gets the little icon that can be used when dialog boxes of the application are iconified.
public static GraphicsDevice GetGraphicsDevice(int x, int y)
Returns GraphicsDevice for given coordinates WVO:23-09-2010
public static String[] getInstanceNamesforType(String catletType)
Returns the names of existing CATlets for the specified type
public static String[] getLabelsforType(String catletType)
Returns the labels of the catlets for the specified type
public static String getLocalDomainName()
Returns the domain name of the local host.
public static Frame getLogonFrame()
public static Frame getMainFrame()
Returns the application main frame so that dialog box can attach themselves under this frame
public static String getParameter(String paramName)
Returns the specified launch argument.
public static int getRunningMode()
Returns the current desktop mode:
public static int getTotalScreenWidth()
WVO:13-MAY-2010
public static String[] getTypesforFileExtension(String fileExtension)
Returns an array of CATlet types for the specified file extension Theses CATlets are defined in the 'application.properties' file
public static float getVersion()
Returns the current version number of the application.
public static final void hideWaitingCursor()
Informs the webtop to stop display WAIT cursor.
public static final synchronized void hideWaitingMessage()
Hides the waiting messages frame
public static boolean isSSOActivated()
NRC:01-Jun-09:SSO Login HL(B0666688)
public static 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.
public static final void removeInstance()
Removes instance
public static final synchronized void sendNonAckMessage(int boxType, String message)
Displays a message without acknowledge
public static void setLogonFrame(Frame frame)
public static final synchronized void showCATletHelp()
Displays help for current active CATlet.
public static final synchronized void showCATletProperties()
Displays a properties editor for current active CATlet and its sub-controller if any
public static final synchronized void showURL(String url)
Makes the Webtop display a page defined by the relative or full url path given
public static final synchronized void showURL(URL url)
Makes the Webtop display a page defined by the URL given
public static final synchronized void showURLInNewWindow(String url)
Makes the Webtop display a page defined by the relative or full url path given in a new browser window
public static final synchronized void showURLInNewWindow(URL url)
Makes the Webtop display a page defined by the URL given in a new browser window
public static final void showWaitingCursor()
Informs the webtop to display WAIT cursor.
public static final synchronized void showWaitingMessage(String waitingMessage)
Shows a waiting message
public static void unregisterFromHelpManager(Component component)
Unregisters a component that was previously registered to the HelpManager


Field Detail

APPLICATION_MODE

    public static boolean APPLICATION_MODE
True when desktop is running in Application mode.


ERROR_MESSAGE

    public static final int ERROR_MESSAGE


INFO_MESSAGE

    public static final int INFO_MESSAGE


MODE_APPLET

    public static final int MODE_APPLET


MODE_APPLICATION

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


MODE_HTTPAPPLI

    public static final int MODE_HTTPAPPLI


MODE_NOMAD

    public static final int MODE_NOMAD


TIME_ZONE

    public static TimeZone TIME_ZONE
time zone use for the application


WARNING_MESSAGE

    public static final int WARNING_MESSAGE
Different message types


Constructor Detail

Method Detail

activateCATlet

    public static 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

    public static 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()

addBookmarkInProject

    public static void addBookmarkInProject(Object data)

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

Parameters:
data
- the object to bookmark.

addBookmarkInProject

    public static 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

    public static 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

    public static 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.

addBookmarkInProject

    public static 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

    public static 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.

closeCATlet

    public static 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

    public static 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

createCATlet

    public static String createCATlet(String catletName)

Creates CATlet with this name

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

destroyAckMessage

    public static final void destroyAckMessage()

Destroys current message if generated by a sendAckMessage


getApplet

    public static Applet getApplet()

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


getAvailableProjectNames

    public static String[] getAvailableProjectNames()

Returns the list of available project names.


getAvailableProjectNamesMenu

    public static Menu getAvailableProjectNamesMenu()

Returns a menu with the list of available project names.

See Also:
java.awt.Menu

getCurrentCATletName

    public static String getCurrentCATletName()

Returns the name of the current active CATlet.


getCurrentDocumentNameOfCATlet

    public static 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.

getCurrentProjectName

    public static String getCurrentProjectName()

Returns the name of the current selected project.


getEnoviaIcon

    public static 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.


GetGraphicsDevice

    public static GraphicsDevice GetGraphicsDevice(int x, int y)

Returns GraphicsDevice for given coordinates WVO:23-09-2010

Parameters:
x
The X coordinate
y
The Y coordinate
Return:
The GraphicsDevice for the given coordinates

getInstanceNamesforType

    public static String[] getInstanceNamesforType(String catletType)

Returns the names of existing CATlets for the specified type

Parameters:
catletType
- the specified catlet type.

getLabelsforType

    public static String[] getLabelsforType(String catletType)

Returns the labels of the catlets for the specified type

Parameters:
catletType
- the specified catlet type.

getLocalDomainName

    public static String getLocalDomainName()

Returns the domain name of the local host.


getLogonFrame

    public static Frame getLogonFrame()


getMainFrame

    public static Frame getMainFrame()

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


getParameter

    public static 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.
Return:
the parameter value. Null if no such parameter has been defined.

getRunningMode

    public static int getRunningMode()

Returns the current desktop mode:


getTotalScreenWidth

    public static int getTotalScreenWidth()

WVO:13-MAY-2010

Return:

getTypesforFileExtension

    public static 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")

getVersion

    public static float getVersion()

Returns the current version number of the application.


hideWaitingCursor

    public static final void hideWaitingCursor()

Informs the webtop to stop display WAIT cursor.


hideWaitingMessage

    public static final synchronized void hideWaitingMessage()

Hides the waiting messages frame


isSSOActivated

    public static boolean isSSOActivated()

NRC:01-Jun-09:SSO Login HL(B0666688)


registerToHelpManager

    public static 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.

removeInstance

    public static final void removeInstance()

Removes instance


sendNonAckMessage

    public static final synchronized 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

setLogonFrame

    public static void setLogonFrame(Frame frame)


showCATletHelp

    public static final synchronized void showCATletHelp()

Displays help for current active CATlet.


showCATletProperties

    public static final synchronized void showCATletProperties()

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


showURL

    public static final synchronized 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

showURL

    public static final synchronized void showURL(URL url)

Makes the Webtop display a page defined by the URL given

Parameters:
url
- the url on the page to display

showURLInNewWindow

    public static final synchronized 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

showURLInNewWindow

    public static final synchronized 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

showWaitingCursor

    public static final void showWaitingCursor()

Informs the webtop to display WAIT cursor.


showWaitingMessage

    public static final synchronized void showWaitingMessage(String waitingMessage)

Shows a waiting message

Parameters:
waitingMessage
- the message to display

unregisterFromHelpManager

    public static void unregisterFromHelpManager(Component component)

Unregisters a component that was previously registered to the HelpManager

Parameters:
component
- the component to unregister.


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