Class InstrumentImpl<T extends WidgetBinding<? extends Command>>

    • Field Detail

      • activated

        protected boolean activated
        Defines whether the instrument is activated.
      • modified

        protected boolean modified
        Defined whether the instrument has been modified.
      • disposables

        protected final Set<io.reactivex.disposables.Disposable> disposables
      • configured

        protected boolean configured
    • Constructor Detail

      • InstrumentImpl

        public InstrumentImpl()
        Creates and initialises the instrument.
    • Method Detail

      • addDisposable

        protected void addDisposable​(io.reactivex.disposables.Disposable disposable)
        The instrument can store disposable objects that will be flushed on un-installation. This method stores a disposable object.
        Parameters:
        disposable - The disposable object to store. Nothing done if null.
      • configureBindings

        protected abstract void configureBindings()
        Initialises the bindings of the instrument.
      • addBinding

        public void addBinding​(T binding)
        Adds the given widget binding to the list of bindings of the instrument.
        Parameters:
        binding - The widget binding to add. If null, nothing is done.
      • clearEvents

        public void clearEvents()
        Description copied from interface: Instrument
        Stops the interactions of the instrument and clears all its events waiting for a process.
        Specified by:
        clearEvents in interface Instrument<T extends WidgetBinding<? extends Command>>
      • setActivated

        public void setActivated​(boolean toBeActivated)
        Description copied from interface: Instrument
        Activates or deactivates the instrument.
        Specified by:
        setActivated in interface Instrument<T extends WidgetBinding<? extends Command>>
        Parameters:
        toBeActivated - True = activation.
      • save

        public void save​(boolean generalPreferences,
                         String nsURI,
                         Document document,
                         Element root)
        Description copied from interface: Preferenciable
        Saves the parameters of the instrument into an XML tag.
        Specified by:
        save in interface Preferenciable
        Parameters:
        generalPreferences - True: this operation is called to save the general preferences of the interactive system. Otherwise, it is called to save a presentation in a document. This parameter is useful when different information must be saved during a presentation backup or a general preferences backup.
        nsURI - The namespace that must be added to tags corresponding to the instrument's parameters.
        document - The XML document.
        root - The root element that will contains the instrument's parameters.
      • load

        public void load​(boolean generalPreferences,
                         String nsURI,
                         Element meta)
        Description copied from interface: Preferenciable
        Loads data save in an XML document.
        Specified by:
        load in interface Preferenciable
        Parameters:
        generalPreferences - True: this operation is called to load the general preferences of the interactive system. Otherwise, it is called to load a presentation in a document. This parameter is useful when different information must be loaded during a presentation backup or a general preferences backup.
        nsURI - The namespace that must be added to tags corresponding to the instrument's parameters.
        meta - The meta data element.
      • isModified

        public boolean isModified()
        Specified by:
        isModified in interface Modifiable
        Returns:
        True: the object has been modified. False otherwise.
      • setModified

        public void setModified​(boolean isModified)
        Description copied from interface: Modifiable
        Sets the Modifiable object as modified.
        Specified by:
        setModified in interface Modifiable
        Parameters:
        isModified - True: the element is will tagged as modified.