|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjaron.gui.Panel
public class Panel
The Panel
class is a helper class for a graphical component that
consists of an outer frame and the content where the drawing is done.
The panel can furthermore have up to four labels that can be added to the top,
the bottom, the left and the right side of the content. Adding those labels is
done by setting their height (top and bottom label) or their width respectively
(right and left label).
Field Summary | |
---|---|
Rect |
content
A Rect that encloses the panel's content. |
Rect |
frame
A Rect that represents the panel's frame. |
Rect |
labelBottom
A Rect that encloses the panel's bottom label. |
Rect |
labelLeft
A Rect that encloses the panel's left label. |
Rect |
labelRight
A Rect that encloses the panel's right label. |
Rect |
labelTop
A Rect that encloses the panel's top label. |
Constructor Summary | |
---|---|
Panel(int left,
int top,
int width,
int height)
Creates a new Panel object at a certain position and with a certain
width and height. |
Method Summary | |
---|---|
Rect |
getContent()
Returns the panels content Rect . |
Rect |
getFrame()
Returns the panels frame Rect . |
Rect |
getLabelBottom()
Returns the panels bottom label Rect . |
Rect |
getLabelLeft()
Returns the panels left label Rect . |
Rect |
getLabelRight()
Returns the panels right label Rect . |
Rect |
getLabelTop()
Returns the panels top label Rect . |
void |
setContent(Rect content)
Sets a new content Rect for this panel. |
void |
setFrame(Rect frame)
Sets a new frame Rect for this panel. |
void |
setLabelBottomHeight(int height)
Sets the panel's bottom label height. |
void |
setLabelLeftWidth(int width)
Sets the panel's left label width. |
void |
setLabelRightWidth(int width)
Sets the panel's right label width. |
void |
setLabelTopHeight(int height)
Sets the panel's top label height. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Rect frame
Rect
that represents the panel's frame.
public Rect content
Rect
that encloses the panel's content.
public Rect labelBottom
Rect
that encloses the panel's bottom label.
public Rect labelLeft
Rect
that encloses the panel's left label.
public Rect labelRight
Rect
that encloses the panel's right label.
public Rect labelTop
Rect
that encloses the panel's top label.
Constructor Detail |
---|
public Panel(int left, int top, int width, int height)
Panel
object at a certain position and with a certain
width and height.
left
- the left coordinatetop
- the top coordinatewidth
- the width of the panelheight
- the height of the panelMethod Detail |
---|
public Rect getContent()
Rect
.
Rect
that encloses the panel's contentpublic Rect getFrame()
Rect
.
Rect
that represents the panel's framepublic Rect getLabelBottom()
Rect
.
Rect
that encloses the panel's bottom labelpublic Rect getLabelLeft()
Rect
.
Rect
that encloses the panel's left labelpublic Rect getLabelRight()
Rect
.
Rect
that encloses the panel's right labelpublic Rect getLabelTop()
Rect
.
Rect
that encloses the panel's top labelpublic void setContent(Rect content)
Rect
for this panel. By altering the
content, all the calculations like adding labels is done to the new
content Rect
.
content
- the new content Rect
to be usedpublic void setFrame(Rect frame)
Rect
for this panel.
frame
- the new frame Rect
to be usedpublic void setLabelBottomHeight(int height)
height
- the label's new heightpublic void setLabelLeftWidth(int width)
width
- the label's new widthpublic void setLabelRightWidth(int width)
width
- the label's new widthpublic void setLabelTopHeight(int height)
height
- the label's new height
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |