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 eventKind,
BiConsumer<String,KeyEvent> func)
Handle the kind of key event EVENTKIND by calling FUNC's accept
method with EVENT and the KeyEvent that describes the event.
|
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 eventKind,
BiConsumer<String,MouseEvent> func)
Handle the kind of mouse event EVENTKIND by calling FUNC's accept
method with EVENT and 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 eventKind, BiConsumer<String,MouseEvent> func)
MouseEvent
public void setKeyHandler(String eventKind, BiConsumer<String,KeyEvent> func)
protected void paintComponent(Graphics2D g)