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)
Creates an option panel with the specified parent and name.

Method Summary
public CATDialog getContent()
Returns the child component that is the content of the option panel.
public CATNotification getFlushChangesNotification()
Returns the flush changes notification.
public CATNotification getInitializeNotification()
Returns the initialize notification.
public CATOptionRepository getOptionRepository(String iName)
Returns an option repository from name.
public CATSetting getSetting()
Returns the CATSetting repository managed by the 'Administration & User Preferences' command.
public String getTitle()
Returns the option panel's title.
public void registerToAfterSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
Registers to 'after submit' notification.
public void registerToBeforeSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
Registers to 'before submit' notification.
public void setOptionRepository(String iName, CATOptionRepository iRepository)
Defines an option repository.
public void setTitle(String iTitle)
Sets the option panel's title.
public void unRegisterToAfterSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
Unregisters to 'after submit' notification.
public void unRegisterToBeforeSubmit(String iRegistrationID, Object iListener, String iMethod, Object iData)
Unregisters to 'before submit' notification.


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

getContent

    public CATDialog getContent()

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

Return:
The content child component.

getFlushChangesNotification

    public 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

Return:
The flush changes notification.

getInitializeNotification

    public CATNotification getInitializeNotification()

Returns the initialize notification.

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

Return:
The initialize notification.

getOptionRepository

    public 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.
Return:
iRepository The repository object.

getSetting

    public CATSetting getSetting()

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

Return:
The CATSetting repository.

getTitle

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

Return:
This option panel's title.

registerToAfterSubmit

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

registerToBeforeSubmit

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

setOptionRepository

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

setTitle

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

unRegisterToAfterSubmit

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

unRegisterToBeforeSubmit

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


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