JDeveloper SCM API

oracle.ide.scm.util
Class SCMCommentsOptionsCustomizer

java.lang.Object
  |
  +--oracle.ide.scm.SCMOptionsCustomizerAdapter
        |
        +--oracle.ide.scm.util.SCMCommentsOptionsCustomizer
All Implemented Interfaces:
SCMOptionsCustomizer

public class SCMCommentsOptionsCustomizer
extends SCMOptionsCustomizerAdapter

Comments options customizer, for user entry of a comments option within the file lister dialog. Designed to decorate any customizer, adding the comments components to the north of the delegated customizer UI. This utility does not provide tri-state support for comments entry. The single comment value is added as a general option keyed against field KEY_COMMENT.

Implementation advice; 'C' is the reserved mnemonic which is used for the comments area of the user interface. Please avoid making a similar mnemonic association in the decorator delegate.


Field Summary
static java.lang.String KEY_COMMENT
          The key for the file comment option
 
Constructor Summary
SCMCommentsOptionsCustomizer()
          Constructs a comments option customizer with no delegate.
SCMCommentsOptionsCustomizer(SCMOptionsCustomizer customizer)
          Constructs a comments option customizer decorating the given customizer.
SCMCommentsOptionsCustomizer(SCMOptionsCustomizer customizer, java.awt.Container location)
          Constructs a comments option customizer decorating the given customizer, and whose UI occupies the given container.
 
Method Summary
 void commitOptions()
          Commits any outstanding changes that may be reflected in components to the customizer's options object.
 java.awt.Component getComponent()
          Gets the initialized comments customizer component.
protected  java.lang.String getDefaultComments()
          Gets the default comments option value.
 SCMOptions getOptions()
          Gets the working options object.
 void initializeOptions(java.util.List l)
          This implementation does nothing.
 void selectionChanged(SCMFile[] before, SCMFile[] after)
          Notifies the customizer that the file selection has changed.
 void validateOptions()
          Perform any necessary validation on options held in the UI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_COMMENT

public static final java.lang.String KEY_COMMENT
The key for the file comment option
Constructor Detail

SCMCommentsOptionsCustomizer

public SCMCommentsOptionsCustomizer()
Constructs a comments option customizer with no delegate.

SCMCommentsOptionsCustomizer

public SCMCommentsOptionsCustomizer(SCMOptionsCustomizer customizer)
Constructs a comments option customizer decorating the given customizer.
Parameters:
customizer - the delegate, or null.

SCMCommentsOptionsCustomizer

public SCMCommentsOptionsCustomizer(SCMOptionsCustomizer customizer,
                                    java.awt.Container location)
Constructs a comments option customizer decorating the given customizer, and whose UI occupies the given container.
Parameters:
customizer - the delegate, or null.
location - the container for UI, or null to use a default layout. When using a location, the delegate's component will be returned; it is assumed that the container location is within the delegate component hierarchy.
Method Detail

getDefaultComments

protected java.lang.String getDefaultComments()
Gets the default comments option value.
Returns:
the default comments.

getComponent

public java.awt.Component getComponent()
Gets the initialized comments customizer component. Also sets up the edit veto document for when the user tries to change a hidden value.
Overrides:
getComponent in class SCMOptionsCustomizerAdapter
Returns:
the component for this customizer.

initializeOptions

public void initializeOptions(java.util.List l)
This implementation does nothing. You can override.
Overrides:
initializeOptions in class SCMOptionsCustomizerAdapter
Parameters:
l - the list of all SCMFiles in the list dialog

getOptions

public SCMOptions getOptions()
Gets the working options object.
Overrides:
getOptions in class SCMOptionsCustomizerAdapter
Returns:
the customizer's options.

selectionChanged

public void selectionChanged(SCMFile[] before,
                             SCMFile[] after)
                      throws SCMSelectionVetoException
Notifies the customizer that the file selection has changed. Updates the UI comments field accordingly, committing any edits.
Overrides:
selectionChanged in class SCMOptionsCustomizerAdapter
Parameters:
before - the previously selected files.
after - the newly selected files.

validateOptions

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

commitOptions

public void commitOptions()
Commits any outstanding changes that may be reflected in components to the customizer's options object.
Overrides:
commitOptions in class SCMOptionsCustomizerAdapter

Copyright © 2002 Oracle Corporation