public Object readResolve () { DataObject obj = entry.getDataObject (); OpenSupport os = (OpenSupport)obj.getCookie (OpenSupport.class); if (os == null) { // problem! no replace!? return this; } // use the editor support's CloneableTopComponent.Ref return os.allEditors (); } }
protected DataObject handleCopy (DataFolder f) throws IOException { if (getOriginal() instanceof DataFolder) { DataFolder.testNesting(((DataFolder)getOriginal()), f); } return super.handleCopy(f); }
protected FileObject handleMove (DataFolder f) throws IOException { if (getOriginal() instanceof DataFolder) { DataFolder.testNesting(((DataFolder)getOriginal()), f); } return super.handleMove(f); }
private void originalChanged () { DataObject ori = obj.getOriginal(); if (ori.isValid()) { changeOriginal (ori.getNodeDelegate(), true); } else { updateShadowOriginal(obj); } }
/** Method that allows environment to find its * cloneable open support. * @return the support or null if the environemnt is not in valid * state and the CloneableOpenSupport cannot be found for associated * data object */ public CloneableOpenSupport findCloneableOpenSupport() { return (CloneableOpenSupport)getDataObject ().getCookie (CloneableOpenSupport.class); }
/** Getter for order object. * @return order of children */ private FolderOrder getOrder () { return FolderOrder.findFor (getPrimaryFile ()); }
/** Uses cache to remember list of classes to them this object is * assignable. */ public Class instanceClass() throws IOException, ClassNotFoundException { Class type = super.instanceClass (customClassLoader); updateListOfClasses (type, entry ().getFile ()); return type; }
/** fill in instance file's extension list; if ext == null new list is created */ private ExtensionList initExtensions(ExtensionList ext) { String rqext [] = getRequiredExt (); if (ext == null) ext = new ExtensionList(); for (int i = 0; i < rqext.length; i++) ext.addExtension(rqext[i]); return ext; }
protected DataShadow handleCreateShadow (DataFolder f) throws IOException { if (getOriginal() instanceof DataFolder) { DataFolder.testNesting(((DataFolder)getOriginal()), f); } return original.handleCreateShadow (f); }
private final MultiDataObject createMultiObject(FileObject fo) throws DataObjectExistsException, IOException { MultiFileLoader loader = getMultiFileLoader (); MultiDataObject obj; if (loader != null) { obj = DataObjectPool.createMultiObject(loader, fo); } else { obj = (MultiDataObject)getLoader ().findDataObject (fo, RECOGNIZER); } return obj; }
/** Set the sort mode for the folder. * @param mode an constant from {@link DataFolder.SortMode} * @exception IOException if the mode cannot be set */ public synchronized final void setSortMode (SortMode mode) throws IOException { SortMode old = getOrder ().getSortMode (); getOrder ().setSortMode (mode); firePropertyChange (PROP_SORT_MODE, old, getOrder ().getSortMode ()); }
private void reload (DataObject obj) { Iterator it; if ( obj == null || (it = getIterator (obj)) == null ) { it = defaultIterator (); } this.iterator.setIterator (it, true); }
/** Accessor method for chaining entity resolver implementation. */ private static synchronized XMLEntityResolverChain getChainingEntityResolver() { if (chainingEntityResolver == null) { chainingEntityResolver = new XMLEntityResolverChain(); chainingEntityResolver.addEntityResolver(getSystemResolver()); } return chainingEntityResolver; }
/** New support for a given entry. The file is taken from the * entry and is updated if the entry moves or renames itself. * @param entry entry to create instance from */ public OpenSupport (MultiDataObject.Entry entry) { this (entry, new Env (entry.getDataObject ())); }
public void run () throws IOException { FileObject mf = handleMove (df); item.changePrimaryFile (mf); } });
/** Constructor. * @param obj data object to work on * @param set set to add/remove save cookie from */ DefaultES (DefaultDataObject obj, MultiDataObject.Entry entry, CookieSet set) { super(obj, new Environment(obj, entry)); this.set = set; setMIMEType("text/plain"); // NOI18N }
/** Test whether there is a next panel. * @return <code>true</code> if so */ public boolean hasNext() { return showingPanel || getIterator ().hasNext(); }
/** Move to the next panel. * I.e. increment its index, need not actually change any GUI itself. * @exception NoSuchElementException if the panel does not exist */ public void nextPanel() { if (showingPanel) { showingPanel = false; } else { getIterator ().nextPanel (); } }
/** Set the extension list for this data loader. * Checks if all required extensions are in new list of extensions. * @param ext new list of extensions */ public void setExtensions(ExtensionList ext) { super.setExtensions(initExtensions(ext)); }
/** Get the sort mode of the folder. * @return the sort mode */ public final SortMode getSortMode () { return getOrder ().getSortMode (); }