Drag[en]gine Script Module DragonScript  1.23
Dragengine.Gui.Designers.DefaultWidgetDesigner Class Reference

Default implementation of WidgetDesigner. More...

Inheritance diagram for Dragengine.Gui.Designers.DefaultWidgetDesigner:
Dragengine.Gui.Designers.WidgetDesigner Dragengine.Gui.Designers.DefaultButtonDesigner Dragengine.Gui.Designers.DefaultButtonWidgetDesigner Dragengine.Gui.Designers.DefaultComboBoxDesigner Dragengine.Gui.Designers.DefaultImageDesigner Dragengine.Gui.Designers.DefaultLabelDesigner Dragengine.Gui.Designers.DefaultMenuItemSubMenuDesigner Dragengine.Gui.Designers.DefaultMenuItemToggleDesigner Dragengine.Gui.Designers.DefaultProgressBarDesigner Dragengine.Gui.Designers.DefaultScrollBarDesigner Dragengine.Gui.Designers.DefaultSliderDesigner Dragengine.Gui.Designers.DefaultSpinButtonDesigner Dragengine.Gui.Designers.DefaultVideoDesigner Dragengine.Gui.Designers.DefaultWindowDesigner

Classes

class  StateDesign
 Design for a particular widget state. More...
 

Public Member Functions

WidgetDesigner copyDesigner ()
 Create copy of designer. More...
 
void designWidget (Widget widget)
 Design widget. More...
 
StateDesign getDesignDisabled ()
 Design for disabled state. More...
 
StateDesign getDesignFocused ()
 Design for focused state. More...
 
StateDesign getDesignFocusedHover ()
 Design for focused hover state. More...
 
StateDesign getDesignHover ()
 Design for hover state. More...
 
StateDesign getDesignNormal ()
 Design for normal state. More...
 
Widget getStateTrackWidget (Widget widget)
 Find state track widget. More...
 
DefaultWidgetDesigner new ()
 Create new widget designer. More...
 
DefaultWidgetDesigner new (DefaultWidgetDesigner designer)
 Create copy of widget designer. More...
 
void setParameter (String name, Object value)
 Set parameter. More...
 

Protected Member Functions

StateDesign getNamedStateDesign (String stateName)
 Get state for parameter name selector component or null if not found. More...
 
void setDesignDisabled (StateDesign design)
 Set design for disabled state. More...
 
void setDesignFocused (StateDesign design)
 Set design for focused state. More...
 
void setDesignFocusedHover (StateDesign design)
 Set design for focused hover state. More...
 
void setDesignHover (StateDesign design)
 Set design for hover state. More...
 
void setDesignNormal (StateDesign design)
 Set design for normal state. More...
 
StateDesign widgetStateFindDesign (Widget widget)
 Get design to apply to widget. More...
 

Detailed Description

Default implementation of WidgetDesigner.

Changes canvas creator and border depending on widget. Supports desigining widget for normal state, disabled state, hovering state and focused state. Default implementation chooses design depending on widget enabled, has focus and hover state. Subclass can overwrite to use a different logi.

Member Function Documentation

◆ copyDesigner()

◆ designWidget()

◆ getDesignDisabled()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignDisabled ( )

Design for disabled state.

◆ getDesignFocused()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignFocused ( )

Design for focused state.

◆ getDesignFocusedHover()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignFocusedHover ( )

Design for focused hover state.

◆ getDesignHover()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignHover ( )

Design for hover state.

◆ getDesignNormal()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getDesignNormal ( )

Design for normal state.

◆ getNamedStateDesign()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.getNamedStateDesign ( String  stateName)
protected

Get state for parameter name selector component or null if not found.

Reimplemented in Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultButtonWidgetDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.

◆ getStateTrackWidget()

Widget Dragengine.Gui.Designers.DefaultWidgetDesigner.getStateTrackWidget ( Widget  widget)

Find state track widget.

Version
1.5

Finds the widget highest up in the parent widget chain with getStateChangeNotifyChildren() set to true. If not found returns widget.

◆ new() [1/2]

◆ new() [2/2]

DefaultWidgetDesigner Dragengine.Gui.Designers.DefaultWidgetDesigner.new ( DefaultWidgetDesigner  designer)

Create copy of widget designer.

◆ setDesignDisabled()

void Dragengine.Gui.Designers.DefaultWidgetDesigner.setDesignDisabled ( StateDesign  design)
protected

Set design for disabled state.

◆ setDesignFocused()

void Dragengine.Gui.Designers.DefaultWidgetDesigner.setDesignFocused ( StateDesign  design)
protected

Set design for focused state.

◆ setDesignFocusedHover()

void Dragengine.Gui.Designers.DefaultWidgetDesigner.setDesignFocusedHover ( StateDesign  design)
protected

Set design for focused hover state.

◆ setDesignHover()

void Dragengine.Gui.Designers.DefaultWidgetDesigner.setDesignHover ( StateDesign  design)
protected

Set design for hover state.

◆ setDesignNormal()

void Dragengine.Gui.Designers.DefaultWidgetDesigner.setDesignNormal ( StateDesign  design)
protected

Set design for normal state.

◆ setParameter()

void Dragengine.Gui.Designers.DefaultWidgetDesigner.setParameter ( String  name,
Object  value 
)

Set parameter.

Supported parameters:

| name | value | Setter | | {state}.canvas | CanvasCreator | getDesign{state}.setCanvasCreator | | {state}.border | BorderFactory | getDesign{state}.setBorderFactory | | {state}.font | Font | getDesign{state}.setFont | | {state}.textColor | Color | getDesign{state}.setTextColor | | {state}.padding | BorderSize | getDesign{state}.setPadding | | {state}.minimumSize | Point | getDesign{state}.setMinimumSize | | {state}.mousePointer | MousePointerFactory | getDesign{state}.setMousePointerFactory |

Whereas {state} can be: | name | value | | normal | Widget is in normal state | | disabled | Widget is disabled | | focused | Widget has focus | | hover | Mouse pointer hover over widget or children thereof | | focusedHover | Mouse pointer hover over widget or children thereof while focused |

Implements Dragengine.Gui.Designers.WidgetDesigner.

Reimplemented in Dragengine.Gui.Designers.DefaultWindowDesigner, Dragengine.Gui.Designers.DefaultVideoDesigner, Dragengine.Gui.Designers.DefaultSpinButtonDesigner, Dragengine.Gui.Designers.DefaultSliderDesigner, Dragengine.Gui.Designers.DefaultScrollBarDesigner, Dragengine.Gui.Designers.DefaultProgressBarDesigner, Dragengine.Gui.Designers.DefaultOptionBoxDesigner, Dragengine.Gui.Designers.DefaultMenuItemToggleDesigner, Dragengine.Gui.Designers.DefaultMenuItemSubMenuDesigner, Dragengine.Gui.Designers.DefaultLabelDesigner, Dragengine.Gui.Designers.DefaultImageDesigner, Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultCheckBoxDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.

◆ widgetStateFindDesign()

StateDesign Dragengine.Gui.Designers.DefaultWidgetDesigner.widgetStateFindDesign ( Widget  widget)
protected

Get design to apply to widget.

Determines the state of the widget and the appropriate state design to use. The returned state design can be a set state design or a merge of multiple state designs using a fallback logic.

Reimplemented in Dragengine.Gui.Designers.DefaultComboBoxDesigner, Dragengine.Gui.Designers.DefaultButtonWidgetDesigner, and Dragengine.Gui.Designers.DefaultButtonDesigner.


The documentation for this class was generated from the following file: