PCanvasPanel2D class
- Inheritance
-
- Object
- WithBoundingBox
- PCanvasElement
- PCanvasElement2D
- PCanvasElement2DBase
- PCanvasPanel2D
- Mixed-in types
- Implementers
- Available extensions
Constructors
-
PCanvasPanel2D({PStyle? style, PCanvasElementContainer<
PCanvasElement> ? parent, int? zIndex, Position? pos, PDimension? dimension, Iterable<PCanvasElement2D> ? elements, String? id}) -
PCanvasPanel2D.fromJson(Map<
String, dynamic> j, {PCanvasElementContainer<PCanvasElement> ? parent}) -
factory
Properties
- asPCanvas → PCanvas?
-
Returns this instance casted to PCanvas if it's possible.
no setteroverride
- asPCanvasElement → PCanvasElement?
-
Returns this instance casted to PCanvasElement if it's possible.
no setteroverride
- boundingBox → PRectangle
-
The bounding box of this element.
no setterinherited
- className → String
-
no setteroverride
- dimension ↔ PDimension
-
The dimension of this element.
getter/setter pairinherited
-
elements
→ UnmodifiableListView<
PCanvasElement2D> -
All the PCanvasElements of this instance.
no setteroverride
- elementsLength → int
-
Returns elements length.
no setteroverride
- hasElements → bool
-
Returns
true
if this instances has elements.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ num
-
The resolved height of this 2D element.
getter/setter pairinherited
- id ↔ String?
-
The ID of this element.
getter/setter pairinherited
-
parent
↔ PCanvasElementContainer<
PCanvasElement> ? -
The parent of this element.
getter/setter pairinherited
- parentElement → PCanvasElement?
-
no setterinherited
- pCanvas → PCanvas?
-
Returns the root PCanvas if this element is attached.
no setterinherited
- position ↔ Position
-
The position of this element.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style ↔ PStyle?
-
getter/setter pair
- typeName → String
-
no setteroverride
- width ↔ num
-
The resolved width of this 2D element.
getter/setter pairinherited
- x ↔ num
-
The resolved X coordinate of this 2D element.
getter/setter pairinherited
- y ↔ num
-
The resolved Y coordinate of this 2D element.
getter/setter pairinherited
- zIndex ↔ int?
-
The Z index of this element.
getter/setter pairinherited
Methods
-
addAllElements(
Iterable< PCanvasElement2D> elements) → void -
Adds all the entries in
elements
to this instances.inherited -
addElement(
PCanvasElement2D element) → void -
Adds an
element
to this instances.override -
clearElements(
) → void -
Clears the elements of this instance.
override
-
dispatchOnClick(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickoverride -
dispatchOnClickDown(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickDownoverride -
dispatchOnClickMove(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickMoveoverride -
dispatchOnClickUp(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickUpoverride -
dispatchOnKey(
PCanvasKeyEvent event) → PCanvasKeyEvent -
Processes
event
and calls onKeyoverride -
dispatchOnKeyDown(
PCanvasKeyEvent event) → PCanvasKeyEvent -
Processes
event
and calls onKeyDownoverride -
dispatchOnKeyUp(
PCanvasKeyEvent event) → PCanvasKeyEvent -
Processes
event
and calls onKeyUpoverride -
getElement(
int index) → PCanvasElement2D -
Returns the element at elements
index
.override -
getPaintBoundingBox(
PCanvas pCanvas) → PRectangle -
The bounding box of the painted area of this element.
inherited
-
getXY(
) → Point -
gets x and y.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClick(
PCanvasClickEvent event) → void -
Canvas
onClick
handler.inherited -
onClickDown(
PCanvasClickEvent event) → void -
Canvas
onClickDown
handler.inherited -
onClickMove(
PCanvasClickEvent event) → void -
Canvas
onClickMove
handler.inherited -
onClickUp(
PCanvasClickEvent event) → void -
Canvas
onClickUp
handler.inherited -
onKey(
PCanvasKeyEvent event) → void -
Canvas
onKey
handler.inherited -
onKeyDown(
PCanvasKeyEvent event) → void -
Canvas
onKeyDown
handler.inherited -
onKeyUp(
PCanvasKeyEvent event) → void -
Canvas
onKeyUp
handler.inherited -
paint(
PCanvas pCanvas) → void -
The paint operation of this element.
override
-
paintBackground(
PCanvas pCanvas) → void -
removeAllElements(
Iterable< PCanvasElement2D> elements) → void -
Removes all entries in
elements
from this instances.inherited -
removeElement(
PCanvasElement2D element) → bool -
Removes
element
from this instance.override -
selectElementAtPoint<
T extends PCanvasElement> (Point point, {bool recursive = false}) → List< T> -
inherited
-
selectElementByID<
T extends PCanvasElement> (String? id, {bool recursive = false}) → List< T> -
Returns a list of PCanvasElement of type
T
with a matchingid
.inherited -
selectElementByType<
T extends PCanvasElement> ({bool recursive = false}) → List< T> -
Returns a list of PCanvasElement of type
T
.inherited -
selectElementWhere<
T extends PCanvasElement> (bool selector(T elem), {bool recursive = false}) → List< T> -
Returns a list of PCanvasElement of type
T
filtered byselector
.inherited -
setXY(
num x, num y) → dynamic -
Sets the
x
andy
.inherited -
sortElements(
int comparator(PCanvasElement2D a, PCanvasElement2D b)) → void -
toInnerClickEvent(
PCanvasClickEvent event, {PCanvasElement? targetElement, PCanvas? pCanvas}) → PCanvasClickEvent -
Returns an
event
translated to the internal coordinates of this element.inherited -
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited