JDeveloper SCM API

oracle.ide.scm
Interface SCMOptionsCustomizer

All Known Implementing Classes:
SCMOptionsCustomizerAdapter

public interface SCMOptionsCustomizer

An SCMOptionsCustomizer is used to customize the options that are available for a generic source control dialog, as defined by an operation's dialog specification. This can be used to display a user interface in each of the dialogs, allowing the user to configure various specific options for the file selection before the action proceeds.


Method Summary
 void commitOptions()
          The customizer should commit any outstanding UI changes that need to be flushed to the Options.
 java.awt.Component getComponent()
          Get the user interface component for this customizer.
 SCMOptions getOptions()
          Get the Options object for this customizer.
 void initializeOptions(java.util.List allItems)
          This method allows you to initialize options for displayed properties in the list dialog.
 void selectionChanged(SCMFile[] oldSelection, SCMFile[] newSelection)
          The customizer is notified when the selection changes in the dialog it is customizing.
 void validateOptions()
          Perform any necessary validation on options held in the UI.
 

Method Detail

getComponent

public java.awt.Component getComponent()
Get the user interface component for this customizer.
Returns:
a component that contains user interface controls which will be placed on the dialog this customizer is for.

getOptions

public SCMOptions getOptions()
Get the Options object for this customizer. The ListOptions object stores information about settings applied in the dialog, and is passed in to the committer when the list dialog is completed.
Returns:
an Options object for this customizer

initializeOptions

public void initializeOptions(java.util.List allItems)
This method allows you to initialize options for displayed properties in the list dialog. You may want to do this if, for example, you have to perform expensive queries on all items and want to pre-cache information about the items This method provides information about all the SCMFiles that will be displayed in the dialog. You should not update or change any UI in this method, just use it to precache information for populating UI when selectionChanged() is called.

selectionChanged

public void selectionChanged(SCMFile[] oldSelection,
                             SCMFile[] newSelection)
                      throws SCMSelectionVetoException
The customizer is notified when the selection changes in the dialog it is customizing. The customizer should update the Options object based on the old selection and current state of any components, then update the components being displayed based on the new selection. The customizer can veto the selection change by throwing a ListSelectionChangeVetoException. This will cause the selection to be reverted to the old selection. The exception should contain a translated string message, which will be displayed in an alert to the user.
Parameters:
oldSelection - the old selection. This may be null if the dialog has just been initialized, and will be a zero-length array if the selection was clear
newSelection - the new selection. This will never be null, but may be a zero-length array if the selection has been cleared.
Throws:
ListSelectionChangeVetoException - if you want to veto the selection.

validateOptions

public void validateOptions()
                     throws SCMException
Perform any necessary validation on options held in the UI.
Throws:
SCMException - if validation failed on an option.

commitOptions

public void commitOptions()
The customizer should commit any outstanding UI changes that need to be flushed to the Options.

Copyright © 2002 Oracle Corporation