org.netbeans.modules.project.libraries/1 1.29.1

org.netbeans.api.project.libraries
Class LibraryChooser

java.lang.Object
  extended by org.netbeans.api.project.libraries.LibraryChooser

public final class LibraryChooser
extends Object

Visual picker for libraries.

Since:
org.netbeans.modules.project.libraries/1 1.16

Nested Class Summary
static interface LibraryChooser.Filter
          Filter for use by LibraryChooser#createPanel() or LibraryChooser#showDialog().
static interface LibraryChooser.LibraryImportHandler
          Handler for library importing.
static interface LibraryChooser.Panel
          Represents operations permitted by createPanel(org.netbeans.api.project.libraries.LibraryManager, org.netbeans.api.project.libraries.LibraryChooser.Filter).
 
Method Summary
static LibraryChooser.Panel createPanel(LibraryManager manager, LibraryChooser.Filter filter)
          Create a picker as an embeddable panel.
static Set<Library> showDialog(LibraryManager manager, LibraryChooser.Filter filter, LibraryChooser.LibraryImportHandler handler)
          Create a chooser showing libraries from given library manager and let the user to pick some.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

showDialog

public static Set<Library> showDialog(LibraryManager manager,
                                      LibraryChooser.Filter filter,
                                      LibraryChooser.LibraryImportHandler handler)
Create a chooser showing libraries from given library manager and let the user to pick some.

Parameters:
manager - manager; can be null in which case global libraries are listed
filter - optional libraries filter; null for no filtering
handler - handler to perform library importing; can be null in which case import will not be allowed in UI
Returns:
a nonempty set of libraries that were selected, or null if the dialog was cancelled

createPanel

public static LibraryChooser.Panel createPanel(LibraryManager manager,
                                               LibraryChooser.Filter filter)
Create a picker as an embeddable panel. Might be used in a wizard, for example.

Parameters:
manager - library manager to use or null for global libraries
filter - optional libraries filter; null for no filtering
Returns:
a panel controller

org.netbeans.modules.project.libraries/1 1.29.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.