Maven module :un.engine : engine-ui :
Class : un.engine.ui.widget.Widget
Extends/Implements : un.api.layout.Positionable un.engine.scenegraph.SceneNode
Subclasses : -

Widget interface.
Widgets all share common properties which are :


Variables : STYLE_PROP_FONT, STYLE_PROP_BORDER, STYLE_PROP_BACKGROUND, STYLE_PROP_FAMILY, STYLE_PROP_RADIUS, STYLE_PROP_BRUSH, STYLE_PROP_BRUSH_PAINT, STYLE_PROP_FILL_PAINT, STYLE_PROP_VISUAL_MARGIN, STYLE_PROP_MARGIN, STYLE_PROP_SHAPE, STYLE_PROP_TRANSFORM, STYLE_PROP_FITTING, STYLE_PROP_EFFECT, PROPERTY_ID, PROPERTY_CURSOR, PROPERTY_DIRTY, PROPERTY_ENABLE, PROPERTY_STACKENABLE, PROPERTY_FOCUSED, PROPERTY_POPUP, PROPERTY_TOOLTIP, PROPERTY_FRAME, PROPERTY_VIEW, PROPERTY_LANGUAGE, PROPERTY_MOUSEOVER, PROPERTY_MOUSEPRESS
Functions : setId, getId, varId, varVisible, varExtents, varEffectiveExtent, setEnable, isEnable, varEnable, isStackEnable, isFocused, setFocused, requestFocus, setToolTip, getToolTip, setPopup, getPopup, setLanguage, getLanguage, setCursor, getCursor, getStackCursor, updateExtents, getInnerExtent, setFrame, getFrame, getStyle, getFlags, setView, getView, setDirty, setDirty, getOnSreenPosition, getOnSreenPosition, showTooltip, showPopup, receiveEvent, isMouseOver, isMousePress, getEventManager



Text font : Font class */
public Chars STYLE_PROP_FONT

public Chars STYLE_PROP_BORDER

public Chars STYLE_PROP_BACKGROUND


radius : double class */
public Chars STYLE_PROP_FAMILY


radius : double class */
public Chars STYLE_PROP_RADIUS


brush : Brush class */
public Chars STYLE_PROP_BRUSH


brush paint : Paint class */
public Chars STYLE_PROP_BRUSH_PAINT


fill paint : Paint class */
public Chars STYLE_PROP_FILL_PAINT


visual margin : double class, this margin is used at rendering time for clipping */
public Chars STYLE_PROP_VISUAL_MARGIN


margin : double class, this margin is used by layouts */
public Chars STYLE_PROP_MARGIN


shape : String class */
public Chars STYLE_PROP_SHAPE


transform : 6 doubles : affine transform in col order */
public Chars STYLE_PROP_TRANSFORM


fitting : define how the border shape if fitted, values are scaled, centered, stretched, zoomed, corner */
public Chars STYLE_PROP_FITTING


effect : special effects on widget, blur, morphologic,... could be anything visual */
public Chars STYLE_PROP_EFFECT


Property indicating when the widget id changed.
public Chars PROPERTY_ID


Property indicating when the cursor changes.
public Chars PROPERTY_CURSOR


Property indicating the widget needs to be repainted or not.
public Chars PROPERTY_DIRTY


Property indicating if the widget is enable.
public Chars PROPERTY_ENABLE


Property indicating if the widget is enable.
public Chars PROPERTY_STACKENABLE


Property indicating if the widget is focused.
public Chars PROPERTY_FOCUSED


Property indicating when the popup widget changed.
public Chars PROPERTY_POPUP


Property indicating when the tooltip widget changed.
public Chars PROPERTY_TOOLTIP


Property indicating when the frame changed.
public Chars PROPERTY_FRAME


Property indicating when the view changed.
public Chars PROPERTY_VIEW


Property indicating when the widget language changed.
public Chars PROPERTY_LANGUAGE


Property indicating the widget parent.
public Chars PROPERTY_MOUSEOVER


Property indicating the widget parent.
public Chars PROPERTY_MOUSEPRESS



Set widget id.
param  id not null
void setId (Chars id)


return  widget id, never null
Chars getId ()


return  id variable
Variable varId ()


return  visible variable
Variable varVisible ()


return  extents variable
Variable varExtents ()


return  effective extent variable
Variable varEffectiveExtent ()


Set widget state, enable or disable.
param  enable
void setEnable (boolean enable)


return  true if widget is active
boolean isEnable ()


return  enable variable
Variable varEnable ()


search throw parents to find if any of them is disable.
return  true if all parents in the stack are enable.
boolean isStackEnable ()


Indicate if the widget is focused.
return  true if widget is focused
boolean isFocused ()


WARNING : INTERNAL USE ONLY, DO NOT CALL IT YOURSELF.
USE method requestFocus.
param  focused
void setFocused (boolean focused)


Request focus on this widget.
void requestFocus ()


Set widget tooltip.
param  tooltip, can be null
void setToolTip (Widget tooltip)


return  popup tooltip, can be null.
Widget getToolTip ()


Set widget popup.
param  popup, can be null
void setPopup (Widget popup)


return  popup widget, can be null.
Widget getPopup ()


Set widget language.
param  language, can not be null
param  recursive, loop on childrens to set language
void setLanguage (Language language, boolean recursive)


return  language, can not be null.
Language getLanguage ()


Set widget cursor.
param  cursor, can be null
void setCursor (Cursor cursor)


return  cursor can be null.
Cursor getCursor ()


search throw parents to find the first cursor
return  Cursor, can be null
Cursor getStackCursor ()


WARNING : INTERNAL USE ONLY, DO NOT CALL IT YOURSELF.
Reaffect extents which are not overridden.
boolean updateExtents ()


The widget effective inner bounding box, excluding margins and overlaps.
return  BoundingBox
BBox getInnerExtent ()


INTERNAL USE ONLY, DO NOT CALL THIS METHOD YOURSELF !
param  frame
void setFrame (Frame frame)

Frame getFrame ()


Style definition,
return
WStyle getStyle ()


Flags are similar to CSS style classes.
It is a list of Chars mainly used to mark widgets.
return  Set, never null
Set getFlags ()



void setView (View view)

View getView ()

void setDirty ()


Set dirty.
param  dirtyArea
void setDirty (BBox dirtyArea)


Get on screen position of a children of this widget.
return  position of null if widget is not displayed.
Tuple getOnSreenPosition (Widget child)


Get on screen position of this widget.
return  position of null if widget is not displayed.
Tuple getOnSreenPosition ()


Force showing tooltip.
void showTooltip ()


Force showing popup.
void showPopup ()


Catch events.
Such as mouse and keyboard events.
param  event
void receiveEvent (Event event)


Utility method used by styles to get current mouse state relative to this widget.
return  true if mouse is over this widget
boolean isMouseOver ()


Utility method used by styles to get current mouse state relative to this widget.
return  true if mouse is pressed this widget
boolean isMousePress ()


FOR INTERNAL USE ONLY.
return
EventManager getEventManager ()