IconPanel class
A panel containing clickable icons ordered as a matrix with respective callback functions. An icon panel is realized as a non-modal BaseDialog. The icon panel appearance (style) is defined by the attributes of the class DiaAttr.
- Inheritance
- Object
- BaseDialog
- IconPanel
Constructors
-
IconPanel(Element parent, String id, String iconPath, List<
String> iconNames, GetIconCallbacks getIconCallbacks, BaseDialogCloseCallback closeCallback, int x, int y, int panelWidth, int iconSize, int ncols, bool preventDefault) -
Creates and displays a panel with icons. Each icon may have a callback
function executed when the icon is clicked.
parent
- the panel is added to this element.id
- the panel can be identified with this id if unique.iconPath
- where the icons are stored reletive to specpad.iconNames
- list of the icons to be displayed.getIconCallbacks
- a function returning a list of callback functions to be executed when clicking on an icon. Order and length of the list must correspond toiconNames
. A list entry may be null.closeCallback
- called when the panel gets closed.x
,y
- position of the panel relative to specpad.panelWidth
- panel will get this width. Height is automatic.iconSize
- size of the icons in pixels, e.g. 24.ncols
- panel will get this many icon columns.preventDefault
- if false, finger-scrolling the items is enabled for touch.
Properties
- diaTable ↔ TableElement
-
read / write
- lastTouchedActionCode ↔ String
-
read / write
- closeCallback ↔ BaseDialogCloseCallback
-
read / write, inherited
- dia ↔ DivElement
-
read / write, inherited
- diaContainer ↔ DivElement
-
read / write, inherited
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- isModal ↔ bool
-
read / write, inherited
- isopen ↔ bool
-
read / write, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
getId(
) → String - Returns the id of this panel.
-
setStyle(
Element dia, int width) → void - Sets some styles for this icon panel.
-
close(
UserInput userInput) → void -
Closes the dialog.
userInput
is passed on to closeCallback if a non-null callback is defined. ifuserInput
is null, a non-null one is generated, with an empty String a button code.inherited -
createShowDia(
) → void -
Performs the dialog creation and display logic.
inherited
-
isOpen(
) → bool -
Returns true if the dialog is open.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Properties
- POPUP_SPAN_GREYOUT → String
-
final