All Packages This Package Class Hierarchy Class Search Index
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----com.hermetica.util3d.TextureComponent
| Summary |
public class TextureComponent
extends java.awt.Canvas
{
// Fields 1
public static final String VERSION;
// Constructors 2
public TextureComponent();
public TextureComponent(int[], int, int);
// Methods 6
public Dimension minimumSize();
public void paint(Graphics);
public Dimension preferredSize();
public void setTextureData(int[]);
public void setTextureDimensions(int, int);
public void setTextureDimensions(Dimension);
}
The TextureComponent class provides a flexible framework for embedding a Component that displays a static image within an AWT-based GUI. This can be used to display texture-maps created via the Texture class during debugging. It could also conceivably be used to display texture-maps in a 3d editor which can be selected and ``pasted'' onto 3d geometry.
See Also: Texture
| Fields |
· VERSION | Summary | Top |
public static final String VERSION
Version Information
| Constructors |
· TextureComponent | Summary | Top |
public TextureComponent()
Creates a blank Component with no texture
· TextureComponent | Summary | Top |
public TextureComponent(int[] textureData,
int textureWidth,
int textureHeight)
Creates a new Component with a given texture.
| Methods |
· setTextureDimensions | Summary | Top |
public void setTextureDimensions(int width,
int height)
Sets the dimensions of the texture. If the textureData has been set, we'll attempt to create the texture and display it.
· setTextureDimensions | Summary | Top |
public void setTextureDimensions(Dimension dim)
Sets the dimensions of the texture. If the textureData has been set, we'll attempt to create the texture and display it.
· setTextureData | Summary | Top |
public void setTextureData(int[] textureData)
Sets the texture data. If the dimensions are set, the TextureComponent will attempt to create the image and display it.
· preferredSize | Summary | Top |
public Dimension preferredSize()
Returns the minimum size of the Component. This is actually the same as the size of the texture itself.
- Overrides:
- preferredSize in class Component
· minimumSize | Summary | Top |
public Dimension minimumSize()
Returns the minimum size of the Component. This is actually the same as the size of the texture itself.
- Overrides:
- minimumSize in class Component
· paint | Summary | Top |
public void paint(Graphics g)
Repaints the texture. This generally happens atomically, so we're not bothering to double-buffer for flicker-free-ness.
- Overrides:
- paint in class Canvas
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7