Class Selector

    • Field Detail

      • EMPTY

        public static final Selector[] EMPTY
        Empty array of selectors.
    • Constructor Detail

      • Selector

        public Selector()
        Creates the Selector property container without a name. The name must be set in all cases using the setPropertyAtom call.
      • Selector

        public Selector​(Atom propertyAtom)
        Creates the Selector property container with the specified name. All system-reserved names for components begins with "$".
        propertyAtom - the name of the component, unique within it's parent.
    • Method Detail

      • clone

        public Selector clone()
        Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.
        clone in class PropCnr
      • onEventSelf

        public void onEventSelf​(GEvent event)
        Checks for expression changes to define references.
        Specified by:
        onEventSelf in interface IGProp<GProp<?>[]>
        onEventSelf in class GProp<GProp<?>[]>
        event - The property event.
      • onPropParentChanged

        protected void onPropParentChanged​(PropCnr oldParent,
                                           PropCnr newParent)
        Verify when loaded/created.
        onPropParentChanged in class GProp<GProp<?>[]>
        oldParent - The old parent (or null if none).
        newParent - The new parent (or null if none).
      • isSelected

        public boolean isSelected​(EnvProps envProps)
        Called to resolve the SelectorExpression.

        This method will return false if there are errors present in the Selector such as circular or unresolved references.

        Specified by:
        isSelected in interface ISelectorExpression
        envProps - The Client Environment properties.
        true if the Selector is selected to be used and does not contain errors, false otherwise.
      • createSelectorExpression

        protected SelectorExpression createSelectorExpression​(java.lang.String expression)
        Creates the SelectorExpression, overridden by the Designer version of the class.
        expression - The reference.
      • createClassReference

        protected ClassReference createClassReference​(Atom atom,
                                                      java.lang.String ref)
        Creates a ClassReference, overridden by the Designer version of the class.
        atom - The atom name.
        ref - The reference.
      • createSelectorReference

        protected SelectorReference createSelectorReference​(Atom atom,
                                                            java.lang.String ref)
        Creates a SelectorReference, overridden by the Designer version of the class.
        atom - The atom name.
        ref - The reference.
      • getSelectorExpression

        public SelectorExpression getSelectorExpression​(boolean doParse)
        Gets the selector expression. If the expression already has been parsed successfully, that expression instance is returned.
        doParse - Flag to return the expression parsed, with error logging.

        Note: if the expression cannot be parsed, null is returned.

        The selector expression if it defined and can be parsed, null otherwise.
      • getJavaClassInstance

        public ISelectorExpression getJavaClassInstance​(java.lang.String className)
        In Server run mode, gets the class name instance object created. If the class name is not found in the references or by resolving the class name, an error is logged.
        className - The class name.
        The instance, or null for failure.
      • onExpressionChanged

        protected void onExpressionChanged​(SelectorExpression expression)
        Called when the expression has changed.
      • getSelectorReferences

        public SelectorReference[] getSelectorReferences()
        Gets the target Selector references for this Selector.
        The target Selector references or null if not found.
      • verify

        public void verify​(PropVerification verification)
        Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
        Specified by:
        verify in interface IGProp<GProp<?>[]>
        verify in class PropCnr
        verification - The property verification class.