Package snap.props
Class PropObject
java.lang.Object
snap.props.PropObject
- All Implemented Interfaces:
PropChange.DoChange
- Direct Known Subclasses:
Border
,CharBlock
,Effect
,FileHeader
,Font
,NumberFormat
,PropObjectProxy
,Shape3D
,Stroke
,Tab
,TaskMonitor
,TextBlock
,TextStyle
,Undoer
,View
,ViewOwner
,WebFile
A base class for anything that wants to work with props.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add DeepChange listener.void
Add listener.void
addPropChangeListener
(PropChangeListener aPCL, String... theProps) Add listener.protected PropObject
clone()
Standard clone implementation.protected final void
firePropChange
(String aProp, Object oldVal, Object newVal) Fires a property change for given property name, old value, new value and index.protected final void
firePropChange
(String aProp, Object oldVal, Object newVal, int anIndex) Fires a property change for given property name, old value, new value and index.protected void
firePropChange
(PropChange aPC) Fires a given property change.getPropDefault
(String aPropName) Returns the value for given key.getPropForName
(String aPropName) Returns the prop for given name.Returns the parent PropObject (if available).Returns the PropSet.Prop[]
Returns the props for archival.Prop[]
Returns extra props for archival.Returns the props string.getPropValue
(String aPropName) Returns the value for given prop name.protected void
Initialize Props.boolean
isPropDefault
(String aPropName) Returns whether give prop is set to default.void
processPropChange
(PropChange aPC, Object oldVal, Object newVal) PropChange.DoChange method.void
Remove DeepChange listener.void
Remove listener.void
removePropChangeListener
(PropChangeListener aPCL, String... theProps) Remove listener.void
setPropsString
(String propsString) Sets prop values for JSON/CSS style string, e.g.: "Name: AgeText; Margin: 4; PrefWidth: 24;"void
setPropValue
(String aPropName, Object aValue) Sets the value for given prop name.void
setPropValues
(Object... keyValues) Sets prop key values - might be an improper convenience.toString()
Standard toString implementation.Standard toStringProps implementation.
-
Field Details
-
_pcs
-
EMPTY_OBJECT
-
-
Constructor Details
-
PropObject
public PropObject()Constructor.
-
-
Method Details
-
getPropSet
Returns the PropSet. -
getPropForName
Returns the prop for given name. -
getPropsForArchival
Returns the props for archival. -
getPropsForArchivalExtra
Returns extra props for archival. -
getPropParent
Returns the parent PropObject (if available). -
initProps
Initialize Props. Override to support props for this class. -
getPropValue
Returns the value for given prop name. -
setPropValue
Sets the value for given prop name. -
getPropsString
Returns the props string. -
setPropsString
Sets prop values for JSON/CSS style string, e.g.: "Name: AgeText; Margin: 4; PrefWidth: 24;" -
setPropValues
Sets prop key values - might be an improper convenience. -
isPropDefault
Returns whether give prop is set to default. -
getPropDefault
Returns the value for given key. -
addPropChangeListener
Add listener. -
addPropChangeListener
Add listener. -
removePropChangeListener
Remove listener. -
removePropChangeListener
Remove listener. -
firePropChange
Fires a property change for given property name, old value, new value and index. -
firePropChange
Fires a property change for given property name, old value, new value and index. -
firePropChange
Fires a given property change. -
addDeepChangeListener
Add DeepChange listener. -
removeDeepChangeListener
Remove DeepChange listener. -
processPropChange
PropChange.DoChange method.- Specified by:
processPropChange
in interfacePropChange.DoChange
-
clone
Standard clone implementation.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
toString
Standard toString implementation. -
toStringProps
Standard toStringProps implementation.
-