Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Gui.EditBindingsListModel Class Reference

List model for ListBoxEditBindings. More...

Inheritance diagram for Dragengine.Gui.EditBindingsListModel:
Dragengine.Gui.DefaultListModel Dragengine.Gui.ListModel

Public Member Functions

void forEachEntry (Block ablock)
 Visit entries with block with parameter EditBindingsListModelEntry.
BindingManager getBindingManager ()
 Binding manager.
EditBindingsListModelEntry getEntryAt (int index)
 Entry at index.
EditBindingsListModelEntry getEntryWith (Command command)
 Entry with command or null if not found.
EditBindingsListModelEntry getEntryWith (String commandName)
 Entry with command or null if not found.
EditBindingsListModel new (BindingManager bindingManager)
 Create empty list model.
void notifyContentChanged (int fromIndex, int toIndex)
 Notify all that the content of the model in the given range changed.
void notifyElementsAdded (int fromIndex, int toIndex)
 Notify all elements have been added.
void notifyElementsRemoved (int fromIndex, int toIndex)
 Notify all elements have been removed.
Public Member Functions inherited from Dragengine.Gui.DefaultListModel
void add (Object element)
 Add element.
void addAll (Array content)
 Add elements from array.
void addListener (ListModelListener listener)
 Add listener.
Array collect (Block ablock)
 Return array with content for which block returns true.
Object find (Block ablock)
 Find first object for which block returns true.
Object getAt (int index)
 Element at index.
bool getAutoSelect ()
 Automatically select items.
Array getContent ()
 Get content as array.
int getCount ()
 Number of elements.
int getSelected ()
 Index of the selected element or -1 if there is no selected element.
bool has (Object element)
 Element is present.
void insert (int index, Object element)
 Insert element at index.
void insertAll (int index, Array content)
 Insert elements from array at index.
void move (Object object, int index)
 Move element to new location.
void moveIndex (int indexFrom, int indexTo)
 Move element to new location.
DefaultListModel new ()
 Create default list model.
DefaultListModel new (Array content)
 Create default list model with initial content.
void remove (Object element)
 Remove element.
void removeArray (Array content)
 Remove elements from array.
void removeFrom (int index)
 Remove element.
void removeListener (ListModelListener listener)
 Remove listener.
void removeRange (int firstIndex, int lastIndex)
 Remove elements from range.
void setAll (Array elements)
 Replaces all elements.
void setAt (int index, Object element)
 Set element at index.
void setAutoSelect (bool autoSelect)
 Set to automatically select items.
void setContent (Array content)
 Set content from array.
void setRange (int firstIndex, int lastIndex, Array elements)
 Replaces elements in range.
void setSelected (int index)
 Set index of selected element or -1 if none is no selected element.
void setSelectedElement (Object element)
 Set selected element.
void sort ()
 Sort elements using element compare() method.
Public Member Functions inherited from Dragengine.Gui.ListModel
int indexOf (Object element)
 Index of element or -1 if absent.

Protected Member Functions

void updateBindings (int fromIndex, int toIndex)
 Update bindings in range.

Detailed Description

List model for ListBoxEditBindings.

Contains instances of EditBindingsListModelEntry.

Member Function Documentation

◆ forEachEntry()

void Dragengine.Gui.EditBindingsListModel.forEachEntry ( Block ablock)

Visit entries with block with parameter EditBindingsListModelEntry.

References Dragengine.Gui.DefaultListModel.getAt(), and getEntryWith().

Referenced by updateBindings().

◆ getBindingManager()

BindingManager Dragengine.Gui.EditBindingsListModel.getBindingManager ( )

Binding manager.

Referenced by getEntryWith().

◆ getEntryAt()

EditBindingsListModelEntry Dragengine.Gui.EditBindingsListModel.getEntryAt ( int index)

Entry at index.

Referenced by getEntryWith().

◆ getEntryWith() [1/2]

EditBindingsListModelEntry Dragengine.Gui.EditBindingsListModel.getEntryWith ( Command command)

Entry with command or null if not found.

References getBindingManager().

Referenced by forEachEntry(), and updateBindings().

◆ getEntryWith() [2/2]

EditBindingsListModelEntry Dragengine.Gui.EditBindingsListModel.getEntryWith ( String commandName)

Entry with command or null if not found.

References getEntryAt().

◆ new()

EditBindingsListModel Dragengine.Gui.EditBindingsListModel.new ( BindingManager bindingManager)

Create empty list model.

Add commands to edit to the list. Binding manager is used to find the bound bindings for each command in the list.

Parameters
bindingManagerBinding manager to use.

References new().

Referenced by new().

◆ notifyContentChanged()

void Dragengine.Gui.EditBindingsListModel.notifyContentChanged ( int fromIndex,
int toIndex )

Notify all that the content of the model in the given range changed.

Reimplemented from Dragengine.Gui.DefaultListModel.

References Dragengine.Gui.DefaultListModel.getCount().

Referenced by updateBindings().

◆ notifyElementsAdded()

void Dragengine.Gui.EditBindingsListModel.notifyElementsAdded ( int fromIndex,
int toIndex )

Notify all elements have been added.

References Dragengine.Gui.DefaultListModel.getAt().

Referenced by updateBindings().

◆ notifyElementsRemoved()

void Dragengine.Gui.EditBindingsListModel.notifyElementsRemoved ( int fromIndex,
int toIndex )

Notify all elements have been removed.

Referenced by updateBindings().

◆ updateBindings()

void Dragengine.Gui.EditBindingsListModel.updateBindings ( int fromIndex,
int toIndex )
protected

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