Package com.dassault_systemes.catjdialog

   
Class CATOptionPanel

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjdialog.CATCallbackSource
        |
        +-com.dassault_systemes.catjdialog.CATDialog
              |
              +-com.dassault_systemes.catjdialog.CATOptionPanel
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATOptionPanel

The option panel graphical component.

Description:

This is a dedicated container for managing centralized application settings in the general 'Administration & User Preferences' command.
This container supports only one child component, that is the content it will display.

Here are some rules:

The controller has the possibility to manage settings from another source than CATSetting. In that case it will have to implement its own CATOptionRepository object.

See the CAA technical article "Creating Administration Commands" for details.

CATOptionPanel Properties:

CATOptionPanel Notifications:

CATOptionPanel Message Catalog Implicit Mappings:

   All Implemented Interfaces:
CATITitleDialog
See Also:
com.dassault_systemes.catjdialog.CATOptionRepository
Field Summary

Constructor Summary
CATOptionPanel(CATDialog iParent, String iName)

Method Summary
CATSetting getSetting()
CATNotification getInitializeNotification()
CATNotification getFlushChangesNotification()
void registerToBeforeSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
void registerToAfterSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
void unRegisterToBeforeSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
void unRegisterToAfterSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
String getTitle()
void setTitle(String iTitle)
CATDialog getContent()
void setOptionRepository(String iName, CATOptionRepository iRepository)
CATOptionRepository getOptionRepository(String iName)


Field Detail

Constructor Detail

CATOptionPanel

    CATOptionPanel(CATDialog iParent, String iName)

Creates an option panel with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This option panel name. Here are some rules for this name:
  • It is set in the constructor, and cannot be changed afterwards.
  • The name must be unique for the parent (2 children with the same name are not allowed).
  • The name may not contain any ot the following characters: '.' (dot), ' ' (blank), '_' (underscore)

Method Detail

getSetting

    CATSetting getSetting()

Returns the CATSetting repository managed by the 'Administration & User Preferences' command.

Returns:
The CATSetting repository.

getInitializeNotification

    CATNotification getInitializeNotification()

Returns the initialize notification.

This notification is sent when the option panel has been initialized (has a CATSetting)

Returns:
The initialize notification.

getFlushChangesNotification

    CATNotification getFlushChangesNotification()

Returns the flush changes notification.

The option panel fires this notification to warn that setting changes should be logged into the CATSetting repository

Returns:
The flush changes notification.

registerToBeforeSubmit

    void registerToBeforeSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)

Registers to 'before submit' notification.

This notification is fired right before saving the CATSetting repository (when the user presses the 'Ok' or the 'Apply' button).
This is to allow controllers to store their own settings in an other place than CATSetting.

Parameters:
iRegistrationID
The registration identifier (only one registration is made with a given id).
iListener
The listener object.
iMethod
The callback method.
iData
The callbacl data.
See Also:
CATCallbackSource#addCallback(CATNotification, Object, String, Object)

registerToAfterSubmit

    void registerToAfterSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)

Registers to 'after submit' notification.

This notification is fired right after saving the CATSetting repository (when the user presses the 'Ok' or the 'Apply' button).
This is to allow controllers to store their own settings in an other place than CATSetting.

Parameters:
iRegistrationID
The registration identifier (only one registration is made with a given id).
iListener
The listener object.
iMethod
The callback method.
iData
The callbacl data.
See Also:
CATCallbackSource#addCallback(CATNotification, Object, String, Object)

unRegisterToBeforeSubmit

    void unRegisterToBeforeSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)

Unregisters to 'before submit' notification.

Parameters:
iRegistrationID
The registration identifier.
iListener
The listener object.
iMethod
The callback method.
iData
The callbacl data.
See Also:
CATCallbackSource#removeCallback(CATNotification, Object, String, Object)

unRegisterToAfterSubmit

    void unRegisterToAfterSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)

Unregisters to 'after submit' notification.

Parameters:
iRegistrationID
The registration identifier.
iListener
The listener object.
iMethod
The callback method.
iData
The callbacl data.
See Also:
CATCallbackSource#removeCallback(CATNotification, Object, String, Object)

getTitle

    String getTitle()

Returns the option panel's title.

Returns the programmatic value if setTitle() has been called, or tries to retrieve its title from the associated message catalog file (<optionpanel_path>.Title entry).

Returns:
This option panel's title.

setTitle

    void setTitle(String iTitle)

Sets the option panel's title.

Calling this method sets programmatically the title. This should be reserved for cases where the title can only be determined by dynamic means.
The standard way of defining components messages is using CATNls catalog files (supports NLS).

Parameters:
iTitle
The string that is to be this option panel's title.

getContent

    CATDialog getContent()

Returns the child component that is the content of the option panel.

Returns:
The content child component.

setOptionRepository

    void setOptionRepository(String iName, CATOptionRepository iRepository)

Defines an option repository.

This is an object able to manage settings from another source than CATSetting.

Parameters:
iName
The repository name.
iRepository
The repository object.

getOptionRepository

    CATOptionRepository getOptionRepository(String iName)

Returns an option repository from name.

This is an object able to manage settings from another source than CATSetting.

Parameters:
iName
The repository name.
Returns:
iRepository The repository object.


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