|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.base.WidgetBase
org.xith3d.ui.hud.base.RectangularWidget
org.xith3d.ui.hud.base.BackgroundSettableRectangularWidget
org.xith3d.ui.hud.widgets.assemblies.FPSCounter
public class FPSCounter
Simple Widget to display the FPS count of your application. You can easily add it to an instance of ExtRenderLoop.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget |
|---|
Widget.DescriptionBase |
| Field Summary |
|---|
| Fields inherited from class org.xith3d.ui.hud.base.WidgetBase |
|---|
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER |
| Constructor Summary | |
|---|---|
FPSCounter(float width,
float height)
Creates a new FPSCounter with the given width and height. |
|
FPSCounter(float width,
float height,
int zIndex)
Creates a new FPSCounter with the given width and height. |
|
FPSCounter(float width,
float height,
int zIndex,
java.lang.String texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(float width,
float height,
int zIndex,
Texture texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(float width,
float height,
java.lang.String texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(float width,
float height,
Texture texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(org.openmali.vecmath2.Tuple2f size)
Creates a new FPSCounter with the given width and height. |
|
FPSCounter(org.openmali.vecmath2.Tuple2f size,
int zIndex)
Creates a new FPSCounter with the given width and height. |
|
FPSCounter(org.openmali.vecmath2.Tuple2f size,
int zIndex,
java.lang.String texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(org.openmali.vecmath2.Tuple2f size,
int zIndex,
Texture texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(org.openmali.vecmath2.Tuple2f size,
java.lang.String texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
FPSCounter(org.openmali.vecmath2.Tuple2f size,
Texture texture)
Creates a new FPSCounter with the given width and height using this DecimalFormat to generate the string from float fps. |
|
| Method Summary | |
|---|---|
protected AbstractImage |
createBackgroundImage(float width,
float height,
org.openmali.vecmath2.Colorf color)
|
protected AbstractImage |
createBackgroundImage(float width,
float height,
Texture texture)
|
TextAlignment |
getAlignment()
|
char |
getDecimalSeparator()
|
java.awt.Font |
getFont()
|
org.openmali.vecmath2.Colorf |
getFontColor()
|
float |
getLastFPS()
|
java.lang.String |
getPostfix()
Sets the postfix to be appended to the FPS value. |
java.lang.String |
getPrefix()
|
java.lang.String |
getText()
|
float |
getTransparency()
|
protected void |
init()
This method is called when the WidgetContainer is set. |
void |
onFPSCountIntervalHit(float fps)
This method is called by the RenderLoop each FPS-counting interval |
void |
setAlignment(TextAlignment alignment)
Sets the horizontal and vertical alignment of the text |
void |
setDecimalSeparator(char decSep)
Changes the decimal separator to the given char. |
void |
setFont(java.awt.Font font)
Sets the new Font to be used |
void |
setFontColor(org.openmali.vecmath2.Colorf color)
Sets the new color to be used |
void |
setPostfix(java.lang.String postfix)
Sets the postfix to be appended to the FPS value. |
void |
setPrefix(java.lang.String prefix)
Sets the prefix to be set to the FPS value. |
void |
setText(java.lang.String text)
Sets the new text to be displayed |
| Methods inherited from class org.xith3d.ui.hud.base.BackgroundSettableRectangularWidget |
|---|
getBackground, getBackgroundColor, getBackgroundTileHeight, getBackgroundTileSize, getBackgroundTileWidth, setBackground, setBackground, setBackground, setBackgroundTileSize, setBackgroundTileSize, setContainer |
| Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget |
|---|
getPickHeight, getPickSGZPosition, getPickWidth, pick |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openmali.types.twodee.Sized2f |
|---|
setHeight, setWidth |
| Constructor Detail |
|---|
public FPSCounter(float width,
float height,
int zIndex,
Texture texture)
width - the new width of this Widgetheight - the new height of this WidgetzIndex - the new z-index of this Widgettexture - the texture to use as background image for this FPSCounter
public FPSCounter(org.openmali.vecmath2.Tuple2f size,
int zIndex,
Texture texture)
size - the new size of this WidgetzIndex - the new z-index of this Widgettexture - the texture to use as background image for this FPSCounter
public FPSCounter(float width,
float height,
int zIndex,
java.lang.String texture)
width - the new width of this Widgetheight - the new height of this WidgetzIndex - the new z-index of this Widgettexture - the texture resource to use as background image for this FPSCounter
public FPSCounter(org.openmali.vecmath2.Tuple2f size,
int zIndex,
java.lang.String texture)
size - the new size of this WidgetzIndex - the new z-index of this Widgettexture - the texture resource to use as background image for this FPSCounter
public FPSCounter(org.openmali.vecmath2.Tuple2f size,
Texture texture)
size - the new size of this Widgettexture - the texture to use as background image for this FPSCounter
public FPSCounter(float width,
float height,
Texture texture)
width - the new width of this Widgetheight - the new height of this Widgettexture - the texture to use as background image for this FPSCounter
public FPSCounter(org.openmali.vecmath2.Tuple2f size,
java.lang.String texture)
size - the new size of this Widgettexture - the texture to use as background image for this FPSCounter
public FPSCounter(float width,
float height,
java.lang.String texture)
width - the new width of this Widgetheight - the new height of this Widgettexture - the texture to use as background image for this FPSCounter
public FPSCounter(float width,
float height,
int zIndex)
width - the new width of this Widgetheight - the new height of this WidgetzIndex - the new z-index of this Widget
public FPSCounter(org.openmali.vecmath2.Tuple2f size,
int zIndex)
size - the new size of this WidgetzIndex - the new z-index of this Widget
public FPSCounter(float width,
float height)
width - the new width of this Widgetheight - the new height of this Widgetpublic FPSCounter(org.openmali.vecmath2.Tuple2f size)
size - the new size of this Widget| Method Detail |
|---|
public float getTransparency()
getTransparency in interface Widgetpublic void setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
public void setPostfix(java.lang.String postfix)
public java.lang.String getPostfix()
public void setDecimalSeparator(char decSep)
decSep - public char getDecimalSeparator()
public void setText(java.lang.String text)
setText in interface TextWidgettext - the new Textpublic java.lang.String getText()
getText in interface TextWidgetpublic void setFont(java.awt.Font font)
setFont in interface TextWidgetfont - the new Fontpublic java.awt.Font getFont()
getFont in interface TextWidgetpublic void setFontColor(org.openmali.vecmath2.Colorf color)
setFontColor in interface TextWidgetcolor - the new colorpublic org.openmali.vecmath2.Colorf getFontColor()
getFontColor in interface TextWidgetpublic void setAlignment(TextAlignment alignment)
setAlignment in interface TextWidgetpublic TextAlignment getAlignment()
getAlignment in interface TextWidgetpublic float getLastFPS()
public void onFPSCountIntervalHit(float fps)
onFPSCountIntervalHit in interface FPSListenerfps - the average frames per second during the last interval
protected AbstractImage createBackgroundImage(float width,
float height,
org.openmali.vecmath2.Colorf color)
createBackgroundImage in class BackgroundSettableRectangularWidget
protected AbstractImage createBackgroundImage(float width,
float height,
Texture texture)
createBackgroundImage in class BackgroundSettableRectangularWidgetprotected void init()
init in class WidgetBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||