/** * Shows libraries customizer for global libraries. * @param activeLibrary if not null the activeLibrary is selected in the opened customizer * @return true if user pressed OK and libraries were sucessfully modified */ public static boolean showCustomizer (Library activeLibrary) { return showCustomizer(activeLibrary, LibraryManager.getDefault()); }
private void manageLibrariesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_manageLibrariesButtonActionPerformed if (LibrariesCustomizer.showCustomizer(null, manager)) { setRootNode(); } }//GEN-LAST:event_manageLibrariesButtonActionPerformed
public boolean accept(Library library) { return manager.getLibrary(library.getName()) == null; } }
private Library getJAXRPCLibrary(LibraryManager libraryManager) { for (Library library : libraryManager.getLibraries()) { if (library.getType().equals("j2se")) { // NOI18N if (library.getName().equals("jaxrpc16")) { // NOI18N return library; } } } return null; }
@Override public void run() { synchronized (singleton) { if (null != lmgr) { lmgr.removePropertyChangeListener(pcl); content = null; name = null; } } } });
private void createButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createButtonActionPerformed Library l = LibrariesCustomizer.showCreateNewLibraryCustomizer(manager); if (l != null) { setRootNode(); selectLibrary(Collections.singleton(l)); } }//GEN-LAST:event_createButtonActionPerformed
public static Set<Library> showChooser(LibraryManager manager, LibraryChooser.Filter filter, LibraryChooser.LibraryImportHandler handler, boolean addOperation) { LibraryChooserGUI l = new LibraryChooserGUI(manager, filter, handler); return l.showDialog(addOperation); }
public static void main(String[] args) { Library lib = new Library(); . . . lib.addStudent(g); // etc. }
Library lib = new Library(); . . . lib.findMaximum(table);
public static LibraryChooser.Panel createPanel(LibraryManager manager, LibraryChooser.Filter filter) { LibraryChooserGUI l = new LibraryChooserGUI(manager, filter, null); l.configureForEmbedded(); return l; }
var Library = Backbone.Collection.extend({ model: Person }); var lib = new Library(); lib.push(person1); lib.push(person2); lib.push(person3);
@Override protected Node[] createNodes(Library lib) { return new Node[] { new LibraryNode(lib) }; }
/** * Create a chooser showing libraries from given library manager and let the * user to pick some. * @param manager manager; can be null in which case global libraries are listed * @param filter optional libraries filter; null for no filtering * @param handler handler to perform library importing; can be null in which case * import will not be allowed in UI * @return a nonempty set of libraries that were selected, or null if the dialog was cancelled */ public static Set<Library> showDialog(LibraryManager manager, Filter filter, LibraryImportHandler handler) { return LibraryChooserGUI.showChooser(manager, filter, handler, true); }
/** * Create a picker as an embeddable panel. * Might be used in a wizard, for example. * @param manager library manager to use or null for global libraries * @param filter optional libraries filter; null for no filtering * @return a panel controller */ public static Panel createPanel(LibraryManager manager, Filter filter) { return LibraryChooserGUI.createPanel(manager, filter); }
// in transaction Library library2 = new Library() em.persist(library2) Book book = c.findBookById() book.library = library2
function Library(){ var push=[].push; var data=[]; this.save1=function(x){push.call(data, x);} this.save2=function(x){data.push(x);} this.get=function(){console.log(data);} } var o=new Library(); //Random on-page code Array.prototype.push=function(x){console.info("doSomethingCrazy!");} //Lets use the library functionality! o.save1(1); o.save2(2);