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

E13403-04

oracle.jdeveloper.library
Class JLibraryList

java.lang.Object
  extended by oracle.jdeveloper.library.JLibraryList
All Implemented Interfaces:
Displayable, Locatable, LibraryList, MutableLibraryList

public final class JLibraryList
extends java.lang.Object
implements MutableLibraryList, Locatable


Field Summary
static URLFilter JDK_FILTER
           
static URLFilter LIB_FILTER
           
static java.lang.String SYSTEM_LIBRARIES
           
static java.lang.String USER_LIBRARIES
           
 
Fields inherited from interface oracle.jdeveloper.library.LibraryList
JDK_LIST_PROPERTY, LIB_LIST_PROPERTY, LISTNAME_PROPERTY, TRANSIENT_PROPERTY
 
Constructor Summary
JLibraryList(java.net.URL url)
           
 
Method Summary
 JDK addJDK(java.lang.String name, java.net.URL exeURL)
          Add a JDK using the given name and based upon the given executble.
 JDK addJDK(java.lang.String name, java.net.URL exeURL, java.net.URL location)
           
 JLibrary addLibrary(java.lang.String name)
          Add a JLibrary using the given name.
 JLibrary addLibrary(java.lang.String name, java.net.URL location)
           
 java.lang.Object createIDFromName(java.lang.String name, boolean isJDK)
          Create an ID based upon the given name.
 JDK findJDK(java.lang.Object id)
          Finds the JDK definition that matches the specified name.
 JLibrary findLibrary(java.lang.Object id)
          Finds the JLibrary that matches the specified id.
 javax.swing.Icon getDefaultIcon()
          Get the default Icon used for newly created Library instances.
 javax.swing.Icon getIcon()
          Returns an Icon that can be shown in association with this Displayable.
 java.util.List getJdkList()
          Retrieves a List of JDK definitions contained in this LibraryList.
 java.util.List getLibraryList()
          Retrieves a List of JLibrary definitions contained in this LibraryList.
 java.lang.String getListName()
          Retrieves the name of this LibraryList.
 java.lang.String getLongLabel()
          Returns a long label that can be displayed to the user.
 java.lang.String getShortLabel()
          Returns a short label that can be displayed to the user.
 java.lang.String getToolTipText()
          Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable.
 java.net.URL getURL()
          Returns the URL that identifies this Locatable.
 boolean isTransient()
          Whether this list is transient (not-persistent).
 boolean remove(Library library)
          Remove a JDK or JLibrary from the respective list.
 void setJdkList(java.util.List jdks)
          Sets a List of JDK definitions contained in this LibraryList.
 void setLibraryList(java.util.List libraries)
          Sets a List of JLibrary definitions contained in this LibraryList.
 void setListName(java.lang.String name)
          Sets the name of this LibraryList.
 void setURL(java.net.URL url)
          Sets the URL associated with this Locatable.
 java.lang.String toString()
          Returns the Short Label displayed to a user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SYSTEM_LIBRARIES

public static final java.lang.String SYSTEM_LIBRARIES

USER_LIBRARIES

public static final java.lang.String USER_LIBRARIES

JDK_FILTER

public static final URLFilter JDK_FILTER

LIB_FILTER

public static final URLFilter LIB_FILTER
Constructor Detail

JLibraryList

public JLibraryList(java.net.URL url)
Method Detail

findJDK

public JDK findJDK(java.lang.Object id)
Description copied from interface: LibraryList
Finds the JDK definition that matches the specified name.

Specified by:
findJDK in interface LibraryList
Parameters:
id - the id of the JDK definition
Returns:
the JDK representing the JDK definition.

findLibrary

public JLibrary findLibrary(java.lang.Object id)
Description copied from interface: LibraryList
Finds the JLibrary that matches the specified id.

Specified by:
findLibrary in interface LibraryList

getJdkList

public java.util.List getJdkList()
Description copied from interface: LibraryList
Retrieves a List of JDK definitions contained in this LibraryList.

Specified by:
getJdkList in interface LibraryList

getLibraryList

public java.util.List getLibraryList()
Description copied from interface: LibraryList
Retrieves a List of JLibrary definitions contained in this LibraryList.

Specified by:
getLibraryList in interface LibraryList

getListName

public java.lang.String getListName()
Description copied from interface: LibraryList
Retrieves the name of this LibraryList.

Specified by:
getListName in interface LibraryList

isTransient

public boolean isTransient()
Description copied from interface: LibraryList
Whether this list is transient (not-persistent). Transient lists cannot have new children created by the user

Specified by:
isTransient in interface LibraryList

getShortLabel

public java.lang.String getShortLabel()
Description copied from interface: Displayable
Returns a short label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. When possible, the returned label should be reasonably short enough to show in the navigator or explorer windows but long enough to clearly identify and distinguish the Displayable.

Specified by:
getShortLabel in interface Displayable
Returns:
a short descriptive label of the Displayable that can be shown to the user.

getLongLabel

public java.lang.String getLongLabel()
Description copied from interface: Displayable
Returns a long label that can be displayed to the user. Generally, the value of the returned String is considered translatable and should therefore be placed in an appropriate resource file. The long label differs from the short label essentially on length. Usually the long label will only be shown on-demand and in places where horizontal space is more available. Examples are the status bar and tooltips.

Specified by:
getLongLabel in interface Displayable
Returns:
a long descriptive label of the Displayable that can be shown to the user.

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: Displayable
Returns an Icon that can be shown in association with this Displayable. Typically the icon will be used in a tree control or list control. Therefore the icon must fit naturally within the space normally given to items within those controls. Such icons are usually 16x16 in size or, if there is a one-pixel transparent padding around the edge, 18x18 in size. It is strongly recommended that icons returned by this method be either 16x16 or 18x18 in size. If null is returned, the control may show a default icon, or it may show no icon, whichever is appropriate.

Specified by:
getIcon in interface Displayable
Returns:
the Icon to be displayed for the Displayable.

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: Displayable
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable. In many cases it may be appropriate for this method to return the same value as Displayable.getLongLabel().

Specified by:
getToolTipText in interface Displayable
Returns:
the tooltip to show when the mouse pointer pauses over a UI component that represents this Displayable.

toString

public java.lang.String toString()
Description copied from interface: Displayable
Returns the Short Label displayed to a user. This overrides the toString method in java.lang.Object.

Implementors of the Displayable interface should override this as appropriate. The default implementation is the same as getShortLabel

Specified by:
toString in interface Displayable
Overrides:
toString in class java.lang.Object
See Also:
Object.toString(), Displayable.getShortLabel()

getURL

public java.net.URL getURL()
Description copied from interface: Locatable
Returns the URL that identifies this Locatable. Parts of the IDE will use the value of this URL as a hash key for caching UI components for this Locatable. Therefore, URL uniqueness is important.

Specified by:
getURL in interface Locatable
Returns:
The URL identifying this Locatable.

setURL

public void setURL(java.net.URL url)
Description copied from interface: Locatable
Sets the URL associated with this Locatable. It is important that the URL only be changed when the Locatable has just been created or when all caches keyed on the previous URL can also be updated.

Specified by:
setURL in interface Locatable
Parameters:
url - The URL to set.

setJdkList

public void setJdkList(java.util.List jdks)
Description copied from interface: MutableLibraryList
Sets a List of JDK definitions contained in this LibraryList.

Specified by:
setJdkList in interface MutableLibraryList

setLibraryList

public void setLibraryList(java.util.List libraries)
Description copied from interface: MutableLibraryList
Sets a List of JLibrary definitions contained in this LibraryList.

Specified by:
setLibraryList in interface MutableLibraryList

setListName

public void setListName(java.lang.String name)
Description copied from interface: MutableLibraryList
Sets the name of this LibraryList.

Specified by:
setListName in interface MutableLibraryList

addJDK

public JDK addJDK(java.lang.String name,
                  java.net.URL exeURL,
                  java.net.URL location)

addJDK

public JDK addJDK(java.lang.String name,
                  java.net.URL exeURL)
Description copied from interface: MutableLibraryList
Add a JDK using the given name and based upon the given executble. If a JDK of the same name already exists within the list, the list is left unmodified and null is returned. If a value of null is provided for the name argument, a unique name relative to the list will be generated.

Specified by:
addJDK in interface MutableLibraryList
Parameters:
name - the name to use for the JDK, or null to generate a unique name.
exeURL - the location of the JDK executable.
Returns:
a new JDK or null if a name collision has resulted.

addLibrary

public JLibrary addLibrary(java.lang.String name,
                           java.net.URL location)

addLibrary

public JLibrary addLibrary(java.lang.String name)
Description copied from interface: MutableLibraryList
Add a JLibrary using the given name. If a JLibrary of the same name already exists within the list, the list is left unmodified and null is returned. If a value of null is provided for the name argument, a unique name relative to the list will be generated.

Specified by:
addLibrary in interface MutableLibraryList
Parameters:
name - the name to use for the JLibrary, or null to generate a unique name.
Returns:
a new JLibrary or null if a name collision has resulted.

remove

public boolean remove(Library library)
Description copied from interface: MutableLibraryList
Remove a JDK or JLibrary from the respective list.

Specified by:
remove in interface MutableLibraryList
Parameters:
library - the library to remove.
Returns:
true if the library was contained in the list.

createIDFromName

public java.lang.Object createIDFromName(java.lang.String name,
                                         boolean isJDK)
Description copied from interface: MutableLibraryList
Create an ID based upon the given name. The ID is not necessarily unique.

Specified by:
createIDFromName in interface MutableLibraryList
Parameters:
name - seed from which to produce the ID.
isJDK - true if the ID should apply to a JDK.
Returns:
a library ID.

getDefaultIcon

public javax.swing.Icon getDefaultIcon()
Description copied from interface: MutableLibraryList
Get the default Icon used for newly created Library instances.

Specified by:
getDefaultIcon in interface MutableLibraryList

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

E13403-04

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