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

E13403-03

oracle.ide.resourcebundle
Class ResourceBundleKeyChooser

java.lang.Object
  extended by oracle.ide.resourcebundle.ResourceBundleKeyChooser

public final class ResourceBundleKeyChooser
extends java.lang.Object


Field Summary
static java.lang.String SELECTED_RESOURCE_PROPERTY_NAME
           
 
Constructor Summary
ResourceBundleKeyChooser()
           
 
Method Summary
static ResourceBundleKey findOrCreateKey(PropertyStorage project, java.awt.Component owner, java.lang.String bundleId, java.util.List<java.lang.String> altBundles, java.lang.String text)
          Matches a key from an ResourceBundleWrapper on an exact match, or will allow the user to choose a key similiar to the given text, from all available keys, or by creating a new key.
static ResourceBundleKey showChooserDialog(PropertyStorage project, java.awt.Component owner, NodeResourceBundle bundle, java.util.List<java.lang.String> altBundles, java.lang.String text)
          Provides a dialog that can be used to select a key from a resource bundle
static ResourceBundleKey showCreateDialog(java.awt.Component owner, ResourceBundleWrapper bundle, java.lang.String text)
          Display a dialog where a resource text can be created
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTED_RESOURCE_PROPERTY_NAME

public static final java.lang.String SELECTED_RESOURCE_PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

ResourceBundleKeyChooser

public ResourceBundleKeyChooser()
Method Detail

findOrCreateKey

public static ResourceBundleKey findOrCreateKey(PropertyStorage project,
                                                java.awt.Component owner,
                                                java.lang.String bundleId,
                                                java.util.List<java.lang.String> altBundles,
                                                java.lang.String text)
Matches a key from an ResourceBundleWrapper on an exact match, or will allow the user to choose a key similiar to the given text, from all available keys, or by creating a new key.

Parameters:
project - The current Project's Data that owns this file. Must not be null.
owner - The owner Component to use as the parent of the optional Dialog used to choose a resource key.
bundleId - The bundleId to use. This will only be significant if the project is set for one bundle per artifact. The bundle ID is up to the client, however is generally either {PACKAGE_NAME} + {OBJECT_NAME} + "Bundle" or {PACKAGE_NAME} + "Bundle".
altBundles - list of strings of the alternate bundleId's to use. Clients like editors may use this when their source loads multiple bundles. May be null.
text - The text entered by the user.
Returns:
The key containing the translated text, or null if the user canceled.

showChooserDialog

public static final ResourceBundleKey showChooserDialog(PropertyStorage project,
                                                        java.awt.Component owner,
                                                        NodeResourceBundle bundle,
                                                        java.util.List<java.lang.String> altBundles,
                                                        java.lang.String text)
Provides a dialog that can be used to select a key from a resource bundle

Parameters:
project - The current Project's Data that owns this file. Must not be null.
owner - the component that should own the dialog. Must not be null.
bundle - the resource bundle to search. Must not be null.
altBundles - a list of alternative bundle ids. May be null. Typically this is provided by editor clients that can determine that a set of resource bundles that will be programmatically loaded. Each bundle id must be a fully-qualified name.
text - the text to search for. Must not be null.
Returns:
the resource bundle key key that represents the resource text. Will be null if the dialog is cancelled.

showCreateDialog

public static final ResourceBundleKey showCreateDialog(java.awt.Component owner,
                                                       ResourceBundleWrapper bundle,
                                                       java.lang.String text)
Display a dialog where a resource text can be created

Parameters:
owner - the component that owns the dialog
bundle - the bundle to create a new resource in
text - the text that should default as the resource text
Returns:
a ResourceBundleKey object that contains the information about the resource that has been created or null if the user cancels the dialog

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

E13403-03

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