Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.jdeveloper.library
Class ListWrapper

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

public class ListWrapper
extends java.lang.Object
implements MutableLibraryList


Field Summary
static int BOTH_LISTS
           
static int JDK_LIST
           
static int LIBRARY_LIST
           
 
Fields inherited from interface oracle.jdeveloper.library.LibraryList
JDK_LIST_PROPERTY, LIB_LIST_PROPERTY, LISTNAME_PROPERTY, TRANSIENT_PROPERTY
 
Constructor Summary
ListWrapper(LibraryList list)
           
ListWrapper(LibraryList list, int mode)
           
 
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.
 JLibrary addLibrary(java.lang.String name)
          Add a JLibrary using the given name.
 void commit(boolean notify)
           
 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.
 LibraryList getWrappedList()
           
 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.
 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

LIBRARY_LIST

public static final int LIBRARY_LIST
See Also:
Constant Field Values

JDK_LIST

public static final int JDK_LIST
See Also:
Constant Field Values

BOTH_LISTS

public static final int BOTH_LISTS
See Also:
Constant Field Values
Constructor Detail

ListWrapper

public ListWrapper(LibraryList list)

ListWrapper

public ListWrapper(LibraryList list,
                   int mode)
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.

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)
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)
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.

getWrappedList

public LibraryList getWrappedList()

commit

public void commit(boolean notify)

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()

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
11g Release 2 (11.1.2.1.0)

E17493-02

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