|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lessvoid.nifty.layout.Box
public class Box
The Box class represent a rectangular area on the screen. It has a position (x,y) as well as height and weight attributes. The Box represent and already resolved position in pixel.
| Constructor Summary | |
|---|---|
Box()
Create a new Box with some default coordinates (x,y) set to (0,0) and with width and height set to 0. |
|
Box(Box src)
copy constructor. |
|
Box(int newX,
int newY,
int newWidth,
int newHeight)
Create a new Box with the given coordinates. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
getHeight()
Get the current height for the box. |
int |
getWidth()
Get the current width of the box. |
int |
getX()
Get the horizontal position of the box. |
int |
getY()
Get the vertical position of the box. |
int |
hashCode()
|
void |
setHeight(int newHeight)
Set a new height for the box. |
void |
setWidth(int newWidth)
Set a new width for the box. |
void |
setX(int newX)
Get the horizontal position of the box. |
void |
setY(int newY)
Set the vertical position of the box. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Box()
public Box(int newX,
int newY,
int newWidth,
int newHeight)
newX - the x position of the boxnewY - the y position of the boxnewWidth - the new width of the boxnewHeight - the new height of the boxpublic Box(Box src)
src - src box to copy from| Method Detail |
|---|
public final int getX()
public final void setX(int newX)
newX - the vertical position of the boxpublic final int getY()
public final void setY(int newY)
newY - the vertical position of the boxpublic final int getHeight()
public final void setHeight(int newHeight)
newHeight - the new height for the box.public final int getWidth()
public final void setWidth(int newWidth)
newWidth - the new widthpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||