|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mt4j.components.MTComponent
org.mt4j.components.visibleComponents.AbstractVisibleComponent
org.mt4j.components.visibleComponents.shapes.AbstractShape
org.mt4j.components.visibleComponents.shapes.mesh.MTTriangleMesh
org.mt4j.components.visibleComponents.widgets.keyboard.MTKey
public class MTKey
Key class used in the mt keyboard.
| Field Summary |
|---|
| Fields inherited from class org.mt4j.components.visibleComponents.shapes.AbstractShape |
|---|
BOUNDS_CHECK_THEN_GEOMETRY_CHECK, BOUNDS_DONT_USE, BOUNDS_ONLY_CHECK |
| Constructor Summary | |
|---|---|
MTKey(GeometryInfo geom, processing.core.PApplet pApplet, java.lang.String characterUnicodeToWrite, java.lang.String characterUnicodeToWriteShifted)Instantiates a new mT key. |
|
| Method Summary | |
|---|---|
protected IBoundingShape |
computeDefaultBounds()Computes a default bounding box for the shape. |
void |
destroyComponent()Override this to clean up resources when destroying a component. |
protected void |
destroyDisplayLists()This is called during the shape's destroy() method. |
void |
drawComponent(processing.core.PGraphics g)Draws this component only (Not its children!). |
java.lang.String |
getCharacterToWrite()Gets the character to write. |
java.lang.String |
getCharacterToWriteShifted()Gets the character to write shifted. |
float |
getOriginalHeight()Gets the original height. |
float |
getOriginalWidth()Gets the original width. |
boolean |
isPressed()Checks if is pressed. |
void |
setGeometryInfo(GeometryInfo geometryInfo)Sets a new geometryInfo with new vertices for this shape. |
void |
setOutlineContours(java.util.List<Vertex[]> contours)Sets the outline contours. |
void |
setPressed(boolean pressed)Sets the pressed. |
void |
setUseDisplayList(boolean useDisplayList)Tries to use a opengl display list for rendering this shape. |
void |
setVertices(Vertex[] vertices)Sets new vertices for that shape. |
| Methods inherited from class org.mt4j.components.visibleComponents.shapes.mesh.MTTriangleMesh |
|---|
calculateDefaultNormals, drawComponent, generateDisplayLists, getCenterPointLocal, getGeometryIntersectionLocal, getHeightXY, getHeightXYVectObjSpace, getOutlineContours, getTriangleCount, getTriangles, getWidthXY, getWidthXYVectObjSpace, isCalculateDefaultNormals, isDrawNormals, isGeometryContainsPointLocal, setCalculateDefaultNormals, setDrawNormals, setStrokeColor |
| Methods inherited from class org.mt4j.components.visibleComponents.AbstractVisibleComponent |
|---|
applyStyle, getFillColor, getFillDrawMode, getFillPaint, getLineStipple, getMaterial, getStrokeColor, getStrokeWeight, getStyleInfo, isDrawSmooth, isNoFill, isNoStroke, postDraw, postDrawChildren, preDraw, setDrawSmooth, setFillDrawMode, setFillPaint, setLineStipple, setMaterial, setNoFill, setNoStroke, setStrokeWeight, setStyleInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MTKey(GeometryInfo geom,
processing.core.PApplet pApplet,
java.lang.String characterUnicodeToWrite,
java.lang.String characterUnicodeToWriteShifted)
vertices - the verticescontours - the contourspApplet - the appletcharacterUnicodeToWrite - the character unicode to writecharacterUnicodeToWriteShifted - the character unicode to write shifted| Method Detail |
|---|
public void setOutlineContours(java.util.List<Vertex[]> contours)
MTTriangleMeshsetOutlineContours in class MTTriangleMesh
contours - the new outline contourspublic void setUseDisplayList(boolean useDisplayList)
AbstractShapesetDrawDirectGL() has to be set to "true" first!generateDisplayLists. Instead of these 2 steps we can also just call generateAndUseDisplayLists()setUseDisplayList in class AbstractShape
useDisplayList - the use display listpublic void setVertices(Vertex[] vertices)
AbstractShapesetVertices in class MTTriangleMesh
vertices - the verticespublic void setGeometryInfo(GeometryInfo geometryInfo)
AbstractShapesetGeometryInfo in class MTTriangleMesh
geometryInfo - the geometry infoprotected IBoundingShape computeDefaultBounds()
AbstractShapecomputeDefaultBounds in class MTTriangleMesh
public java.lang.String getCharacterToWrite()
public java.lang.String getCharacterToWriteShifted()
public void drawComponent(processing.core.PGraphics g)
MTComponentdrawComponent in interface IMTComponent
drawComponent in class MTTriangleMesh
g - the graphics contextpublic void destroyComponent()
MTComponentdestroy method. So you shouldnt invoke this method directly.
destroyComponent in class MTTriangleMesh
protected void destroyDisplayLists()
AbstractShapedestroyDisplayLists in class MTTriangleMesh
public float getOriginalHeight()
public float getOriginalWidth()
public boolean isPressed()
public void setPressed(boolean pressed)
pressed - the new pressed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||