public class Pad extends Widget
Modifier | Constructor and Description |
---|---|
protected |
Pad()
A new, empty Pad.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Return my current height in pixels.
|
int |
getWidth()
Return 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.
|
void |
repaint(int x,
int y,
int width,
int height)
Alert the system that I ought be asked to repaint the rectangular
area whose top left corner is X, Y and has given WIDTH and
HEIGHT.
|
void |
repaint(long tm)
Alert the system that I ought be asked to repaint myself
within TM milliseconds.
|
void |
repaint(long tm,
int x,
int y,
int width,
int height)
Alert the system that I ought be asked to repaint the rectangular
area whose top left corner is X, Y and has given WIDTH and
HEIGHT within TM milliseconds.
|
void |
setKeyHandler(String event,
BiConsumer<String,KeyEvent> func)
Set the handler of key events indicated by EVENT to the method
named FUNCNAME in RECEIVER.
|
void |
setMaximumSize(int width,
int height)
Set my maximum size to WIDTH x HEIGHT pixels.
|
void |
setMinimumSize(int width,
int height)
Set my minimum size to WIDTH x HEIGHT pixels.
|
void |
setMouseHandler(String event,
BiConsumer<String,MouseEvent> func)
Handle the mouse event EVENT by calling the FUNCNAME method on
RECEIVER with the MouseEvent that describes the event.
|
void |
setPreferredSize(int width,
int height)
Set my preferred size to WIDTH x HEIGHT pixels.
|
void |
setSize(int width,
int height)
Set my current size to WIDTH x HEIGHT pixels.
|
requestFocusInWindow
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public void setSize(int width, int height)
public void setPreferredSize(int width, int height)
public void setMinimumSize(int width, int height)
public void setMaximumSize(int width, int height)
public int getWidth()
public int getHeight()
public void repaint()
public void repaint(long tm)
public void repaint(int x, int y, int width, int height)
public void repaint(long tm, int x, int y, int width, int height)
public void setMouseHandler(String event, BiConsumer<String,MouseEvent> func)
MouseEvent
public void setKeyHandler(String event, BiConsumer<String,KeyEvent> func)
protected void paintComponent(Graphics2D g)