Interface IPropCnr

All Superinterfaces:
IGProp<GProp<?>[]>
All Known Subinterfaces:
IActionActorSettings, IAddUICompProvider<UICOMP>, IChartContainer, 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, IReferencingPropCnr, IReferrerParticipant, ISelectorOwner, IServerApplicationSetupPropCnr, IShowJavaSource, ITransferContainerProps, IUIAction, IUIActionHolder, IUIAnimatedSingleIndexedSelectionComp, IUIBooleanSelectionComp, IUIBuilderFromVSLinkEnabler, IUICellSelectionComp, IUICheck2Component, IUICheckComponent, IUIComp, IUIComponentLinkEnabler, IUICompRelativeTarget, 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, Flash, 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, NativeSetting, 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, 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
  • Method Details

    • 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 a PropValueEvent. Note: The event PropCnrEvent 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, Object newValue) throws PropException
      Sets the property with the atom name to newValue.
      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 specified name is not found.
    • setPropValue

      boolean setPropValue(String name, Object newValue) throws PropException
      Sets the property with the name to newValue.
      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 specified name is not found.
    • setPropValue

      boolean setPropValue(int index, Object newValue) throws PropException
      Sets the property at index to newValue.
      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(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(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(Class<GP> clazz, 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(Class<?>[] classes, 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(Class<GP> clazz, 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(Class<?>[] classes, 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(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(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(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(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(String name)
      Gets the property with the specified name. If the atom name for this property is not set, a NullPointerException 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(String name, 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, a NullPointerException 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(String name, 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, a NullPointerException 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 the atom 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, Class<GP> clazz)
      Gets the property with the atom 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, Class<GP> clazz, boolean logError)
      Gets the property with the atom 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(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 requested index.
      Parameters:
      index - the index of the property in the array.
      Returns:
      GProp the property at request index.
      Throws:
      IndexOutOfBoundsException - If the index is invalid.
    • getProp

      <GP extends IGProp<?>> GP getProp(int index, Class<GP> clazz)
      Gets the property at requested index. 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:
      IndexOutOfBoundsException - If the index is invalid.
    • getProp

      <GP extends IGProp<?>> GP getProp(int index, Class<GP> clazz, boolean logError)
      Gets the property at requested index. An error message is logged if the class is not matching depending on the logError 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

      Object getPropValue(Atom atom)
      Gets the value of the property by the atom 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, Class<VALUE> clazz)
      Gets the value of the property by the atom 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, Class<VALUE> clazz, boolean logError)
      Gets the value of the property by the atom 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

      Object getPropValue(String name)
      Gets the value of the property by the name.
      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(String name, Class<VALUE> clazz)
      Gets the value of the property by the name. 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(String name, Class<VALUE> clazz, boolean logError)
      Gets the value of the property by the name.
      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(String name, VALUE value, 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:
      InternalError - If the property could not be removed or set due to errors.
    • setPropValue

      <VALUE> boolean setPropValue(Atom atom, VALUE value, 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:
      InternalError - If the property could not be removed or set due to errors.
    • getPropValue

      Object getPropValue(int index)
      Gets the value of the property by the index.
      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(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, String first, String next, 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, an InternalError 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, an InternalError 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:
      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:
      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:
      InternalError - if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
    • removeProp

      boolean removeProp(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(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(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:
      InternalError - if structural changes in containers is prohibited due to creation-ship of container and who is requesting the structural change.
    • removeProp2

      boolean removeProp2(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:
      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:
      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:
      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:
      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:
      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 String canRequestFocus()
      Returns if this component can receive focus. Focus capable components may override to return null 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, or null otherwise.

      Returns:
      null focus is possible to this component, or an error message describing why focus cannot be requested.
    • canRequestFocus

      default String canRequestFocus(boolean ignoreStates)
      Returns if this component can receive focus. Focus capable components may override to return null 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, or null 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

      String canRequestFocus(boolean ignoreVisibleFlag, boolean ignoreEnabledFlag)
      Returns if this component can receive focus. Focus capable components may override to return null 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, or null 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 String couldRequestFocusIfVirtualized()
      Returns if this component could receive focus if it would be virtualized. Focus capable components may override to return null 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 or null otherwise.

      Returns:
      null focus is possible to this component, or an error message describing why focus cannot be requested.
    • couldRequestFocusIfVirtualized

      default String couldRequestFocusIfVirtualized(boolean ignoreStates)
      Returns if this component could receive focus if it would be virtualized. Focus capable components may override to return null 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 or null 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

      String couldRequestFocusIfVirtualized(boolean ignoreVisibleFlag, boolean ignoreEnabledFlag)
      Returns if this component could receive focus if it would be virtualized. Focus capable components may override to return null for success, or other error message.

      Default processing is to return "Component not focusable" if the component doesn't implement the IFocusComp interface or null 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

      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 for IFocusComp 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 for IFocusComp implementing property classes. This method will throw FocusException 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

      String getString(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

      String getString(String name, 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

      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

      String getString(Atom atom, 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, String value)
      Sets a string property with the specified atom to the value 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(String name, String value)
      Sets a string property with the specified name to the value 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, String value, boolean logError)
      Sets a string property with the specified atom to the value 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, String value, boolean logError, IGProp<?> trigger)
      Sets a string property with the specified atom to the value 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(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(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 the value 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(String name, int value)
      Sets an integer property with the specified name to the value 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 the value 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(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(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 the value 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(String name, long value)
      Sets a long property with the specified name to the value 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 the value 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 the value 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(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(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 the value 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(String name, double value)
      Sets an integer property with the specified name to the value 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 the value 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 the value 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(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(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 the value 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(String name, boolean value)
      Sets a boolean property with the specified name to the value 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 the value 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 the value 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(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(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

      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

      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(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

      String getExtendsName()
      Gets the reference property name being extended.
      Returns:
      The reference name of the extended container, or null for none.
    • getExtendsError

      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 using setExtendsName.

      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.