|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sdljavax.gui.Widget
public class Widget
An entity which can be drawn to a screen and may interact with the user.
Field Summary | |
---|---|
protected Texture |
backgroundTexture
|
protected int |
border
|
protected Container |
container
|
protected static FTFont |
defaultFont
|
protected boolean |
drawBorder
|
protected int |
height
|
protected java.lang.String |
name
|
protected boolean |
visible
|
protected int |
width
|
protected int |
xPos
|
protected int |
yPos
|
Constructor Summary | |
---|---|
Widget(GL gl,
java.lang.String name,
SDLRect dimensions,
java.lang.String backgroundTexturePath)
|
Method Summary | |
---|---|
boolean |
contains(int x,
int y)
x and y absolute |
boolean |
contains(SDLRect rect)
Describe contains method here. |
void |
draw(GL gl)
Describe draw method here. |
void |
draw(GL gl,
int x,
int y)
Draw myself at the given co-ordinates |
Texture |
getBackgroundTexture()
Gets the value of backgroundTexture |
int |
getHeight()
Gets the value of height |
java.lang.String |
getName()
Gets the value of name |
int |
getWidth()
Gets the value of width |
int |
getX()
Gets the value of x |
int |
getY()
Gets the value of y |
void |
handleEvent(SDLEvent event)
Describe handleEvent method here. |
void |
hide()
Describe hide method here. |
boolean |
isVisible()
Describe isVisible method here. |
void |
mouseEntered()
|
void |
mouseExit()
|
void |
setBackgroundTexture(Texture argBackgroundTexture)
Sets the value of backgroundTexture |
void |
setHeight(int argHeight)
Sets the value of height |
void |
setName(java.lang.String argName)
Sets the value of name |
void |
setWidth(int argWidth)
Sets the value of width |
void |
setX(int argX)
Sets the value of x |
void |
setY(int argY)
Sets the value of y |
void |
show()
Describe show method here. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Container container
protected java.lang.String name
protected int xPos
protected int yPos
protected int width
protected int height
protected int border
protected Texture backgroundTexture
protected boolean visible
protected boolean drawBorder
protected static FTFont defaultFont
Constructor Detail |
---|
public Widget(GL gl, java.lang.String name, SDLRect dimensions, java.lang.String backgroundTexturePath) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public int getX()
public void setX(int argX)
argX
- Value to assign to this.xpublic int getY()
public void setY(int argY)
argY
- Value to assign to this.ypublic int getWidth()
public void setWidth(int argWidth)
argWidth
- Value to assign to this.widthpublic int getHeight()
public void setHeight(int argHeight)
argHeight
- Value to assign to this.heightpublic Texture getBackgroundTexture()
public void setBackgroundTexture(Texture argBackgroundTexture)
argBackgroundTexture
- Value to assign to this.backgroundTexturepublic java.lang.String getName()
public void setName(java.lang.String argName)
argName
- Value to assign to this.namepublic void draw(GL gl)
draw
method here.
gl
- a GL
valuepublic void draw(GL gl, int x, int y)
gl
- a GL
valuex
- an int
valuey
- an int
valuepublic void handleEvent(SDLEvent event)
handleEvent
method here.
handleEvent
in interface SDLEventListener
event
- a SDLEvent
valuepublic boolean isVisible()
isVisible
method here.
boolean
valuepublic void hide()
hide
method here.
public void show()
show
method here.
public boolean contains(SDLRect rect)
contains
method here.
rect
- a SDLRect
value
boolean
valuepublic boolean contains(int x, int y)
public void mouseEntered()
public void mouseExit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |