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 "$".
        Parameters:
        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.
        Overrides:
        clone in class PropCnr
      • onEventSelf

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

        protected void onPropParentChanged​(PropCnr oldParent,
                                           PropCnr newParent)
        Verify when loaded/created.
        Overrides:
        onPropParentChanged in class GProp<GProp<?>[]>
        Parameters:
        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
        Parameters:
        envProps - The Client Environment properties.
        Returns:
        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.
        Parameters:
        expression - The reference.
      • createClassReference

        protected ClassReference createClassReference​(Atom atom,
                                                      java.lang.String ref)
        Creates a ClassReference, overridden by the Designer version of the class.
        Parameters:
        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.
        Parameters:
        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.
        Parameters:
        doParse - Flag to return the expression parsed, with error logging.

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

        Returns:
        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.
        Parameters:
        className - The class name.
        Returns:
        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.
        Returns:
        The target Selector references or null if not found.
      • verify

        public boolean 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<?>[]>
        Overrides:
        verify in class PropCnr
        Parameters:
        verification - The property verification class.
        Returns:
        true if verification should proceed, false if disposed of and verification should not take place.