java.lang.Object
org.autogui.base.mapping.GuiReprValue
org.autogui.base.mapping.GuiReprPropertyPane
- All Implemented Interfaces:
GuiRepresentation
a property member definition: [propertyName: [ propertyValueField ] ].
the representation matches any context which has a property-member-type. However, value representations (string, file, enum, boolean and number) directly support the property-member-type and precedes this representation.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.autogui.base.mapping.GuiReprValue
GuiReprValue.NamedValue, GuiReprValue.ObjectSpecifier, GuiReprValue.ObjectSpecifierIndex, GuiReprValue.ObjectSpecifierNothing
Nested classes/interfaces inherited from interface org.autogui.base.mapping.GuiRepresentation
GuiRepresentation.GuiReprNone
-
Field Summary
FieldsFields inherited from class org.autogui.base.mapping.GuiReprValue
NONE, NONE_WITH_CACHE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateForContext
(GuiMappingContext context) fromHumanReadableString
(GuiMappingContext context, String str) fromJson
(GuiMappingContext context, Object target, Object json) create a new value object from the JSON with treating the target as an old value, or update the target with the JSON contents.fromJsonProperty
(GuiMappingContext context, Object target, Object json) fromJsonWithNamed
(GuiMappingContext context, Object target, Object json) fromSource
(Object o) boolean
isEditableFromChild
(GuiMappingContext context) boolean
boolean
boolean
match
(GuiMappingContext context) match the representation with the typeElement of the context, and if succeeded, it sets this representation to the context, and it might create sub-contexts for recursive matches *void
setSubRepresentations
(GuiRepresentation subRepresentations) toHumanReadableString
(GuiMappingContext context, Object source) method for constructing "toString" copy operations: the returned string will be separated by tabs and new-linestoJson
(GuiMappingContext context, Object source) convert the source into JSON formattoJsonProperty
(GuiMappingContext context, Object source) toJsonWithNamed
(GuiMappingContext context, Object source) the source might be aGuiReprValue.NamedValue
, then it unwraps the named value, callsGuiRepresentation.toJson(GuiMappingContext, Object)
, and it returns Map with the name.toString()
Methods inherited from class org.autogui.base.mapping.GuiReprValue
addHistoryValue, castOrMake, checkAndUpdateSource, convertLog, createNewValue, errorWhileAddHistoryValue, fromSourceUpdated, getNoneSupplier, getParentSource, getUpdatedSource, getUpdatedValue, getUpdatedValueWithoutNoUpdate, getValue, getValueCollectionElement, getValueCollectionSize, getValueType, getValueWithoutNoUpdate, isEditable, isHistoryValueStored, isHistoryValueStored, isHistoryValueSupported, isUpdateContextSourceByUpdateFromGui, matchValueType, notifyUpdateWithParentSourceNone, setSource, toParentSource, toUpdateValue, unwrapNoUpdate, update, updateCollectionElement, updateFromGui, updateWithParentSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.autogui.base.mapping.GuiRepresentation
continueCheckAndUpdateSourceForChildren, isJsonSetter, isTaskRunnerUsedFor, matchAndSetNotifiersAsInit, setNotifiersTree, shutdown, toStringHeader
-
Field Details
-
subRepresentations
-
-
Constructor Details
-
GuiReprPropertyPane
-
GuiReprPropertyPane
public GuiReprPropertyPane()
-
-
Method Details
-
setSubRepresentations
-
getSubRepresentations
-
match
Description copied from interface:GuiRepresentation
match the representation with the typeElement of the context, and if succeeded, it sets this representation to the context, and it might create sub-contexts for recursive matches *- Specified by:
match
in interfaceGuiRepresentation
- Overrides:
match
in classGuiReprValue
- Parameters:
context
- the context of the repr.- Returns:
- the matching result
-
toSource
- Overrides:
toSource
in classGuiReprValue
- Parameters:
o
- a wrapped object for clients of the representation- Returns:
- a raw-object which can be directly passed to type-element's executing methods
-
fromSource
- Overrides:
fromSource
in classGuiReprValue
- Parameters:
o
- a raw-object which can be directly passed to type-element's executing methods- Returns:
- a wrapped object for clients of the representation
-
createForContext
-
isEditableFromChild
-
toJsonWithNamed
Description copied from interface:GuiRepresentation
the source might be aGuiReprValue.NamedValue
, then it unwraps the named value, callsGuiRepresentation.toJson(GuiMappingContext, Object)
, and it returns Map with the name. otherwise, it simply calls toJson and returns the result.- Parameters:
context
- context of the repr.source
- the source of returned JSON- Returns:
- JSON object
-
fromJsonWithNamed
- Parameters:
context
- the context of the repr. In most cases, the type of the context will be a property.target
- the target object. if it isGuiReprValue.NamedValue
, then it obtains the value. nullablejson
- aMap
with containing an entry for the name of the context- Returns:
- the returned value
GuiRepresentation.fromJson(GuiMappingContext, Object, Object)
. if the target is a NamedValue, the returned value will also be a NamedValue.
-
toJson
Description copied from interface:GuiRepresentation
convert the source into JSON format- Specified by:
toJson
in interfaceGuiRepresentation
- Overrides:
toJson
in classGuiReprValue
- Parameters:
context
- a context holds the representationsource
- the converted object- Returns:
- Map: { propertyName: propertyJson, ... }
-
toJsonProperty
-
fromJson
Description copied from interface:GuiRepresentation
create a new value object from the JSON with treating the target as an old value, or update the target with the JSON contents. the behavior can be varied by each representation, confirmed byGuiRepresentation.isJsonSetter()
.- Specified by:
fromJson
in interfaceGuiRepresentation
- Overrides:
fromJson
in classGuiReprValue
- Parameters:
context
- the target contexttarget
- the target value, which might be aGuiReprValue.NamedValue
or the value of the property. Note: the target is not a property owner object.json
- aMap
json- Returns:
- the property value or a
GuiReprValue.NamedValue
if the target is also the one.
-
fromJsonProperty
-
isFromJsonTakingMapWithContextNameEntry
- Overrides:
isFromJsonTakingMapWithContextNameEntry
in classGuiReprValue
- Parameters:
context
- the target context- Returns:
- true means
GuiReprValue.fromJson(GuiMappingContext, Object, Object)
takes a map with the entry namedGuiMappingContext.getName()
-
toHumanReadableString
Description copied from interface:GuiRepresentation
method for constructing "toString" copy operations: the returned string will be separated by tabs and new-lines- Parameters:
context
- the context of the repr.source
- converted to string- Returns:
- a string representation of the source
-
fromHumanReadableString
-
isHistoryValueSupported
public boolean isHistoryValueSupported()- Overrides:
isHistoryValueSupported
in classGuiReprValue
- Returns:
- false: a property does not support history values, but the content repr. might support it.
-
toString
- Overrides:
toString
in classGuiReprValue
-