Interface IPropCnr
- All Known Subinterfaces:
IActionActorSettings
,IAddUICompProvider<UICOMP>
,IChartContainer
,IClientBaseRelativeTarget
,IComponent
,IContentItem
,IEditorActionActorSettings
,IEFixedLayoutProp
,IELayoutMgr<LAYOUT_PROP>
,IELayoutMgrDND<LAYOUT_PROP>
,IELayoutMgrSimpleDND<LAYOUT_PROP>
,IELayoutProp
,IEntry
,IEUIComp
,IEUICompBase
,IEUICompCommon
,IEUIContainer
,IEUIPanel
,IEVSComponent
,IFocusComp
,IFontIconStyle
,IImageTarget
,IJavaClassLinkEnabler
,IJavaInterfaceLinkEnabler
,IJavaMethodLinkEnabler
,ILayoutDataAlignX
,ILayoutDataAlignY
,ILockUI
,IPropCnrBooleanSettings<BOOLEAN_OPTION>
,IPropCnrChoiceSettings<CHOICE>
,IPropCnrColorSettings<COLOR_OPTION>
,IPropCnrFillSettings<FILL_OPTION>
,IPropCnrFontSettings<FONT_OPTION>
,IPropCnrIntegerSettings<INTEGER_OPTION>
,IPropCnrKStringSettings<KSTRING_OPTION>
,IPropCnrNumberSettings<NUMBER_OPTION>
,IPropCnrStringSettings<STRING_OPTION>
,IPropCnrStrokeSettings<STROKE_OPTION>
,IPropDesigner
,IPropEditorReadOnly
,IReferrerParticipant
,ISelectorOwner
,IServerApplicationSetupPropCnr
,ITransferContainerProps
,IUIAction
,IUIActionHolder
,IUIAnimatedSingleIndexedSelectionComp
,IUIBooleanSelectionComp
,IUIBuilderFromVSLinkEnabler
,IUICellSelectionComp
,IUICheck2Component
,IUICheckComponent
,IUIComp
,IUIComponentLinkEnabler
,IUIContainer
,IUIContextMenuOwner
,IUIDateTimeComponent
,IUIDateValueComponent
,IUIDoubleRangeValueComponent
,IUIDoubleValueComponent
,IUIFocusComp
,IUIHint
,IUIIndexedSelectionComp
,IUILabelForTarget
,IUINullableValueComponent
,IUIPanelAnimation
,IUIPanelOwner
,IUIRadioComponent
,IUISelectionComp
,IUISingleIndexedSelectionComp
,IUITimeValueComponent
,IUITriStateSelectionComp
,IUIValueComponent
,IVirtualizedMonitorPanelProvider
,IVirtualizedMonitorProp
,IVSActionLinkEnabler
,IVSComponent
,IVSFieldLinkEnabler
,IVSMessageComponent
,IVSParticipant
,IWrappedElement
,IWSPropDesigner
- All Known Implementing Classes:
AbsoluteData
,AbsoluteLayout
,AbstractContentUIContainer
,AbstractImageDefinition
,AbstractImageResolution
,AbstractInputProps
,AbstractPredefinedSettings
,AbstractSettings
,AbstractStyles
,AbstractUIAction
,AbstractVSVariable
,AccordionData
,AccordionLayout
,ActionActors
,ActiveTerminalSession
,ActiveTerminalSessions
,AppDistributionProps
,AppLanguages
,Application
,AppPropCnr
,ArrayProp
,Axis2D
,BorderData
,BorderLayout
,CalendarData
,CalendarEvent
,CalendarLayout
,CaptureFieldProp
,CaptureRootProp
,CaptureScreenProp
,ClientProps
,ClientSessionProp
,ConnectionProfileSetup
,ConnectionProfilesSetup
,ContextMenuData
,ContextMenuLayout
,DatabaseActionActor.Settings
,DatabaseProps
,DesignerPropCnr
,DevParams
,DOMElement
,DragDropLinkAdapter
,DragDropPropCnr
,EAbsoluteData
,EAbsoluteLayout
,EAccordionData
,EAccordionLayout
,EAxis2D
,EBorderData
,EBorderLayout
,ECalendarData
,ECalendarEvent
,ECalendarLayout
,EContextMenuData
,EContextMenuLayout
,EditorActionActors
,EditorActiveTerminalSession
,EditorActiveTerminalSessions
,EditorAppPropCnr
,EditorClientSessionProp
,EditorConnectionProfileSetup
,EditorConnectionProfilesSetup
,EditorDatabaseActionActor.Settings
,EditorDatabaseProps
,EditorEndPointPropCnr
,EditorEndPointsPropCnr
,EditorFieldActor
,EditorFieldActors
,EditorFolderSettingsProp
,EditorFontFaces
,EditorFontFile
,EditorFontFiles
,EditorFontIconDefinition
,EditorFontIconsDefinition
,EditorHistoryBackward.Settings
,EditorHistoryForward.Settings
,EditorImageDefinition
,EditorImageLocation
,EditorImageResolution
,EditorImagesDefinition
,EditorImagesResolution
,EditorImagesStyle
,EditorImageStyle
,EditorImageStyleLocation
,EditorImageStylesResolution
,EditorInfoPropCnr
,EditorInputProps
,EditorInputVariable
,EditorJavaActionActor.Settings
,EditorJSONElementWrapper
,EditorJSONEncodedInput
,EditorJSONReplyDocument
,EditorLetsEncryptDomain
,EditorMailProps
,EditorMethodReference2
,EditorModuleProjectPropCnr
,EditorOutputColumn
,EditorOutputProps
,EditorOutputTable
,EditorOutputVariable
,EditorOutputVariables
,EditorPolicyProps
,EditorPropCnr
,EditorPushProps
,EditorPWAProps
,EditorRESTfulInputProps
,EditorResultProps
,EditorResultSetColumnProp
,EditorResultSetProps
,EditorRuntimeBuilderProps
,EditorScreenActionGroupProp
,EditorScreenActionProp
,EditorScreenActionsProp
,EditorScreenFieldGroupProp
,EditorScreenFieldProp
,EditorScreenFieldsProp
,EditorScreenIdentificationProp
,EditorScreenIdentificationsProp
,EditorScreenProp
,EditorSelector
,EditorServerAppConfig
,EditorServerConfigEnvProps
,EditorServerPluginConfig
,EditorServerProps
,EditorServerSettings
,EditorSessionConnectionStatProp
,EditorSessionsProp
,EditorSetFocus.Settings
,EditorSetSourceFieldValue.Settings
,EditorSetTargetFieldValue.Settings
,EditorStyledImageDefinition
,EditorStyles
,EditorSVGDefinition
,EditorTerminalActionActor.Settings
,EditorTerminalProps
,EditorTextTable
,EditorTransportField.Settings
,EditorURLEncodedInput
,EditorURLInputParameter
,EditorVirtualizedMonitorPropCnr
,EditorVirtualSpace
,EditorVSAction
,EditorVSColumnHeader
,EditorVSField
,EditorVSGroup
,EditorVSParticipantsHolder
,EditorVSRow
,EditorVSRows
,EditorVSTable
,EditorWebServerPortConfig
,EditorWebServiceActionActor.Settings
,EditorWebServiceProp
,EFlexData
,EFlexLayout
,EGridData
,EGridLayout
,EHeadingData
,EHeadingLayout
,EListData
,EListLayout
,EMapData
,EMapLayout
,EMapMarkerProp
,EMapMarkers
,EMenuBarData
,EMenuBarLayout
,EMenuData
,EMenuLayout
,EMLDefaultItemProp
,EMLGroup
,EMLGroupLayout
,EMList
,EMListData
,EMListLayout
,EMLItemProp
,EMUIHeading
,EMUISimpleDialog
,EMUISwitch
,EMUITabBar
,EndPointPropCnr
,EndPointsPropCnr
,EnvProps
,EPanelData
,EPlot2D
,ESeries
,ESeriesValue
,ESwapData
,ESwapLayout
,ETabBarData
,ETabBarLayout
,ETabData
,ETabLayout
,EUIAccordion
,EUIButton
,EUICalendar
,EUICalendarList
,EUIChart
,EUICheckBox
,EUICheckedMenuItem
,EUIComboBox
,EUIComps
,EUIContainer
,EUIContextMenu
,EUIDateTime
,EUIDialog
,EUIEmpty
,EUIGauge
,EUIImage
,EUIImage2
,EUILabel
,EUIMap
,EUIMedia
,EUIMenu
,EUIMenuBar
,EUIMenuItem
,EUIMenuSeparator
,EUIOutput
,EUIPanel
,EUIPanelPart
,EUIPanelPartCnr
,EUIProgress
,EUIRadioButton
,EUIRadioMenuItem
,EUISlider
,EUISpinner
,EUISwapContainer
,EUITabContainer
,EUITable
,EUITableColumn
,EUITableData
,EUITableLayout
,EUIText
,EUITextArea
,EUITitlePane
,FieldActor
,FieldActors
,FilePropCnr
,FileURIPropCnr
,FlexData
,FlexLayout
,FolderPropCnr
,FolderSettingsProp
,FolderURIPropCnr
,FontFaces
,FontFile
,FontFiles
,FontIconDefinition
,FontIconsDefinition
,GeoProps
,GridData
,GridLayout
,HeadingData
,HeadingLayout
,HistoryBackward.Settings
,HistoryForward.Settings
,ImageDefinition
,ImageLocation
,ImagePreview
,ImageResolution
,ImagesDefinition
,ImagesResolution
,ImagesStyle
,ImageStyle
,ImageStyleLocation
,ImageStylesResolution
,InputProps
,InputVariable
,JavaActionActorBase.Settings
,JavaProjectRootPropCnr
,JavaRootContainer
,JSONElementWrapper
,JSONEncodedInput
,JSONReplyDocument
,LayoutMgr
,LayoutProp
,LetsEncryptDomain
,ListData
,ListLayout
,LogicItemProp
,LogicProp
,MailProps
,MapData
,MapLayout
,MapMarkerProp
,MapMarkers
,MementoPropCnr
,MenuBarData
,MenuBarLayout
,MenuData
,MenuLayout
,MessageBox
,MethodReference2
,MLDefaultItemProp
,MLGroup
,MLGroupLayout
,MList
,MListData
,MListLayout
,MLItemProp
,ModuleApp
,ModuleFolderPropCnr
,ModuleProjectPropCnr
,ModuleRootPropCnr
,MUIHeading
,MUISimpleDialog
,MUISwitch
,MUITabBar
,MultiPropCnr
,OutputColumn
,OutputProps
,OutputTable
,OutputVariable
,OutputVariables
,PanelData
,PanelSettingsPropCnr
,ParsedJavaSourceContainer
,Plot2D
,PolicyProps
,ProjectRootPropCnr
,PropCnr
,ProxyPropCnr
,PushPropCnr
,PushProps
,PWAPropCnr
,PWAProps
,RecordingProp
,RecordingRootProp
,RecordingScreenProp
,RecordingScreensProp
,ReferralsHolder
,RESTfulInputProps
,ResultProps
,ResultSetColumnProp
,ResultSetProps
,RuntimeBuilderProps
,RuntimeImageDefinition
,ScreenActionGroupProp
,ScreenActionProp
,ScreenActionsProp
,ScreenFieldGroupProp
,ScreenFieldProp
,ScreenFieldsProp
,ScreenIdentificationProp
,ScreenIdentificationsProp
,ScreenProp
,Selector
,Series
,SeriesValue
,ServerAppConfig
,ServerAppDistributionProps
,ServerClientSessionProps
,ServerConfigEnvProps
,ServerKeysProp
,ServerPluginConfig
,ServerProps
,ServerRuntimeBuilderProps
,ServerSettings
,ServerSocketCommProps
,ServerVSViewerPropCnr
,SessionConnectionStatProp
,SessionsProp
,SetFocus.Settings
,SetSourceFieldValue.Settings
,SetTargetFieldValue.Settings
,SettingsPropCnr
,SocketCommProps
,SpeechRecognitionProp
,SpeechSynthesisProp
,SSLCommProps
,StyledImageDefinition
,Styles
,StylesCnr
,SVGDefinition
,SwapData
,SwapLayout
,TabBarData
,TabBarLayout
,TabData
,TabLayout
,TableRow
,TableRows
,TelnetCommProps
,TerminalActionActor.Settings
,TerminalProps
,TerminalSettings
,TestProcessorContainer
,TextTable
,Toaster
,TransactionCommProps
,TransportField.Settings
,TransportGroup.Settings
,TransportSelectedTableRows.Settings
,TransportSingleSelectedTableRow.Settings
,TransportSingleSelectedTableRowAndColumnToField.Settings
,TransportSingleSelectedTableRowToFields.Settings
,TransportTableColumn.Settings
,TransportTableRows.Settings
,UIAbstractListChoice
,UIAccordion
,UIButton
,UICalendar
,UICalendarList
,UIChart
,UICheckBox
,UICheckedMenuItem
,UIComboBox
,UIComp
,UIComps
,UIContainer
,UIContextMenu
,UIDateTime
,UIDialog
,UIEmpty
,UIGauge
,UIImage
,UIImage2
,UILabel
,UIMap
,UIMedia
,UIMenu
,UIMenuBar
,UIMenuItem
,UIMenuSeparator
,UIOutput
,UIPanel
,UIPanelBase
,UIPanelPart
,UIPanelPartCnr
,UIProgress
,UIRadioButton
,UIRadioMenuItem
,UISlider
,UISpinner
,UISwapContainer
,UITabContainer
,UITable
,UITableColumn
,UITableData
,UITableLayout
,UIText
,UITextArea
,UITitlePane
,URLEncodedInput
,URLInputParameter
,VirtualizedMonitorPropCnr
,VirtualsContainer.VContainer
,VirtualSpace
,VirtualsPropCnr
,VSAction
,VSColumnHeader
,VSComponent
,VSField
,VSGroup
,VSParticipantsHolder
,VSRow
,VSRows
,VSTable
,VSVariables
,VSViewerPropCnr
,WebServerPortConfig
,WebServiceActionActor.Settings
,WebServiceProp
,WebSocketCommProps
,WebSocketServerCommProps
,Windows
public interface IPropCnr extends IGProp<GProp<?>[]>
Interface for the property container class holds the container property name, a value as a GProp array and optionally has a parent and/or property listener(s).- Author:
- Christopher Mindus
Field Summary
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
addProp(IGProp<?> property)
Adds a new property to this container at the end.boolean
addProp(IGProp<?> property, IGProp<?> trigger)
Adds a new property to this container at the end.boolean
addProp2(IGProp<?> property)
Adds a new property to this container at the end.boolean
addProp2(IGProp<?> property, IGProp<?> trigger)
Adds a new property to this container at the end.default java.lang.String
canRequestFocus()
Returns if this component can receive focus.default java.lang.String
canRequestFocus(boolean ignoreStates)
Returns if this component can receive focus.java.lang.String
canRequestFocus(boolean ignoreVisibleFlag, boolean ignoreEnabledFlag)
Returns if this component can receive focus.boolean
containsProp(Atom atom)
Checks for presence of the property in the container.boolean
containsProp(java.lang.String name)
Checks for presence of the property in the container.default java.lang.String
couldRequestFocusIfVirtualized()
Returns if this component could receive focus if it would be virtualized.default java.lang.String
couldRequestFocusIfVirtualized(boolean ignoreStates)
Returns if this component could receive focus if it would be virtualized.java.lang.String
couldRequestFocusIfVirtualized(boolean ignoreVisibleFlag, boolean ignoreEnabledFlag)
Returns if this component could receive focus if it would be virtualized.Atom
createCopyOfAtom(Atom name)
Creates a "Copy of NNN" or "Copy 2 of NNN" of an atom.Atom
createUniqueAtom(Atom name, java.lang.String first, java.lang.String next, java.lang.String next2)
Creates an atom with the base name specified with a unique serial number (starting with one) appended, making this atom unique within this property container.Atom
createUniqueAtom(java.lang.String baseName)
Creates an atom with the base name specified with a unique serial number (starting with one) appended, making this atom unique within this property container.boolean
enablePropCommunication(boolean on)
Enables communication of this container.boolean
enablePropHashMap()
Enables usage of string hash map to property for fast access.GProp<?>[]
getAllProps(java.lang.Class<?>[] classes, boolean includeErrors)
Gets the properties of certain classes that are present in the tree below this container, i.e.int
getAllProps(java.lang.Class<?>[] classes, java.util.List<GProp<?>> list)
Gets the properties of certain classes that are present in the tree below this container, i.e.int
getAllProps(java.lang.Class<?>[] classes, java.util.List<GProp<?>> list, boolean includeErrors)
Gets the properties of certain classes that are present in the tree below this container, i.e.GProp<?>[]
getAllProps(java.lang.Class<? extends GProp<?>>... classes)
Gets the properties of certain classes that are present in the tree below this container, i.e.<GP> GP[]
getAllProps(java.lang.Class<GP> clazz)
Gets the properties of a certain class that are present in the tree below this container, i.e.<GP> GP[]
getAllProps(java.lang.Class<GP> clazz, boolean includeErrors)
Gets the properties of a certain class that are present in the tree below this container, i.e.<GP> int
getAllProps(java.lang.Class<GP> clazz, java.util.List<GP> list)
Gets the properties of a certain class that are present in the tree below this container, i.e.<GP> int
getAllProps(java.lang.Class<GP> clazz, java.util.List<GP> list, boolean includeErrors)
Gets the properties of a certain class that are present in the tree below this container, i.e.boolean
getBool(Atom atom)
Gets a boolean property from this property container.boolean
getBool(Atom atom, boolean defaultValue)
Gets a boolean property from this property container.boolean
getBool(java.lang.String name)
Gets a boolean property from this property container.boolean
getBool(java.lang.String name, boolean defaultValue)
Gets a boolean property from this property container.IPropErrorItem
getChildPropError(Atom atom)
Gets the child property default error ID.IPropErrorItem
getChildPropError(java.lang.String name)
Gets the child property default error ID.int
getChildPropErrorSeverity(Atom atom)
Gets the error severity of a child property.int
getChildPropErrorSeverity(java.lang.String name)
Gets the error severity of a child property.ErrorsProp
getErrorsProp(boolean createIfNotPresent)
Gets the errors property.java.lang.String
getExtendsError()
Gets the Extends Framework error.java.lang.String
getExtendsName()
Gets the reference property name being extended.java.lang.Class<?>[]
getExtendsPossibleClasses()
Gets the possible classes this container supports for the Extends Framework.GProp<?>
getFirstProp(Atom atom)
Finds the first property with the specified atom in the property tree.GProp<?>
getFirstProp(java.lang.String name)
Finds the first property with the specified name in the property tree.IFocusEngine
getFocusEngine(IFocusComp comp)
Locates the focus engine instance for the specified component.int
getInt(Atom atom)
Gets an integer property from this property container.int
getInt(Atom atom, int defaultValue)
Gets an integer property from this property container.int
getInt(java.lang.String name)
Gets an integer property from this property container.int
getInt(java.lang.String name, int defaultValue)
Gets an integer property from this property container.long
getLong(Atom atom)
Gets a long property from this property container.long
getLong(Atom atom, long defaultValue)
Gets a long property from this property container.long
getLong(java.lang.String name)
Gets a long property from this property container.long
getLong(java.lang.String name, long defaultValue)
Gets a long property from this property container.double
getNumber(Atom atom)
Gets a Number property from this property container.double
getNumber(Atom atom, double defaultValue)
Gets a Number property from this property container.double
getNumber(java.lang.String name)
Gets a Number property from this property container.double
getNumber(java.lang.String name, double defaultValue)
Gets a Number property from this property container.java.lang.Class<?>[]
getPossibleChildren()
Gets the acceptable children property classes that can be used in conjunction with e.g.GProp<?>
getProp(int index)
Gets the property at requestedindex
.<GP extends IGProp<?>>
GPgetProp(int index, java.lang.Class<GP> clazz)
Gets the property at requestedindex
.<GP extends IGProp<?>>
GPgetProp(int index, java.lang.Class<GP> clazz, boolean logError)
Gets the property at requestedindex
.GProp<?>
getProp(Atom atom)
Gets the property with theatom
name.GProp<?>
getProp(Atom[] atomPath)
Gets the property from a path of atoms.GProp<?>
getProp(Atom[] atomPath, int count)
Gets the property from a path of atoms.<GP extends IGProp<?>>
GPgetProp(Atom atom, java.lang.Class<GP> clazz)
Gets the property with theatom
name and checking the class instance of the property.<GP extends IGProp<?>>
GPgetProp(Atom atom, java.lang.Class<GP> clazz, boolean logError)
Gets the property with theatom
name and checking the class instance of the property.GProp<?>
getProp(java.lang.String name)
Gets the property with the specified name.<GP extends IGProp<?>>
GPgetProp(java.lang.String name, java.lang.Class<GP> clazz)
Gets the property with the specified name and checking the class instance of the property.<GP extends IGProp<?>>
GPgetProp(java.lang.String name, java.lang.Class<GP> clazz, boolean logError)
Gets the property with the specified name and checking the class instance of the property.PropCnr
getPropCnr()
Gets the property container instance.int
getPropCount()
Gets the count of properties in the container.int
getPropIndex(Atom atom)
Gets the index of an atom in this container.int
getPropIndex(IGProp<?> property)
Gets the index of this property in this container.Atom[]
getPropIndexes()
Gets the indexes of all properties along with the atom names.GProp<?>[]
getProps()
Gets the current value set as a a property array,null
for an uninitialized value.<GP> GP[]
getProps(java.lang.Class<GP> clazz)
Gets the properties of a certain class, i.e.java.lang.Object
getPropValue(int index)
Gets the value of the property by theindex
.java.lang.Object
getPropValue(Atom atom)
Gets the value of the property by theatom
name.<VALUE> VALUE
getPropValue(Atom atom, java.lang.Class<VALUE> clazz)
Gets the value of the property by theatom
name.<VALUE> VALUE
getPropValue(Atom atom, java.lang.Class<VALUE> clazz, boolean logError)
Gets the value of the property by theatom
name.java.lang.Object
getPropValue(java.lang.String name)
Gets the value of the property by thename
.<VALUE> VALUE
getPropValue(java.lang.String name, java.lang.Class<VALUE> clazz)
Gets the value of the property by thename
.<VALUE> VALUE
getPropValue(java.lang.String name, java.lang.Class<VALUE> clazz, boolean logError)
Gets the value of the property by thename
.java.lang.String
getString(Atom atom)
Gets a string property from this property container.java.lang.String
getString(Atom atom, java.lang.String defaultValue)
Gets a string property from this property container.java.lang.String
getString(java.lang.String name)
Gets a string property from this property container.java.lang.String
getString(java.lang.String name, java.lang.String defaultValue)
Gets a string property from this property container.boolean
hasFocus()
Returns if the component currently has focus.boolean
initializeExtendsFramework(GEvent triggerEvent)
Initializes the extends framework for this container.boolean
insertProp(IGProp<?> property, int index)
Inserts a new property to this container at the specified index.boolean
insertProp2(IGProp<?> property, int index)
Convenience method to inserts a new property to this container at the specified index.boolean
isChild(IGProp<?> prop)
Checks if the property parameter is a child property in this container property.boolean
isExtendsOverriden(Atom atom)
Checks if a property name is overridden in this container when using the Extends Framework.boolean
isExtendsRoot()
Checks if this container is an Extends Root container, i.e.boolean
isPropAddRemoveAllowed(PropMgr propertyManager)
For property containers that are index-based, the creator of the container is the only one who is allowed to add/remove properties.boolean
isPropExtended(IGProp<?> property)
Checks if a property is extended from another or if it is a child to this container.boolean
isSibling(IGProp<?> prop)
Checks if the property parameter is a sibling property in this container property.boolean
removeAllProps()
Removes all properties from this container.boolean
removeAllProps2()
Removes all properties from this container.boolean
removeProp(int index)
Removes a property from this container with the specified index.boolean
removeProp(Atom atom)
Removes a property from this container with the specified atom.boolean
removeProp(Atom atom, IGProp<?> trigger)
Removes a property from this container with the specified atom.boolean
removeProp(IGProp<?> property)
Removes a property from this container.boolean
removeProp(IGProp<?> property, IGProp<?> trigger)
Removes a property from this container.boolean
removeProp(java.lang.String name)
Removes a property from this container with the specified name.boolean
removeProp(java.lang.String name, IGProp<?> trigger)
Removes a property from this container with the specified name.boolean
removeProp2(int index)
Removes a property from this container with the specified index.boolean
removeProp2(Atom atom)
Convenience method to remove a property from this container with the specified atom.boolean
removeProp2(Atom atom, IGProp<?> trigger)
Convenience method to remove a property from this container with the specified atom.boolean
removeProp2(IGProp<?> property)
Convenience method to remove a property from this container.boolean
removeProp2(IGProp<?> property, IGProp<?> trigger)
Convenience method to remove a property from this container.boolean
removeProp2(java.lang.String name)
Convenience method to remove a property from this container with the specified name.boolean
removeProp2(java.lang.String name, IGProp<?> trigger)
Convenience method to remove a property from this container with the specified name.boolean
reorderProps(Atom[] atoms)
Reorders the properties according to the array.java.lang.String
requestFocus(IGProp<?> trigger, boolean isRemoteInduced)
Requests focus to this component.boolean
requestFocusEx(IGProp<?> trigger, boolean isRemoteInduced)
Requests focus to this component.boolean
setBool(Atom atom, boolean value)
Sets a boolean property with the specified atom to thevalue
in this property container.boolean
setBool(Atom atom, boolean value, boolean logError)
Sets a boolean property with the specified atom to thevalue
in this property container.boolean
setBool(Atom atom, boolean value, boolean logError, IGProp<?> trigger)
Sets a boolean property with the specified atom to thevalue
in this property container.boolean
setBool(java.lang.String name, boolean value)
Sets a boolean property with the specified name to thevalue
in this property container.boolean
setExtendsName(java.lang.String newName)
Sets the extends property name.boolean
setExtendsOverride(Atom atom, boolean on)
Sets a property name as overridden in this container using extendsFrom another container.boolean
setInt(Atom atom, int value)
Sets an integer property with the specified atom to thevalue
in this property container.boolean
setInt(Atom atom, int value, boolean logError)
Sets an integer property with the specified atom to thevalue
in this property container.boolean
setInt(java.lang.String name, int value)
Sets an integer property with the specified name to thevalue
in this property container.boolean
setLong(Atom atom, long value)
Sets a long property with the specified atom to thevalue
in this property container.boolean
setLong(Atom atom, long value, boolean logError)
Sets an integer property with the specified atom to thevalue
in this property container.boolean
setLong(Atom atom, long value, boolean logError, IGProp<?> trigger)
Sets an integer property with the specified atom to thevalue
in this property container.boolean
setLong(java.lang.String name, long value)
Sets a long property with the specified name to thevalue
in this property container.boolean
setNumber(Atom atom, double value)
Sets a Number property with the specified atom to thevalue
in this property container.boolean
setNumber(Atom atom, double value, boolean logError)
Sets an integer property with the specified atom to thevalue
in this property container.boolean
setNumber(Atom atom, double value, boolean logError, IGProp<?> trigger)
Sets an integer property with the specified atom to thevalue
in this property container.boolean
setNumber(java.lang.String name, double value)
Sets an integer property with the specified name to thevalue
in this property container.boolean
setProp(IGProp<?> property)
Sets a property to this container.boolean
setProp(IGProp<?> property, int index)
Adds a new property to this container at the indicated index.boolean
setProp(IGProp<?> property, IGProp<?> trigger)
Sets a property to this container.boolean
setProp2(IGProp<?> property)
Convenience method to set a property to this container.boolean
setProp2(IGProp<?> property, IGProp<?> trigger)
Convenience method to set a property to this container.boolean
setPropValue(int index, java.lang.Object newValue)
Sets the property atindex
tonewValue
.boolean
setPropValue(Atom atom, java.lang.Object newValue)
Sets the property with theatom
name tonewValue
.<VALUE> boolean
setPropValue(Atom atom, VALUE value, java.lang.Class<? extends GProp<VALUE>> propClass)
Sets a property value in the container.boolean
setPropValue(GProp<?>[] newProps)
Sets a new properties array as the value.boolean
setPropValue(java.lang.String name, java.lang.Object newValue)
Sets the property with thename
tonewValue
.<VALUE> boolean
setPropValue(java.lang.String name, VALUE value, java.lang.Class<? extends GProp<VALUE>> propClass)
Sets a property value in the container.boolean
setString(Atom atom, java.lang.String value)
Sets a string property with the specified atom to thevalue
in this property container.boolean
setString(Atom atom, java.lang.String value, boolean logError)
Sets a string property with the specified atom to thevalue
in this property container.boolean
setString(Atom atom, java.lang.String value, boolean logError, IGProp<?> trigger)
Sets a string property with the specified atom to thevalue
in this property container.boolean
setString(java.lang.String name, java.lang.String value)
Sets a string property with the specified name to thevalue
in this property container.boolean
usePropHashMap()
Checks if a hash map is used for looking up properties by name/atom for fast access.boolean
usesPropIndex()
Checks if index is relevant for this container, e.g.boolean
validateClassInstances(boolean doPerform, GProp<?>[] props, boolean isMove)
Validates the target property container classes for paste/move with additional instance testing, extra check when the possible children are verified.Methods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getReferences, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPropTreeInitialized, onRemoteEvent, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, verify, verifyHasPropertyItem, warning, warning, warning
Method Detail
getPropCnr
PropCnr getPropCnr()
Gets the property container instance.- Returns:
- The PropCnr instance.
usesPropIndex
boolean usesPropIndex()
Checks if index is relevant for this container, e.g. to keep the Z-ordering of components.- Returns:
- true if index is used, false for non-index based container.
enablePropCommunication
boolean enablePropCommunication(boolean on)
Enables communication of this container. When communicating mode is turned on, adding and removing, as well as renaming properties causes the affected properties to be queued up in a later transaction update of the remote party. This requires quite some overhead in memory and processing, so this mode is only used when required.- Parameters:
on
- flag to turn enable or disable communication mode.- Returns:
- true if successful, false otherwise.
isPropAddRemoveAllowed
boolean isPropAddRemoveAllowed(PropMgr propertyManager)
For property containers that are index-based, the creator of the container is the only one who is allowed to add/remove properties. A PropertyException is otherwise thrown. This method checks if a call to add/remove is allowed.- Parameters:
propertyManager
- The property manager.- Returns:
- true if the property container is not using index-based ordering of its properties, or the property container is created at the same side (i.e. server created and server is calling this function or client created and client is calling this function), false otherwise.
enablePropHashMap
boolean enablePropHashMap()
Enables usage of string hash map to property for fast access. This is generally only required when the container contains many properties. This is a once-in-a-lifetime call and can only be done when the container is empty. It is recommended to call this method in the constructor(s) or the properties extending this container class.- Returns:
- true for success (if the name table was allocated and defined), false for failure, i.e. existing properties are already defined.
usePropHashMap
boolean usePropHashMap()
Checks if a hash map is used for looking up properties by name/atom for fast access.- Returns:
- true if enabled, false if disabled or not yet set.
isPropExtended
boolean isPropExtended(IGProp<?> property)
Checks if a property is extended from another or if it is a child to this container.- Parameters:
property
- The property to verify.- Returns:
- true if it is extended, false otherwise.
setPropValue
boolean setPropValue(GProp<?>[] newProps) throws PropException
Sets a new properties array as the value. If any listener is present and the value has changed compare to the last value, the listener is informed with aPropValueEvent
. Note: The eventPropCnrEvent
is not fired.- Parameters:
newProps
- the new array.- Returns:
- boolean true for value has changed, false when at least one value couldn't be set.
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
setPropValue
boolean setPropValue(Atom atom, java.lang.Object newValue) throws PropException
Sets the property with theatom
name tonewValue
.- Parameters:
atom
- the property atom.newValue
- the new value to set for the property- Returns:
- boolean true for value has changed, false for same value as current value for the property.
- Throws:
PropException
- when the new value doesn't validate correctly or the property with specifiedname
is not found.
setPropValue
boolean setPropValue(java.lang.String name, java.lang.Object newValue) throws PropException
Sets the property with thename
tonewValue
.- Parameters:
name
- the name of the properties.newValue
- the new value to set for the property- Returns:
- boolean true for value has changed, false for same value as current value for the property.
- Throws:
PropException
- when the new value doesn't validate correctly or the property with specifiedname
is not found.
setPropValue
boolean setPropValue(int index, java.lang.Object newValue) throws PropException
Sets the property atindex
tonewValue
.- Parameters:
index
- the index in the properties array.newValue
- the new value to set for the property- Returns:
- boolean true for value has changed, false for same value as current value for the property.
- Throws:
PropException
- when the new value doesn't validate correctly.
getPropCount
int getPropCount()
Gets the count of properties in the container.- Returns:
- int the array element count.
containsProp
boolean containsProp(java.lang.String name)
Checks for presence of the property in the container.- Parameters:
name
- The property name.- Returns:
- true if property is present in the container, false otherwise.
containsProp
boolean containsProp(Atom atom)
Checks for presence of the property in the container.- Parameters:
atom
- The property atom.- Returns:
- true if property is present in the container, false otherwise.
getProps
GProp<?>[] getProps()
Gets the current value set as a a property array,null
for an uninitialized value.- Returns:
- GProp [] the array of properties in the container or
null
for an uninitialized array.
getProps
<GP> GP[] getProps(java.lang.Class<GP> clazz)
Gets the properties of a certain class, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Type Parameters:
GP
- The property class requested.- Parameters:
clazz
- The property classes to retrieve.- Returns:
- An array of items of the requested type. The result must be cast, e.g.
StringProp [] strings=(StringProp [])cnr.getProps(StringProp.class);
getAllProps
<GP> int getAllProps(java.lang.Class<GP> clazz, java.util.List<GP> list)
Gets the properties of a certain class that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Type Parameters:
GP
- The property class requested.- Parameters:
clazz
- The property classes to retrieve.list
- The list that is filled with the properties found of the specified class.- Returns:
- The count of properties found.
getAllProps
int getAllProps(java.lang.Class<?>[] classes, java.util.List<GProp<?>> list)
Gets the properties of certain classes that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Parameters:
classes
- The array of property classes to retrieve.list
- The list that is filled with the properties found of the specified class.- Returns:
- The count of properties found.
getAllProps
<GP> int getAllProps(java.lang.Class<GP> clazz, java.util.List<GP> list, boolean includeErrors)
Gets the properties of a certain class that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Type Parameters:
GP
- The property class requested.- Parameters:
clazz
- The property classes to retrieve.list
- The list that is filled with the properties found of the specified class.includeErrors
- Flag to include properties containing errors.- Returns:
- The count of properties found.
getAllProps
int getAllProps(java.lang.Class<?>[] classes, java.util.List<GProp<?>> list, boolean includeErrors)
Gets the properties of certain classes that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Parameters:
classes
- The array property classes to retrieve.list
- The list that is filled with the properties found of the specified class.includeErrors
- Flag to include properties containing errors.- Returns:
- The count of properties found.
getAllProps
<GP> GP[] getAllProps(java.lang.Class<GP> clazz)
Gets the properties of a certain class that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Type Parameters:
GP
- The property class requested.- Parameters:
clazz
- The property classes to retrieve.- Returns:
- The count of properties found.
getAllProps
GProp<?>[] getAllProps(java.lang.Class<? extends GProp<?>>... classes)
Gets the properties of certain classes that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Parameters:
classes
- The list or array of property classes to retrieve.- Returns:
- The array of properties found.
getAllProps
<GP> GP[] getAllProps(java.lang.Class<GP> clazz, boolean includeErrors)
Gets the properties of a certain class that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Type Parameters:
GP
- The property class requested.- Parameters:
clazz
- The property classes to retrieve.includeErrors
- Flag to include properties containing errors.- Returns:
- The array of properties found.
getAllProps
GProp<?>[] getAllProps(java.lang.Class<?>[] classes, boolean includeErrors)
Gets the properties of certain classes that are present in the tree below this container, i.e. they must be instance from the specified class, e.g. an interface or a super (or the same) class. Not not use this method "too much" as there are some memory allocation overhead with garbage collection associated.- Parameters:
classes
- The array of property classes to retrieve.includeErrors
- Flag to include properties containing errors.- Returns:
- The array of properties found.
getProp
GProp<?> getProp(java.lang.String name)
Gets the property with the specified name. If the atom name for this property is not set, aNullPointerException
may occur.- Parameters:
name
- the name of the property to locate in this property container.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found.
getProp
<GP extends IGProp<?>> GP getProp(java.lang.String name, java.lang.Class<GP> clazz)
Gets the property with the specified name and checking the class instance of the property. An error message is logged if the class is not matching. If the atom name for this property is not set, aNullPointerException
may occur.- Type Parameters:
GP
- The property class requested.- Parameters:
name
- the name of the property to locate in this property container.clazz
- the class the property must be or extend, null for no checking.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found, or the class type is not an instance of the specified class.
getProp
<GP extends IGProp<?>> GP getProp(java.lang.String name, java.lang.Class<GP> clazz, boolean logError)
Gets the property with the specified name and checking the class instance of the property. An error message may be logged if the class is not matching. If the atom name for this property is not set, aNullPointerException
may occur.- Type Parameters:
GP
- The property class requested.- Parameters:
name
- the name of the property to locate in this property container.clazz
- the class the property must be or extend, null for no checking.logError
- logs an error message if the property is of a different type.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found, or the class type is not an instance of the specified class.
getProp
GProp<?> getProp(Atom atom)
Gets the property with theatom
name.- Parameters:
atom
- the atom of the property to locate in this property container.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found.
getProp
<GP extends IGProp<?>> GP getProp(Atom atom, java.lang.Class<GP> clazz)
Gets the property with theatom
name and checking the class instance of the property. An error message is logged if the class is not matching.- Type Parameters:
GP
- The property class requested.- Parameters:
atom
- the atom of the property to locate in this property container.clazz
- the class the property must be or extend, null for no checking.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found, or the class type is not an instance of the specified class.
getProp
<GP extends IGProp<?>> GP getProp(Atom atom, java.lang.Class<GP> clazz, boolean logError)
Gets the property with theatom
name and checking the class instance of the property.- Type Parameters:
GP
- The property class requested.- Parameters:
atom
- the atom of the property to locate in this property container.clazz
- the class the property must be or extend, null for no checking.logError
- logs an error message if the property is of a different type.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found, or the class type is not an instance of the specified class.
getProp
GProp<?> getProp(Atom[] atomPath)
Gets the property from a path of atoms.- Parameters:
atomPath
- Path of atoms.- Returns:
- The property, or null if not found.
getProp
GProp<?> getProp(Atom[] atomPath, int count)
Gets the property from a path of atoms.- Parameters:
atomPath
- Path of atoms.count
- Count of atoms to process.- Returns:
- The property, or null if not found.
getFirstProp
GProp<?> getFirstProp(java.lang.String name)
Finds the first property with the specified name in the property tree. The search order is a match in the immediate children of this property container. Then all children property containers are searched recursively with the same mechanism as described here.- Parameters:
name
- The name of the property to locate in the tree.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found.
getFirstProp
GProp<?> getFirstProp(Atom atom)
Finds the first property with the specified atom in the property tree. The search order is a match in the immediate children of this property container. Then all children property containers are searched recursively with the same mechanism as described here.- Parameters:
atom
- The atom of the property to locate in the tree.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified atom is not found.
getProp
GProp<?> getProp(int index)
Gets the property at requestedindex
.- Parameters:
index
- the index of the property in the array.- Returns:
- GProp the property at request index.
- Throws:
java.lang.IndexOutOfBoundsException
- If the index is invalid.
getProp
<GP extends IGProp<?>> GP getProp(int index, java.lang.Class<GP> clazz)
Gets the property at requestedindex
. An error message is logged if the class is not matching.- Parameters:
index
- the index of the property in the array.clazz
- the class the property must be or extend, null for no checking.- Returns:
- GProp the property or
null
if the class type is not an instance of the specified class. - Throws:
java.lang.IndexOutOfBoundsException
- If the index is invalid.
getProp
<GP extends IGProp<?>> GP getProp(int index, java.lang.Class<GP> clazz, boolean logError)
Gets the property at requestedindex
. An error message is logged if the class is not matching depending on thelogError
flag.- Parameters:
index
- the index of the property in the array.clazz
- the class the property must be or extend, null for no checking.logError
- logs an error message if the property is of a different type.- Returns:
- GProp the property or
null
if the class type is not an instance of the specified class.
getPropValue
java.lang.Object getPropValue(Atom atom)
Gets the value of the property by theatom
name.- Parameters:
atom
- the atom of the property to locate in the array.- Returns:
- Object the property or
null
for uninitialized container or the property with specified name is not found.
getPropValue
<VALUE> VALUE getPropValue(Atom atom, java.lang.Class<VALUE> clazz)
Gets the value of the property by theatom
name. An error is logged if the value is not of specified class.- Type Parameters:
VALUE
- The value class of the property requested.- Parameters:
atom
- the atom of the property to locate in the array.clazz
- the class the property must be or extend, null for no checking.- Returns:
- Object the property or
null
for uninitialized container or the property with specified name is not found.
getPropValue
<VALUE> VALUE getPropValue(Atom atom, java.lang.Class<VALUE> clazz, boolean logError)
Gets the value of the property by theatom
name.- Type Parameters:
VALUE
- The value class of the property requested.- Parameters:
atom
- the atom of the property to locate in the array.clazz
- the class the property must be or extend, null for no checking.logError
- logs an error message if the property is of a different type.- Returns:
- Object the property or
null
for uninitialized container or the property with specified name is not found.
getPropValue
java.lang.Object getPropValue(java.lang.String name)
Gets the value of the property by thename
.- Parameters:
name
- the name of the property to locate in the array.- Returns:
- Object the property or
null
for uninitialized container or the property with specified name is not found.
getPropValue
<VALUE> VALUE getPropValue(java.lang.String name, java.lang.Class<VALUE> clazz)
Gets the value of the property by thename
. An error is logged if the value is not of specified class.- Type Parameters:
VALUE
- The value class of the property requested.- Parameters:
name
- The name of the property to locate in the array.clazz
- The class the property must be or extend, null for no checking.- Returns:
- Object The property or
null
for uninitialized container or the property with specified name is not found.
getPropValue
<VALUE> VALUE getPropValue(java.lang.String name, java.lang.Class<VALUE> clazz, boolean logError)
Gets the value of the property by thename
.- Type Parameters:
VALUE
- The value class of the property requested.- Parameters:
name
- the name of the property to locate in the array.clazz
- the class the property must be or extend, null for no checking.logError
- logs an error message if the property is of a different type.- Returns:
- Object the property or
null
for uninitialized container or the property with specified name is not found.
setPropValue
<VALUE> boolean setPropValue(java.lang.String name, VALUE value, java.lang.Class<? extends GProp<VALUE>> propClass)
Sets a property value in the container.- Type Parameters:
VALUE
- The value class of the property requested.- Parameters:
name
- The name of the property.value
- The value to set, null to remove the property.propClass
- The property class.- Returns:
- true if value was changed, false for no changes.
- Throws:
java.lang.InternalError
- If the property could not be removed or set due to errors.
setPropValue
<VALUE> boolean setPropValue(Atom atom, VALUE value, java.lang.Class<? extends GProp<VALUE>> propClass)
Sets a property value in the container.- Type Parameters:
VALUE
- The value class of the property requested.- Parameters:
atom
- The atom name of the property.value
- The value to set, null to remove the property.propClass
- The property class.- Returns:
- true if value was changed, false for no changes.
- Throws:
java.lang.InternalError
- If the property could not be removed or set due to errors.
getPropValue
java.lang.Object getPropValue(int index)
Gets the value of the property by theindex
.- Parameters:
index
- the index of the property in the array.- Returns:
- Object the property or
null
for uninitialized container or the property with specified name is not found.
getPropIndex
int getPropIndex(IGProp<?> property)
Gets the index of this property in this container.- Parameters:
property
- The property who's index is to be located.- Returns:
- int, the index of this property, -1 if not found.
getPropIndex
int getPropIndex(Atom atom)
Gets the index of an atom in this container.- Parameters:
atom
- The atom to look-up.- Returns:
- int, the index of the atom, -1 if not found.
createUniqueAtom
Atom createUniqueAtom(java.lang.String baseName)
Creates an atom with the base name specified with a unique serial number (starting with one) appended, making this atom unique within this property container. This function is mainly used for indexed property containers.- Parameters:
baseName
- The base name for the property. A numeric value is appended to the name to make it unique.- Returns:
- Atom, an atom with the
baseName
requested, appended with a numeric value, making this atom unique within this property container.
createUniqueAtom
Atom createUniqueAtom(Atom name, java.lang.String first, java.lang.String next, java.lang.String next2)
Creates an atom with the base name specified with a unique serial number (starting with one) appended, making this atom unique within this property container. This function is mainly used for indexed property containers.- Parameters:
name
- The name of the property.first
- The first appended string, e.g. "Copy of ".next
- The next appended string, e.g. "Copy ". The next and next2 are used to append string, e.g. "Copy 2 of NNN".next2
- The next #2 appended string, e.g. " of ".- Returns:
- Atom, an atom with the
baseName
requested, appended with a numeric value, making this atom unique within this property container.
createCopyOfAtom
Atom createCopyOfAtom(Atom name)
Creates a "Copy of NNN" or "Copy 2 of NNN" of an atom. If the atom name is not present, that atom is returned.- Parameters:
name
- Input name.- Returns:
- An atom unique in this container, based on the input name, or if the input atom is not present in the container, the same atom is returned.
setProp
boolean setProp(IGProp<?> property) throws PropException
Sets a property to this container. If the property doesn't exist, it is added at the end. If it exists and is of the same instance, the value in the existing property is set from the new one being set or "put". If the property exists but is of another instance, a PropertyException is thrown.- Parameters:
property
- Property to set.- Returns:
- true if the property was added or set successfully, false otherwise (also means no change!).
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
setProp
boolean setProp(IGProp<?> property, IGProp<?> trigger) throws PropException
Sets a property to this container. If the property doesn't exist, it is added at the end. If it exists and is of the same instance, the value in the existing property is set from the new one being set or "put". If the property exists but is of another instance, a PropertyException is thrown.- Parameters:
property
- Property to set.trigger
- The trigger, or null for none.- Returns:
- true if the property was added or set successfully, false otherwise (also means no change!).
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
setProp2
boolean setProp2(IGProp<?> property)
Convenience method to set a property to this container. If the property doesn't exist, it is added at the end. If it exists and is of the same instance, the value in the existing property is set from the new one being set or "put". If the property exists but is of another instance, anInternalError
is thrown.- Parameters:
property
- Property to set.- Returns:
- true if the property was added or set successfully, false otherwise (also means no change!).
setProp2
boolean setProp2(IGProp<?> property, IGProp<?> trigger)
Convenience method to set a property to this container. If the property doesn't exist, it is added at the end. If it exists and is of the same instance, the value in the existing property is set from the new one being set or "put". If the property exists but is of another instance, anInternalError
is thrown.- Parameters:
property
- Property to set.trigger
- The trigger, or null for none.- Returns:
- true if the property was added or set successfully, false otherwise (also means no change!).
addProp
boolean addProp(IGProp<?> property) throws PropException
Adds a new property to this container at the end.- Parameters:
property
- the property to insert.- Returns:
- true, always, because property is added.
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
addProp
boolean addProp(IGProp<?> property, IGProp<?> trigger) throws PropException
Adds a new property to this container at the end.- Parameters:
property
- the property to insert.trigger
- The trigger, or null for none.- Returns:
- true, always, because property is added.
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
addProp2
boolean addProp2(IGProp<?> property)
Adds a new property to this container at the end.This method doesn't throw a PropException, but InternalError. It is intended to be used when the property can be added without exception, e.g. in a new container.
- Parameters:
property
- the property to insert.- Returns:
- true, always, because property is added.
addProp2
boolean addProp2(IGProp<?> property, IGProp<?> trigger)
Adds a new property to this container at the end.This method doesn't throw a PropException, but InternalError. It is intended to be used when the property can be added without exception, e.g. in a new container.
- Parameters:
property
- the property to insert.trigger
- The trigger, or null for none.- Returns:
- true, always, because property is added.
setProp
boolean setProp(IGProp<?> property, int index) throws PropException
Adds a new property to this container at the indicated index. If the property already exists, the property is replaced. If it did not existed before, it is created.- Parameters:
property
- the property to set.index
- the index to use if property is inserted.- Returns:
- true if the update was successful.
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
insertProp
boolean insertProp(IGProp<?> property, int index) throws PropException
Inserts a new property to this container at the specified index.- Parameters:
property
- the property to insert.index
- index where to insert the property.- Returns:
- true, always, because property is added.
- Throws:
PropException
- when the property has a duplicate property name or if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
insertProp2
boolean insertProp2(IGProp<?> property, int index)
Convenience method to inserts a new property to this container at the specified index.- Parameters:
property
- the property to insert.index
- index where to insert the property.- Returns:
- true, always, because property is added.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(IGProp<?> property) throws PropException
Removes a property from this container.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
property
- the property to remove.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(IGProp<?> property, IGProp<?> trigger) throws PropException
Removes a property from this container.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
property
- The property to remove.trigger
- The trigger property, null for none.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(IGProp<?> property)
Convenience method to remove a property from this container.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
property
- The property to remove.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(IGProp<?> property, IGProp<?> trigger)
Convenience method to remove a property from this container.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
property
- The property to remove.trigger
- The trigger property, null for none.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(java.lang.String name) throws PropException
Removes a property from this container with the specified name.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
name
- The name of the property to remove.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(java.lang.String name, IGProp<?> trigger) throws PropException
Removes a property from this container with the specified name.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
name
- The name of the property to remove.trigger
- The trigger property, null for none.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(java.lang.String name)
Convenience method to remove a property from this container with the specified name.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
name
- The name of the property to remove.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(java.lang.String name, IGProp<?> trigger)
Convenience method to remove a property from this container with the specified name.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
name
- The name of the property to remove.trigger
- The trigger property, null for none.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(Atom atom) throws PropException
Removes a property from this container with the specified atom.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
atom
- The atom of the property to remove.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(Atom atom, IGProp<?> trigger) throws PropException
Removes a property from this container with the specified atom.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
atom
- The atom of the property to remove.trigger
- The trigger property, null for none.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(Atom atom)
Convenience method to remove a property from this container with the specified atom.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
atom
- The atom of the property to remove.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(Atom atom, IGProp<?> trigger)
Convenience method to remove a property from this container with the specified atom.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
atom
- The atom of the property to remove.trigger
- The trigger property, null for none.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp
boolean removeProp(int index) throws PropException
Removes a property from this container with the specified index.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
index
- the index of the property to remove.- Returns:
- true for success, false for failure.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeProp2
boolean removeProp2(int index)
Removes a property from this container with the specified index.Note: removing a property automatically disposes of it, so there is no need to call
dispose()
on it.- Parameters:
index
- the index of the property to remove.- Returns:
- true for success, false for failure.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeAllProps
boolean removeAllProps() throws PropException
Removes all properties from this container.Note: removing properties automatically disposes of them, so there is no need to call
dispose()
on them.- Returns:
- true for changed, false for no change.
- Throws:
PropException
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
removeAllProps2
boolean removeAllProps2()
Removes all properties from this container.Note: removing properties automatically disposes of them, so there is no need to call
dispose()
on them.- Returns:
- true for changed, false for no change.
- Throws:
java.lang.InternalError
- if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
getPropIndexes
Atom[] getPropIndexes()
Gets the indexes of all properties along with the atom names. This array can be used for reordering purposes.- Returns:
- The array of atoms.
reorderProps
boolean reorderProps(Atom[] atoms) throws PropException
Reorders the properties according to the array.- Parameters:
atoms
- The array of the properties atoms.- Returns:
- true for change, false for no change.
- Throws:
PropException
- When the atoms does not correspond to the properties.
getFocusEngine
IFocusEngine getFocusEngine(IFocusComp comp)
Locates the focus engine instance for the specified component.- Parameters:
comp
- The component requesting the focus engine.- Returns:
- The focus engine instance, or null if not found.
canRequestFocus
default java.lang.String canRequestFocus()
Returns if this component can receive focus. Focus capable components may override to returnnull
for success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusComp
interface, "Not virtualized" if the component is not in a virtualized state, ornull
otherwise.- Returns:
null
focus is possible to this component, or an error message describing why focus cannot be requested.
canRequestFocus
default java.lang.String canRequestFocus(boolean ignoreStates)
Returns if this component can receive focus. Focus capable components may override to returnnull
for success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusComp
interface, "Not virtualized" if the component is not in a virtualized state, ornull
otherwise.- Parameters:
ignoreStates
- Flag indicating that the visible and enables states should be ignored. If this flag is false and the component hidden or disabled an error message is returned.- Returns:
null
focus is possible to this component, or an error message describing why focus cannot be requested.
canRequestFocus
java.lang.String canRequestFocus(boolean ignoreVisibleFlag, boolean ignoreEnabledFlag)
Returns if this component can receive focus. Focus capable components may override to returnnull
for success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusComp
interface, "Not virtualized" if the component is not in a virtualized state, ornull
otherwise.- Parameters:
ignoreVisibleFlag
- Flag indicating that the visible state should be ignored. If this flag is false and the component hidden an error message is returned.ignoreEnabledFlag
- Flag indicating that the enabled state should be ignored. If this flag is false and the component hidden an error message is returned.- Returns:
null
focus is possible to this component, or an error message describing why focus cannot be requested.
couldRequestFocusIfVirtualized
default java.lang.String couldRequestFocusIfVirtualized()
Returns if this component could receive focus if it would be virtualized. Focus capable components may override to returnnull
for success, or other error message.Calling this method is the same as calling
couldRequestFocusIfVirtualized(false, false)
.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusComp
interface ornull
otherwise.- Returns:
null
focus is possible to this component, or an error message describing why focus cannot be requested.
couldRequestFocusIfVirtualized
default java.lang.String couldRequestFocusIfVirtualized(boolean ignoreStates)
Returns if this component could receive focus if it would be virtualized. Focus capable components may override to returnnull
for success, or other error message.Calling this method is the same as calling
couldRequestFocusIfVirtualized(ignoreStates, ignoreStates)
.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusComp
interface ornull
otherwise.- Parameters:
ignoreStates
- Flag indicating that the visible and enables states should be ignored. If this flag is false and the component hidden or disabled an error message is returned.- Returns:
null
focus is possible to this component, or an error message describing why focus cannot be requested.
couldRequestFocusIfVirtualized
java.lang.String couldRequestFocusIfVirtualized(boolean ignoreVisibleFlag, boolean ignoreEnabledFlag)
Returns if this component could receive focus if it would be virtualized. Focus capable components may override to returnnull
for success, or other error message.Default processing is to return "Component not focusable" if the component doesn't implement the
IFocusComp
interface ornull
otherwise.- Parameters:
ignoreVisibleFlag
- Flag indicating that the visible state should be ignored. If this flag is false and the component hidden an error message is returned.ignoreEnabledFlag
- Flag indicating that the enabled state should be ignored. If this flag is false and the component hidden an error message is returned.- Returns:
null
focus is possible to this component, or an error message describing why focus cannot be requested.
requestFocus
java.lang.String requestFocus(IGProp<?> trigger, boolean isRemoteInduced)
Requests focus to this component. This call is redirected to the focus engine for the component type. The engine may veto the focus change, because it currently cannot change focus, or the request is not or cannot be virtualized.This method is less precise than
requestFocusEx(IGProp, boolean)
, but avoids try-catching.This method is implemented in
PropCnr
, but should only be called forIFocusComp
implementing property classes. This method will return "Component not focusable" if called on a non-focus component.- Parameters:
trigger
- The trigger property, null for none.isRemoteInduced
- Flag for remote induced focus.- Returns:
null
for success, otherwise an error message indicating why focus was not able to be changed.
requestFocusEx
boolean requestFocusEx(IGProp<?> trigger, boolean isRemoteInduced) throws FocusException
Requests focus to this component. This call is redirected to the focus engine for the component type. The engine may veto the focus change, because it currently cannot change focus, or the request is not or cannot be virtualized.This method is implemented in
PropCnr
, but should only be called forIFocusComp
implementing property classes. This method will throwFocusException
with message "Component not focusable" if called on a non-focus component.- Parameters:
trigger
- The trigger property, null for none.isRemoteInduced
- Flag for remote induced focus.- Returns:
- true if focus was changed, false otherwise.
- Throws:
FocusException
- If focus could not be changed.
hasFocus
boolean hasFocus()
Returns if the component currently has focus.- Returns:
- true if this component has focus, false otherwise.
getString
java.lang.String getString(java.lang.String name)
Gets a string property from this property container.- Parameters:
name
- The name of the property.- Returns:
- String, the requested property string or null if not found or not initialized.
getString
java.lang.String getString(java.lang.String name, java.lang.String defaultValue)
Gets a string property from this property container.- Parameters:
name
- The name of the property.defaultValue
- The default value if not found (can be null).- Returns:
- String, the requested property string or the default if not found or not initialized.
getString
java.lang.String getString(Atom atom)
Gets a string property from this property container.- Parameters:
atom
- The atom of the property.- Returns:
- String, the requested property string or null if not found or not initialized.
getString
java.lang.String getString(Atom atom, java.lang.String defaultValue)
Gets a string property from this property container.- Parameters:
atom
- The atom of the property.defaultValue
- The default value if not found (can be null) .- Returns:
- String, the requested property string or null if not found or not initialized.
setString
boolean setString(Atom atom, java.lang.String value)
Sets a string property with the specified atom to thevalue
in this property container.If the string property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
atom
- The atom of the property.value
- The string value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setString
boolean setString(java.lang.String name, java.lang.String value)
Sets a string property with the specified name to thevalue
in this property container.If the string property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
name
- The name of the property.value
- The string value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setString
boolean setString(Atom atom, java.lang.String value, boolean logError)
Sets a string property with the specified atom to thevalue
in this property container.If the string property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The string value.logError
- Flag indicating if a warning event should be logged for failures.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setString
boolean setString(Atom atom, java.lang.String value, boolean logError, IGProp<?> trigger)
Sets a string property with the specified atom to thevalue
in this property container.If the string property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The string value.logError
- Flag indicating if a warning event should be logged for failures.trigger
- The trigger property, null for none.- Returns:
- true when this property container has been changed, false otherwise (or for error).
getInt
int getInt(java.lang.String name)
Gets an integer property from this property container.- Parameters:
name
- The name of the property.- Returns:
- int, the requested property integer or zero if not found or not initialized.
getInt
int getInt(java.lang.String name, int defaultValue)
Gets an integer property from this property container.- Parameters:
name
- The name of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- int, the requested property integer or
defaultValue
if not found or not initialized.
getInt
int getInt(Atom atom)
Gets an integer property from this property container.- Parameters:
atom
- The atom of the property.- Returns:
- int, the requested property integer or zero if not found or not initialized.
getInt
int getInt(Atom atom, int defaultValue)
Gets an integer property from this property container.- Parameters:
atom
- The atom of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- int, the requested property integer or
defaultValue
if not found or not initialized.
setInt
boolean setInt(Atom atom, int value)
Sets an integer property with the specified atom to thevalue
in this property container.If the integer property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
atom
- The atom of the property.value
- The integer value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setInt
boolean setInt(java.lang.String name, int value)
Sets an integer property with the specified name to thevalue
in this property container.If the integer property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
name
- The name of the property.value
- The integer value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setInt
boolean setInt(Atom atom, int value, boolean logError)
Sets an integer property with the specified atom to thevalue
in this property container.If the integer property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The integer value.logError
- Flag indicating if a warning event should be logged for failures.- Returns:
- true when this property container has been changed, false otherwise (or for error).
getLong
long getLong(java.lang.String name)
Gets a long property from this property container.- Parameters:
name
- The name of the property.- Returns:
- long, the requested property long or zero if not found or not initialized.
getLong
long getLong(java.lang.String name, long defaultValue)
Gets a long property from this property container.- Parameters:
name
- The name of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- long, the requested property long or
defaultValue
if not found or not initialized.
getLong
long getLong(Atom atom)
Gets a long property from this property container.- Parameters:
atom
- The atom of the property.- Returns:
- long, the requested property long or zero if not found or not initialized.
getLong
long getLong(Atom atom, long defaultValue)
Gets a long property from this property container.- Parameters:
atom
- The atom of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- long, the requested property long or
defaultValue
if not found or not initialized.
setLong
boolean setLong(Atom atom, long value)
Sets a long property with the specified atom to thevalue
in this property container.If the long property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
atom
- The atom of the property.value
- The long value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setLong
boolean setLong(java.lang.String name, long value)
Sets a long property with the specified name to thevalue
in this property container.If the long property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
name
- The name of the property.value
- The long value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setLong
boolean setLong(Atom atom, long value, boolean logError)
Sets an integer property with the specified atom to thevalue
in this property container.If the integer property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The integer value.logError
- Flag indicating if a warning event should be logged for failures.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setLong
boolean setLong(Atom atom, long value, boolean logError, IGProp<?> trigger)
Sets an integer property with the specified atom to thevalue
in this property container.If the integer property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The integer value.logError
- Flag indicating if a warning event should be logged for failures.trigger
- The trigger property, or null for none.- Returns:
- true when this property container has been changed, false otherwise (or for error).
getNumber
double getNumber(java.lang.String name)
Gets a Number property from this property container.- Parameters:
name
- The name of the property.- Returns:
- double, the requested property number or zero if not found or not initialized.
getNumber
double getNumber(java.lang.String name, double defaultValue)
Gets a Number property from this property container.- Parameters:
name
- The name of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- double, the requested property number or
defaultValue
if not found or not initialized.
getNumber
double getNumber(Atom atom)
Gets a Number property from this property container.- Parameters:
atom
- The atom of the property.- Returns:
- double, the requested property number or zero if not found or not initialized.
getNumber
double getNumber(Atom atom, double defaultValue)
Gets a Number property from this property container.- Parameters:
atom
- The atom of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- double, the requested property number or
defaultValue
if not found or not initialized.
setNumber
boolean setNumber(Atom atom, double value)
Sets a Number property with the specified atom to thevalue
in this property container.If the Number property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
atom
- The atom of the property.value
- The Number value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setNumber
boolean setNumber(java.lang.String name, double value)
Sets an integer property with the specified name to thevalue
in this property container.If the Number property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
name
- The name of the property.value
- The Number value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setNumber
boolean setNumber(Atom atom, double value, boolean logError)
Sets an integer property with the specified atom to thevalue
in this property container.If the Number property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The Number value.logError
- Flag indicating if a warning event should be logged for failures.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setNumber
boolean setNumber(Atom atom, double value, boolean logError, IGProp<?> trigger)
Sets an integer property with the specified atom to thevalue
in this property container.If the Number property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The Number value.logError
- Flag indicating if a warning event should be logged for failures.trigger
- The trigger property, null for none.- Returns:
- true when this property container has been changed, false otherwise (or for error).
getBool
boolean getBool(java.lang.String name)
Gets a boolean property from this property container.- Parameters:
name
- The name of the property.- Returns:
- boolean, the requested property boolean or
defaultValue
if not found or not initialized.
getBool
boolean getBool(java.lang.String name, boolean defaultValue)
Gets a boolean property from this property container.- Parameters:
name
- The name of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- boolean, the requested property boolean or
defaultValue
if not found or not initialized.
getBool
boolean getBool(Atom atom)
Gets a boolean property from this property container.- Parameters:
atom
- The atom of the property.- Returns:
- boolean, the requested property boolean or
defaultValue
if not found or not initialized.
getBool
boolean getBool(Atom atom, boolean defaultValue)
Gets a boolean property from this property container.- Parameters:
atom
- The atom of the property.defaultValue
- The default value to return when the property is not found or initialized.- Returns:
- boolean, the requested property boolean or
defaultValue
if not found or not initialized.
setBool
boolean setBool(Atom atom, boolean value)
Sets a boolean property with the specified atom to thevalue
in this property container.If the boolean property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
atom
- The atom of the property.value
- The boolean value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setBool
boolean setBool(java.lang.String name, boolean value)
Sets a boolean property with the specified name to thevalue
in this property container.If the boolean property doesn't exist, it is created and added to this property container.
If the property cannot be set, an warning message is logged.
- Parameters:
name
- The name of the property.value
- The boolean value.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setBool
boolean setBool(Atom atom, boolean value, boolean logError)
Sets a boolean property with the specified atom to thevalue
in this property container.If the boolean property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The boolean value.logError
- Flag indicating if a warning event should be logged for failures.- Returns:
- true when this property container has been changed, false otherwise (or for error).
setBool
boolean setBool(Atom atom, boolean value, boolean logError, IGProp<?> trigger)
Sets a boolean property with the specified atom to thevalue
in this property container.If the boolean property doesn't exist, it is created and added to this property container.
- Parameters:
atom
- The atom of the property.value
- The boolean value.logError
- Flag indicating if a warning event should be logged for failures.trigger
- The trigger property or null for none.- Returns:
- true when this property container has been changed, false otherwise (or for error).
getErrorsProp
ErrorsProp getErrorsProp(boolean createIfNotPresent)
Gets the errors property. If it's not present it may be created. An InternalError is thrown if the property is created by couldn't be added.- Parameters:
createIfNotPresent
- Set to true to create the property if it's not present.- Returns:
- null if the errors property doesn't exist.
getChildPropErrorSeverity
int getChildPropErrorSeverity(Atom atom)
Gets the error severity of a child property. This call makes it possible to check if the property is missing.- Parameters:
atom
- The atom name of the child property.- Returns:
- -1 for none, otherwise IPropErrorItem.INFO=0, WARNING=1, ERROR=2.
getChildPropErrorSeverity
int getChildPropErrorSeverity(java.lang.String name)
Gets the error severity of a child property. This call makes it possible to check if the property is missing.- Parameters:
name
- The name of the child property.- Returns:
- -1 for none, otherwise IPropErrorItem.INFO=0, WARNING=1, ERROR=2.
getChildPropError
IPropErrorItem getChildPropError(Atom atom)
Gets the child property default error ID. This call makes it possible to get an error for a property that does not exist and the error is stored in this parent instead.- Parameters:
atom
- The atom name of the child property.- Returns:
- The error item property, or null for no error.
getChildPropError
IPropErrorItem getChildPropError(java.lang.String name)
Gets the child property default error ID. This call makes it possible to get an error for a property that does not exist and the error is stored in this parent instead.- Parameters:
name
- The name of the child property.- Returns:
- The error item property, or null for no error.
isChild
boolean isChild(IGProp<?> prop)
Checks if the property parameter is a child property in this container property.- Parameters:
prop
- The property.- Returns:
- true if property is a child, false otherwise.
isSibling
boolean isSibling(IGProp<?> prop)
Checks if the property parameter is a sibling property in this container property.- Parameters:
prop
- The property.- Returns:
- true if property is a sibling, false otherwise.
getPossibleChildren
java.lang.Class<?>[] getPossibleChildren()
Gets the acceptable children property classes that can be used in conjunction with e.g. a Paste operation.- Returns:
- An array containing the classes of possible children, or null for no support.
validateClassInstances
boolean validateClassInstances(boolean doPerform, GProp<?>[] props, boolean isMove)
Validates the target property container classes for paste/move with additional instance testing, extra check when the possible children are verified.Override this method that by default returns true to provide fine-tuned testing for validity.
- Parameters:
doPerform
- The perform flag, false means just testing.props
- Properties to move or paste.isMove
- Flag for move if true, false means paste.- Returns:
- true if the class instances for move or paste are valid, false otherwise.
getExtendsPossibleClasses
java.lang.Class<?>[] getExtendsPossibleClasses()
Gets the possible classes this container supports for the Extends Framework. The default implementation is to return null.- Returns:
- List of supported classes, or null for none.
setExtendsName
boolean setExtendsName(java.lang.String newName) throws PropException
Sets the extends property name. The property name is set, but this can still result in an error (the reference is not found, or a circular reference occurred).- Parameters:
newName
- The new extends from property, null to clear.- Returns:
- Change flag, i.e. if there was a change, or false for no change or failure.
- Throws:
PropException
- If called from the Server or Client, or if this property container doesn't support the Extends Framework.
getExtendsName
java.lang.String getExtendsName()
Gets the reference property name being extended.- Returns:
- The reference name of the extended container, or null for none.
getExtendsError
java.lang.String getExtendsError()
Gets the Extends Framework error.- Returns:
- An error string with the error, or null for no error.
setExtendsOverride
boolean setExtendsOverride(Atom atom, boolean on)
Sets a property name as overridden in this container using extendsFrom another container. This effectively removes the property that is present in the extends-from-container from this container, leaving a null-reply at e.g. getProp(...).- Parameters:
atom
- The atom to override.on
- When set, adds this as being an overridden property. When cleared, removes the property from being overridden.- Returns:
- true for change, false for no change or failure.
isExtendsOverriden
boolean isExtendsOverriden(Atom atom)
Checks if a property name is overridden in this container when using the Extends Framework.- Parameters:
atom
- The atom to override.- Returns:
- true for overridden, false otherwise.
initializeExtendsFramework
boolean initializeExtendsFramework(GEvent triggerEvent) throws PropException
Initializes the extends framework for this container. It must first have been defined usingsetExtendsName
.If an exception occurs, use
getExtendsError()
to get the error message.- Parameters:
triggerEvent
- The event that triggered this reference event, null for none.- Returns:
- true if initialized, false for already initialize.
- Throws:
PropException
- An exception for initializing errors (e.g. invalid reference, invalid properties).
isExtendsRoot
boolean isExtendsRoot()
Checks if this container is an Extends Root container, i.e. one that has a defined Extends Name defined.- Returns:
- true if this container is the root of an extended container, or false for all other properties.