All Packages Class Hierarchy This Package Previous Next Index
Class demo.PaintCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----demo.PaintCanvas
- public class PaintCanvas
- extends Canvas
- implements MouseMotionListener, ActionListener
T°φda slou╛φcφ pro vytvo°enφ plßtna. Zachycuje udßlosti "pohyb my╣i"
a "stisk tlaΦφtka" - proto implementuje uvedenß rozhranφ.
- See Also:
- MouseMotionListener, ActionListener
-
offGraphics
-
-
offImage
-
-
oldx
-
-
oldy
-
-
PaintCanvas()
- Konstruktor
-
actionPerformed(ActionEvent)
- Metoda actionPerformed() je volanß stisku tlaΦφtka "Clear".
-
getMinimumSize()
- Metoda getMinimumSize() musφ b²t implementovßna kv∙li
urΦenφ velikosti pro layout manager.
-
getPreferredSize()
- Metoda getPreferredSize() musφ b²t implementovßna kv∙li
urΦenφ velikosti pro layout manager.
-
mouseDragged(MouseEvent)
- Metoda mouseDragged() je volanß p°i pohybu a souΦasnΘm dr╛enφ
tlaΦφtka my╣i.
-
mouseMoved(MouseEvent)
- Metoda mouseMoved() je volanß p°i pohybu my╣i (bez stisku tlaΦφtka).
-
paint(Graphics)
- Metoda paint() provßdφ vykreslenφ obsahu plßtna - p°ekopφruje
skryt² buffer do grafickΘho kontextu komponenty (parametr g).
-
update(Graphics)
- Metoda update() je volßna p°i p°ekreslovßnφ komponenty.
offGraphics
Graphics offGraphics
offImage
Image offImage
oldx
int oldx
oldy
int oldy
PaintCanvas
public PaintCanvas()
- Konstruktor
getMinimumSize
public Dimension getMinimumSize()
- Metoda getMinimumSize() musφ b²t implementovßna kv∙li
urΦenφ velikosti pro layout manager.
- Returns:
- minimßlnφ velikost komponenty (plßtna).
- Overrides:
- getMinimumSize in class Component
getPreferredSize
public Dimension getPreferredSize()
- Metoda getPreferredSize() musφ b²t implementovßna kv∙li
urΦenφ velikosti pro layout manager.
- Returns:
- preferovanou velikost komponenty (plßtna).
- Overrides:
- getPreferredSize in class Component
mouseDragged
public void mouseDragged(MouseEvent e)
- Metoda mouseDragged() je volanß p°i pohybu a souΦasnΘm dr╛enφ
tlaΦφtka my╣i.
mouseMoved
public void mouseMoved(MouseEvent e)
- Metoda mouseMoved() je volanß p°i pohybu my╣i (bez stisku tlaΦφtka).
actionPerformed
public void actionPerformed(ActionEvent e)
- Metoda actionPerformed() je volanß stisku tlaΦφtka "Clear".
update
public void update(Graphics g)
- Metoda update() je volßna p°i p°ekreslovßnφ komponenty.
Standardn∞ vyma╛e pozadφ a volß metodu paint().
Je p°edefinovßna, aby nedochßzelo k blikßnφ.
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Metoda paint() provßdφ vykreslenφ obsahu plßtna - p°ekopφruje
skryt² buffer do grafickΘho kontextu komponenty (parametr g).
- Overrides:
- paint in class Canvas
All Packages Class Hierarchy This Package Previous Next Index