PopupMenu class

This class provides a popup menu with executable menu items. A popup is realized as a non-modal BaseDialog. The popup appearance (style) is defined by the attributes of the class DiaAttr.

Inheritance

Constructors

PopupMenu(Element parent, String id, List<String> htmlItemTexts, List<String> buttontypes, List<String> isChecked, BaseDialogCloseCallback popupCallback, int x, int y, bool preventDefault)
Shows a popup menu above the parent element (e.g. a div) with: id The popup may optionally get an id (should be unique if the popup is to be identified with it). htmlItemTexts The menu items texts. The format is: "textDiaUtils.SEP_STANaction code". If action code = "TITLE", then this is not an action, but is displayed as a popup title. If text starts with POPUP_SPAN_GREYOUT, the menu item is displayed, but greyed out. If the user clicks on it, no action is performed. buttontypes If null, no special item style is applied to any menu item. If not null, the list must have the same length as htmlItemTexts. If a list entry is null, no special style is applied to the respective menu item. If a list entry is DiaAttr.CHECKBOX, a checkbox element is displayed in front of the item text. NOTE: Currently the checked box is provided only to display a status, not react on a checkbox state change. See below. isChecked Must be null, or have the same length as buttontypes. The list members may take on the value null or DiaUtils.FALSE or DiaUtils.TRUE. This defines whether the respective check button of buttontypes is show as "unchecked" or "checked". popupCallback will be called when an popup item is clicked, x, y are the top left corner coordinates of the popup. preventDefault if false: finger-scrolling the items is enabled for touch screens.

Properties

diaTable ↔ TableElement
read / write
lastTouchedActionCode ↔ String
read / write
lastTouchPoints ↔ List<Point<int>>
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
setPopupStyle(Element dia, int width) → void
close(UserInput userInput) → void
Closes the dialog. userInput is passed on to closeCallback if a non-null callback is defined. if userInput 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

final
final

Static Methods

show(Element parent, String id, List<String> htmlItemTexts, List<String> buttontypes, List<String> isChecked, int x, int y, bool preventDefault) → Future<UserInput>
Shows an InputDialog. See InputDialog for a description of the arguments. While InputDialog needs a close callback, this async method returns the user input.