mkv.MyGUI
Class MyGUIButtonDrag
java.lang.Object
mkv.MyGUI.MyGUIObject
mkv.MyGUI.MyGUIButton
mkv.MyGUI.MyGUIButtonDrag
- public class MyGUIButtonDrag
- extends MyGUIButton
Fields inherited from class mkv.MyGUI.MyGUIButton |
_actionCommand, _disabled, _height, _icon, _id, _parent, _root, _rotation, _scale, _style, _text, _visible, _width, _x, _y, dragged, hover, lastHover, tmouseX, tmouseY |
Constructor Summary |
MyGUIButtonDrag(processing.core.PApplet root,
int x,
int y,
int width,
int height)
|
MyGUIButtonDrag(processing.core.PApplet root,
int x,
int y,
processing.core.PImage icon)
|
Methods inherited from class mkv.MyGUI.MyGUIButton |
checkForHit, disable, draw, drawStates, enable, getFocusIndex, getStyle, hasFocus, isDisabled, isDragged, keyPressed, keyReleased, keyTyped, mouseReleased, normalize, rotate, rotateRadians, setActionCommand, setID, setLabel, setLabel, setParent, setStyle, updateLocalMouse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MyGUIButtonDrag
public MyGUIButtonDrag(processing.core.PApplet root,
int x,
int y,
int width,
int height)
MyGUIButtonDrag
public MyGUIButtonDrag(processing.core.PApplet root,
int x,
int y,
processing.core.PImage icon)
clearDragArea
public void clearDragArea()
setDragArea
public void setDragArea(int minx,
int miny,
int maxx,
int maxy)
mousePressed
public void mousePressed()
- Description copied from class:
MyGUIObject
- Sets dragged to true if object has focus. This is the most basic response
to a mouse click. Arguably it could generate an actionEvent as well if it
had focus. This method can be easily overriden for custom handling of mouse
events, specifically the mousePressed() event. It is called by its parent every
time the mouse is pressed.
- Overrides:
mousePressed
in class MyGUIObject
- See Also:
MyGUIObject.mouseReleased()
,
MyGUIObject.mouseDragged()
mouseDragged
public void mouseDragged()
- Description copied from class:
MyGUIObject
- Interface method. It does nothing. When the mouse is dragged this method is called
by the parent object. Useful for real time dragging. MyGUIButtonDrag uses this to
update its _x and _y coordinates when the dragged state is set to true.
- Overrides:
mouseDragged
in class MyGUIObject