Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
aliasId
An alias id for this direct manipulation event.
|
private boolean |
forceParentRepaint
Flag indicating the parent container to be repainted after message handling.
|
private MouseDirectManipulation |
handler
Pointer to optional handler 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 |
---|---|
java.lang.Integer |
getAlias()
Getter for the alias id.
|
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 |
print(PrintHelper printer)
Print all class-specific fields.
|
void |
setDistance(int xChange,
int yChange)
Encodes X and Y shift pixels value.
|
void |
setResizeDirection(int resizeDirection)
Encodes widget resize direction value.
|
consume, id, isConsumed, other, source, toString
private Container<?> parentContainer
private boolean forceParentRepaint
private int xChange
private int yChange
private int resizeDirection
private MouseDirectManipulation handler
private java.lang.Integer aliasId
null
if no alias is defined for this event.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 manipulation 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()
public java.lang.Integer getAlias()
null
if no alias is defined for this event.public void print(PrintHelper printer)