Class Key
java.lang.Object
dev.pfaff.altargui.Key
Identifies a widget in the tree. Most often you will want a
unique key for each call-site
, but
sometimes you will want a widget to maintain its state as it is moved around the tree. For this, you will need to
use a Global
key.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static interface
Together with the parent's key, identifies a widget by thegetState
call-site in the tree.static final record
static final class
Global keys, represented byKey.Global
, like allCallSite
s, are compared by identity.static final record
static final record
static final class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Key.Bi
biKey
(Key.CallSite first, Key.CallSite second) Creates a newBi
key.static Key.Global
Creates a newGlobal
key.static <T> Key.IdentityValue
<T> identityKey
(T value) Creates a newIdentityValue
key.static Key.IntValue
intKey
(int value) Creates a newEqualityValue
key.static Key.Local
localKey()
Creates a newLocal
key.static <T> Key.EqualityValue
<T> valueKey
(T value) Creates a newEqualityValue
key.
-
Constructor Details
-
Key
public Key()
-
-
Method Details
-
globalKey
Creates a newGlobal
key. -
localKey
-
valueKey
Creates a newEqualityValue
key. -
identityKey
Creates a newIdentityValue
key. -
intKey
Creates a newEqualityValue
key. -
biKey
Creates a newBi
key.
-