|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ucb.gui.Widget ucb.gui.Pad
public class Pad
A Pad is a blank slate that may be inserted into a TopLevel. It provides methods that set up responses to mouse events, and an overrideable paintComponent method that allows one to draw anything that may be rendered on a standard Java Graphics2D. Standard usage is to extend Pad, and to call most of its method from methods in the extended class.
Field Summary |
---|
Fields inherited from class ucb.gui.Widget |
---|
me |
Constructor Summary | |
---|---|
protected |
Pad()
|
Method Summary | |
---|---|
int |
getHeight()
My current height in pixels. |
int |
getWidth()
My current width in pixels. |
protected void |
paintComponent(Graphics2D g)
Repaint myself on G. |
void |
repaint()
Alert the system that I ought be asked to repaint myself. |
protected void |
setMaximumSize(int width,
int height)
Set my maximum size to WIDTHxHEIGHT pixels. |
protected void |
setMinimumSize(int width,
int height)
Set my minimum size to WIDTHxHEIGHT pixels. |
protected void |
setMouseHandler(String event,
Object receiver,
String funcName)
Handle the mouse event EVENT by calling the FUNCNAME method on RECEIVER with the MouseEvent that describes the event. |
protected void |
setMouseHandler(String event,
String funcName)
|
protected void |
setPreferredSize(int width,
int height)
Set my preferred size to WIDTHxHEIGHT pixels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Pad()
Method Detail |
---|
protected void setPreferredSize(int width, int height)
protected void setMinimumSize(int width, int height)
protected void setMaximumSize(int width, int height)
public int getWidth()
public int getHeight()
public void repaint()
protected void setMouseHandler(String event, Object receiver, String funcName)
MouseEvent
protected void setMouseHandler(String event, String funcName)
protected void paintComponent(Graphics2D g)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |