SDK:
- generalize BinaryModelFileLoader a bit, cleanup javadoc git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10227 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
b0fd69c6da
commit
c2f1c53457
@ -47,8 +47,8 @@ import org.openide.loaders.MultiFileLoader;
|
|||||||
public class BinaryModelFileLoader extends MultiFileLoader {
|
public class BinaryModelFileLoader extends MultiFileLoader {
|
||||||
|
|
||||||
public static final String PROP_EXTENSIONS = "extensions"; // NOI18N
|
public static final String PROP_EXTENSIONS = "extensions"; // NOI18N
|
||||||
public static final String INFO_EXTENSION = "j3odata";
|
|
||||||
public static final String FILE_EXTENSION = "j3o";
|
public static final String FILE_EXTENSION = "j3o";
|
||||||
|
public static final String INFO_EXTENSION = FILE_EXTENSION + "data";
|
||||||
public static final String MIME_TYPE = "application/jme3model";
|
public static final String MIME_TYPE = "application/jme3model";
|
||||||
private static final long serialVersionUID = -4579746482156153693L;
|
private static final long serialVersionUID = -4579746482156153693L;
|
||||||
|
|
||||||
@ -72,10 +72,12 @@ public class BinaryModelFileLoader extends MultiFileLoader {
|
|||||||
getExtensions();
|
getExtensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** For a given file find the primary file.
|
/**
|
||||||
|
* For a given file find the primary file.
|
||||||
|
*
|
||||||
* @param fo the file to find the primary file for
|
* @param fo the file to find the primary file for
|
||||||
* @return the primary file for this file or null
|
* @return the primary file for this file or null if this file is not
|
||||||
* if this file is not recognized by this loader.
|
* recognized by this loader.
|
||||||
*/
|
*/
|
||||||
protected FileObject findPrimaryFile(FileObject fo) {
|
protected FileObject findPrimaryFile(FileObject fo) {
|
||||||
// never recognize folders.
|
// never recognize folders.
|
||||||
@ -97,7 +99,9 @@ public class BinaryModelFileLoader extends MultiFileLoader {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create the primary file entry. Primary files are the j3o files.
|
/**
|
||||||
|
* Create the primary file entry. Primary files are the j3o files.
|
||||||
|
*
|
||||||
* @param primaryFile primary file recognized by this loader
|
* @param primaryFile primary file recognized by this loader
|
||||||
* @return primary entry for that file
|
* @return primary entry for that file
|
||||||
*/
|
*/
|
||||||
@ -106,9 +110,10 @@ public class BinaryModelFileLoader extends MultiFileLoader {
|
|||||||
return new FileEntry(obj, primaryFile);
|
return new FileEntry(obj, primaryFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a secondary file entry.
|
/**
|
||||||
* Secondary files are properties files, which should also be retained (so, not a
|
* Create a secondary file entry. Secondary files are properties files,
|
||||||
* FileEntry.Numb object)
|
* which should also be retained (so, not a FileEntry.Numb object)
|
||||||
|
*
|
||||||
* @param secondaryFile secondary file to create entry for
|
* @param secondaryFile secondary file to create entry for
|
||||||
* @return the entry
|
* @return the entry
|
||||||
*/
|
*/
|
||||||
@ -117,7 +122,9 @@ public class BinaryModelFileLoader extends MultiFileLoader {
|
|||||||
return new FileEntry(obj, secondaryFile);
|
return new FileEntry(obj, secondaryFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return The list of extensions this loader recognizes. */
|
/**
|
||||||
|
* @return The list of extensions this loader recognizes.
|
||||||
|
*/
|
||||||
public ExtensionList getExtensions() {
|
public ExtensionList getExtensions() {
|
||||||
ExtensionList extensions = (ExtensionList) getProperty(PROP_EXTENSIONS);
|
ExtensionList extensions = (ExtensionList) getProperty(PROP_EXTENSIONS);
|
||||||
if (extensions == null) {
|
if (extensions == null) {
|
||||||
@ -130,7 +137,9 @@ public class BinaryModelFileLoader extends MultiFileLoader {
|
|||||||
return extensions;
|
return extensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the extension list for this data loader.
|
/**
|
||||||
|
* Sets the extension list for this data loader.
|
||||||
|
*
|
||||||
* @param ext new list of extensions.
|
* @param ext new list of extensions.
|
||||||
*/
|
*/
|
||||||
public void setExtensions(ExtensionList ext) {
|
public void setExtensions(ExtensionList ext) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user