public class DirectManipulationEvent extends Event
Modifier and Type | Field and Description |
---|---|
private boolean |
forceParentRepaint
Flag indicating the parent container to be repainted after message handling.
|
private MouseDirectManipulation |
handler
Pointer to optional hanler to allow callback.
|
private Container<?> |
parentContainer
Optional parent container.
|
private int |
resizeDirection
Resize direction for widget resize event.
|
private int |
xChange
Variable to store X location or width changes value.
|
private int |
yChange
Variable to store Y location or height changes value.
|
Constructor and Description |
---|
DirectManipulationEvent(MouseDirectManipulation handler,
Widget source,
int code)
Constructor.
|
DirectManipulationEvent(Widget source,
Container parent,
boolean repaint,
int code)
Constructor.
|
DirectManipulationEvent(Widget source,
Container parent,
int code)
Constructor.
|
DirectManipulationEvent(Widget source,
int code)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
MouseDirectManipulation |
getHandler()
Gets the direct manipulation handler the event was generated within.
|
Container<?> |
getParentContainer()
Gets the parent container for widget target of the message.
|
int |
getResizeDirection()
Extracts widget resize direction value.
|
int |
getXChange()
Extracts horizontal direction shift pixels value.
|
int |
getYChange()
Extracts vertical direction shift pixels value.
|
boolean |
hasHandler()
Checks if the event has handler integrated.
|
boolean |
isRepaintRequired()
Checks if the repaint is necessary for changes to make visible.
|
void |
setDistance(int xChange,
int yChange)
Encodes X and Y shift pixels value.
|
void |
setResizeDirection(int resizeDirection)
Encodes widget resize direction value.
|
private Container<?> parentContainer
private boolean forceParentRepaint
private int xChange
private int yChange
private int resizeDirection
private MouseDirectManipulation handler
public DirectManipulationEvent(Widget source, int code)
source
- Event source.code
- Event code defining the action performed.public DirectManipulationEvent(MouseDirectManipulation handler, Widget source, int code)
handler
- Direct manupulation handler to be called inside event target context.source
- Event source.code
- Event code defining the action performed.public DirectManipulationEvent(Widget source, Container parent, int code)
source
- Event source.parent
- The parent container for event source.code
- Event code defining the action performed.public DirectManipulationEvent(Widget source, Container parent, boolean repaint, int code)
source
- Event source.parent
- The parent container for event source.repaint
- The parent container needs repainting after message.code
- Event code defining the action performed.public void setDistance(int xChange, int yChange)
xChange
- X distance to move or resize, can be negative.yChange
- Y distance to move or resize, can be negative.public int getXChange()
public int getYChange()
public void setResizeDirection(int resizeDirection)
resizeDirection
- Widget resize direction.public int getResizeDirection()
public boolean isRepaintRequired()
TRUE
if the repaint is possible,
FALSE
otherwise.public Container<?> getParentContainer()
public boolean hasHandler()
TRUE
if handler exists, FALSE
otherwise.public MouseDirectManipulation getHandler()