|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.graphics.textures.Texture
public class Texture
Stores information on an OpenGL texture object.
An OpenGL texture object created on the graphics card is referenced by
an integer name. This Java class will store the OpenGL name for a
texture object, as well as information on the file the texture was
read from, and a String name suitable for use in a menu. The
Comparable interface is implemented so that Texture objects can be
sorted by their menu names.
Constructor Summary | |
---|---|
Texture(int name,
String menuName,
String filename,
File file)
Constructs a Texture object. |
Method Summary | |
---|---|
int |
compareTo(Texture other)
Compares this Texture object to the Texture object given as an argument by making a lexicographic comparison of their menu names. |
File |
getFile()
Returns a File object with the complete pathname for the file the texture was read from. |
String |
getFilename()
Returns the name of the file the texture was read from. |
String |
getMenuName()
Returns a name suitable for use in a menu. |
int |
getName()
Gets the OpenGL reference (an integer) for a texture object stored on the graphics card. |
void |
setFile(File file)
Sets the File with the complete pathname for the file the texture was read from. |
void |
setFilename(String filename)
Sets the name of the file that the texture was read from. |
void |
setMenuName(String menuName)
Sets the menu name for the texture. |
void |
setName(int name)
Sets the OpenGL reference (an integer) for a texture object stored on the graphics card. |
String |
toString()
Returns the menu name of the Texture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Texture(int name, String menuName, String filename, File file)
name
- the name (an integer) of an OpenGL texture object.menuName
- a name suitable for use in a GUI menu.filename
- the name of the file the texture is read from.file
- a File object with the complete name of the file.Method Detail |
---|
public int getName()
public void setName(int name)
name
- the name (an integer) for an OpenGL texture object.public String getMenuName()
public void setMenuName(String menuName)
menuName
- a name suitable for use in a menu.public String getFilename()
public void setFilename(String filename)
filename
- the name of the texture file.public File getFile()
public void setFile(File file)
file
- a File object with the pathname for the texture file.public int compareTo(Texture other)
compareTo
in interface Comparable<Texture>
other
- the Texture object for comparison.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |