Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.jdeveloper.vcs.spi
Class VCSCommentsCustomizer

java.lang.Object
  extended by oracle.jdeveloper.vcs.spi.VCSCommentsCustomizer
All Implemented Interfaces:
VCSOptionsCustomizer
Direct Known Subclasses:
ChangeListCommentsCustomizer

public class VCSCommentsCustomizer
extends java.lang.Object
implements VCSOptionsCustomizer

Utility class for using comments options in an options customizer.

Since:
9.0.5

Field Summary
static java.lang.String COMMENT_TEMPLATES_NAVIGABLE_LABEL
           
protected static java.lang.String KEY_PROPERTY_DEFAULT_TEMPLATE_INDEX
           
protected static java.lang.String KEY_PROPERTY_TEMPLATES
           
static java.lang.String KEY_SETTING_COMMENTS
           
static java.lang.String KEY_SETTING_REUSE_COMMENTS
           
 
Constructor Summary
VCSCommentsCustomizer()
          Constructor.
VCSCommentsCustomizer(VCSOptionsCustomizer delegateCustomizer)
          Constructor.
 
Method Summary
 ClientSetting getClientSetting()
          Gets the ClientSetting object from which comment template settings will be retrieved.
 java.awt.Component getComponent()
          Gets the component of the options cusomizer instance.
 java.awt.Component getInitialFocusComponent()
          Get the component to focus initially when the customizer is displayed.
 java.util.Map<?,?> getOptions()
          Gets options from the customizer, based on internal component states.
 VCSRecentCommentsModel getRecentCommentsModel()
          Gets the comments model to be used for making historical comments available in a completion popup.
 java.lang.String getTemplatesDataKey()
          Gets the data key used to retrieve comment templates from settings.
protected  javax.swing.text.JTextComponent getTextComponent()
          Get the text component.
protected  boolean isCommentTextChanged()
           
 boolean isShowTemplatesAndCommentsCombo()
          Asks whether the customizer will show a combobox containing templates and recently used comments.
protected  void layoutContainer(java.awt.Container container, java.awt.Component commentsUI, java.awt.Component delegateUI)
          Performs layout of the comments customizer container.
 void setClientSetting(ClientSetting clientSetting)
          Sets the ClientSetting object from which comment template settings will be retrieved.
 void setCommentsComponentsEnabled(boolean enabled)
           
 void setContextURLs(java.net.URL[] contextUrls)
          Sets the contextual URLs for the comments customizer invocation.
 void setDefaultVisibleRows(int rows)
          Override the default number of visible rows.
 void setFlatLook(boolean isFlat)
          Set whether this component has a flat look.
 void setOptions(java.util.Map<?,?> options)
          Sets options on the customizer, updating internal component states.
 void setRecentCommentsModel(VCSRecentCommentsModel commentsModel)
          Sets the comments model to be used for making historical comments available in a completion popup.
 void setShowReuseCommentsOption(boolean showReuseCommentsOption)
          Sets whether the 'reuse comments' option is supported by this customizer.
 void setShowTemplatesAndCommentsCombo(boolean showTemplatesAndCommentsCombo)
          Sets whether the customizer will show a combobox containing templates and recently used comments.
 void setSuppressContextMenu(boolean suppressContextMenu)
          Deprecated. not replaced; setting this property has no effect.
 void setSuppressDefaultTemplate(boolean suppressDefaultTemplate)
           
 void setSystemTemplate(java.lang.String systemTemplate)
          Sets a template value that will be made available alongside other comment templates.
 void setTemplatesAndCommentsOrientation(int templatesAndCommentsOrientation)
          Sets the positional orientation of the templates and comments combobox UI.
 void setTemplatesDataKey(java.lang.String templatesDataKey)
          Sets the data key used to retrieve comment templates from settings.
 void setTemplatesSettingsPath(java.lang.String[] templatesSettingsPath)
          Sets the path to the templates page in product preferences.
 void setVisiblePopupRows(int popupRows)
          Deprecated. not replaced. This class now provides support for a combobox listing previously entered comments, which can be enabled by calling setShowTemplatesAndCommentsCombo(boolean) with true.
protected  void updateTemplatesAndComments()
           
 void validateOptions()
          Validates internal component states ahead of committing options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_PROPERTY_TEMPLATES

protected static final java.lang.String KEY_PROPERTY_TEMPLATES
See Also:
Constant Field Values

KEY_PROPERTY_DEFAULT_TEMPLATE_INDEX

protected static final java.lang.String KEY_PROPERTY_DEFAULT_TEMPLATE_INDEX
See Also:
Constant Field Values

KEY_SETTING_COMMENTS

public static final java.lang.String KEY_SETTING_COMMENTS
See Also:
Constant Field Values

KEY_SETTING_REUSE_COMMENTS

public static final java.lang.String KEY_SETTING_REUSE_COMMENTS
See Also:
Constant Field Values

COMMENT_TEMPLATES_NAVIGABLE_LABEL

public static final java.lang.String COMMENT_TEMPLATES_NAVIGABLE_LABEL
Constructor Detail

VCSCommentsCustomizer

public VCSCommentsCustomizer()
Constructor.


VCSCommentsCustomizer

public VCSCommentsCustomizer(VCSOptionsCustomizer delegateCustomizer)
Constructor.

Parameters:
delegateCustomizer - the delegate options customizer instance.
Method Detail

setShowReuseCommentsOption

public void setShowReuseCommentsOption(boolean showReuseCommentsOption)
Sets whether the 'reuse comments' option is supported by this customizer.

Parameters:
showReuseCommentsOption - a decision on whether the 'reuse comments' option should be used.

setRecentCommentsModel

public void setRecentCommentsModel(VCSRecentCommentsModel commentsModel)
Sets the comments model to be used for making historical comments available in a completion popup.

Parameters:
commentsModel - the comments model object.

getRecentCommentsModel

public VCSRecentCommentsModel getRecentCommentsModel()
Gets the comments model to be used for making historical comments available in a completion popup.

Returns:
the comments model object.

setShowTemplatesAndCommentsCombo

public void setShowTemplatesAndCommentsCombo(boolean showTemplatesAndCommentsCombo)
Sets whether the customizer will show a combobox containing templates and recently used comments.

Parameters:
showTemplatesAndCommentsCombo - a decision on whether templates and previous comments should be shown.

isShowTemplatesAndCommentsCombo

public boolean isShowTemplatesAndCommentsCombo()
Asks whether the customizer will show a combobox containing templates and recently used comments.

Returns:
true if templates and previous comments will be shown.

setTemplatesAndCommentsOrientation

public void setTemplatesAndCommentsOrientation(int templatesAndCommentsOrientation)
Sets the positional orientation of the templates and comments combobox UI.

Parameters:
templatesAndCommentsOrientation - the orientation value, this can be SwingConstants.SOUTH or SwingConstants.NORTH_EAST.

setClientSetting

public void setClientSetting(ClientSetting clientSetting)
Sets the ClientSetting object from which comment template settings will be retrieved. This is used in conjunction with the value established by setTemplatesDataKey(java.lang.String).

Parameters:
clientSetting - the client settings object.

getClientSetting

public ClientSetting getClientSetting()
Gets the ClientSetting object from which comment template settings will be retrieved.

Returns:
the client settings object.

setTemplatesDataKey

public void setTemplatesDataKey(java.lang.String templatesDataKey)
Sets the data key used to retrieve comment templates from settings. This is used in conjunction with the value established by setClientSetting(oracle.ide.config.ClientSetting).

Parameters:
templatesDataKey - the data key.

getTemplatesDataKey

public java.lang.String getTemplatesDataKey()
Gets the data key used to retrieve comment templates from settings.

Returns:
the data key.

setSystemTemplate

public void setSystemTemplate(java.lang.String systemTemplate)
Sets a template value that will be made available alongside other comment templates. This is used to augment the list when the version control client has its own mechanism for template configuration.

Parameters:
systemTemplate - the system template value.

setTemplatesSettingsPath

public void setTemplatesSettingsPath(java.lang.String[] templatesSettingsPath)
Sets the path to the templates page in product preferences. If a value is set, a hyperlink style button will be included in the UI providing a shortcut to the templates preferences page.

Parameters:
templatesSettingsPath - the qualified path.

setSuppressContextMenu

@Deprecated
public void setSuppressContextMenu(boolean suppressContextMenu)
Deprecated. not replaced; setting this property has no effect.

Sets whether the use of a context menu over the comments area should be suppressed.

Parameters:
suppressContextMenu - a decision on whether the context menu should be suppressed.

setDefaultVisibleRows

public void setDefaultVisibleRows(int rows)
Override the default number of visible rows.

Parameters:
rows - the number of rows to display.

setVisiblePopupRows

@Deprecated
public void setVisiblePopupRows(int popupRows)
Deprecated. not replaced. This class now provides support for a combobox listing previously entered comments, which can be enabled by calling setShowTemplatesAndCommentsCombo(boolean) with true.

Override the default number of visible completion popup rows.

Parameters:
popupRows - the number of completion popup rows to display.

setFlatLook

public void setFlatLook(boolean isFlat)
Set whether this component has a flat look.

Parameters:
isFlat - true if the component should be painted in a flat style

setContextURLs

public final void setContextURLs(java.net.URL[] contextUrls)
Sets the contextual URLs for the comments customizer invocation. This allows the customizer to default the comments value from the change sets configuration.

Parameters:
contextUrls - the contextual URLs.

setSuppressDefaultTemplate

public final void setSuppressDefaultTemplate(boolean suppressDefaultTemplate)

getComponent

public java.awt.Component getComponent()
Description copied from interface: VCSOptionsCustomizer
Gets the component of the options cusomizer instance.

Specified by:
getComponent in interface VCSOptionsCustomizer
Returns:
the customzier's component.

getInitialFocusComponent

public java.awt.Component getInitialFocusComponent()
Description copied from interface: VCSOptionsCustomizer
Get the component to focus initially when the customizer is displayed.

Specified by:
getInitialFocusComponent in interface VCSOptionsCustomizer
Returns:
a component to focus. (null-capable)

setOptions

public void setOptions(java.util.Map<?,?> options)
Description copied from interface: VCSOptionsCustomizer
Sets options on the customizer, updating internal component states.

Specified by:
setOptions in interface VCSOptionsCustomizer
Parameters:
options - the map of options values.

getOptions

public java.util.Map<?,?> getOptions()
Description copied from interface: VCSOptionsCustomizer
Gets options from the customizer, based on internal component states.

Specified by:
getOptions in interface VCSOptionsCustomizer
Returns:
a map of options values.

validateOptions

public void validateOptions()
                     throws VCSException
Description copied from interface: VCSOptionsCustomizer
Validates internal component states ahead of committing options.

Specified by:
validateOptions in interface VCSOptionsCustomizer
Throws:
VCSException - if an option states is invalid.

setCommentsComponentsEnabled

public void setCommentsComponentsEnabled(boolean enabled)

updateTemplatesAndComments

protected final void updateTemplatesAndComments()

layoutContainer

protected void layoutContainer(java.awt.Container container,
                               java.awt.Component commentsUI,
                               java.awt.Component delegateUI)
Performs layout of the comments customizer container.

Parameters:
container - the container to lay out.
commentsUI - the user interface component for comments entry.
delegateUI - the user interface component for delegate options entry.

getTextComponent

protected javax.swing.text.JTextComponent getTextComponent()
Get the text component.

Returns:
the text component.

isCommentTextChanged

protected final boolean isCommentTextChanged()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.