|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is basic interface for components that are going to be laidout with the library layout managers. The main purpose of the interface to separate layouting functionality from the lightweight component functionality. It means that it is possible to re-use the set of layout managers that is provided with the library for any other components. It just necessary to implement the interface.
Method Summary | |
java.awt.Rectangle |
getBounds()
Gets the bounds of this component. |
int |
getHeight()
Gets the height of this component. |
java.awt.Insets |
getInsets()
Determines the insets of this component. |
java.awt.Point |
getLocation()
Gets the location of this component point specifying the component top-left corner. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of this component. |
java.awt.Dimension |
getSize()
Returns a size of this component. |
int |
getWidth()
Gets the width of this component. |
int |
getX()
Gets the x location of this component specifying the component top-left corner. |
int |
getY()
Gets the y location of this component specifying the component top-left corner. |
boolean |
isVisible()
Determines if this component is visible. |
void |
setLocation(int x,
int y)
Sets a new location for this component. |
void |
setSize(int w,
int h)
Sets the specified size for this component. |
Method Detail |
public java.awt.Point getLocation()
Point
representing the top-left corner
of the component bounds in the coordinate space of the component parent.public int getX()
x
location of this component specifying the component top-left corner.
The location is relative to the parent component coordinate space.x
coordinate representing the top-left corner
of the component bounds in the coordinate space of the component parent.public int getY()
y
location of this component specifying the component top-left corner.
The location is relative to the parent component coordinate space.y
coordinate representing the top-left corner
of the component bounds in the coordinate space of the component parent.public int getWidth()
public int getHeight()
public void setLocation(int x, int y)
x
and y
parameters in the coordinate space of this component parent.x
- the x-coordinate of the new location
top-left corner in the parent coordinate space.y
- the y-coordinate of the new location
top-left corner in the parent's coordinate space.public java.awt.Dimension getSize()
java.awt.Dimension
class.Dimension
object that indicates the
size of this component.public void setSize(int w, int h)
width
- the width of this component.height
- the height of this component.public java.awt.Dimension getPreferredSize()
public boolean isVisible()
true
.true
if the component is visible;
false
otherwise.public java.awt.Rectangle getBounds()
java.awt.Rectangle
class.public java.awt.Insets getInsets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |