Interface OpModeMgr.IRubberband

  • Enclosing class:
    OpModeMgr

    public static interface OpModeMgr.IRubberband
    Usecase: Die Applikation startet im BKR ist im Betriebsmode, der Expertenmode wird angewählt und wenig spaeter das Programm so zurückgelassen. Dies ist ein unerwartet unsicherer Zustand. Deshalb soll nach maxIdleTimeMs bei User Inaktivitaet die Applikation wieder in den Default Mode zurück geführt werden.

    DestinationMode is OpMode.Betrieb
    currentMode is OpMode.Expert
    isPossibleToEnable(), isEnabled(), isActive() are all true
    getMinRestTimeMS() is smaller than MAX_VALUE

    Einschalten lediglich setEnable(true) beim Starten der Applikation (MstFrameMain Subclass Constructor oder afterFrameCreated()). Der Rest wird automatisch erledigt
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      OpMode getDestinationMode()
      Destination OpMode of the rubberband, is at beginning the default OpMode for the user, pc, application
      int getMaxIdleTimeMS()
      Time of UI inactivity until the opMode is set to getDestinationMode()
      int getMinRestTimeMS()
      Time left until switchback, if no user activity
      int getProgress()  
      boolean isActive()
      timer is running and might switch OpMode back later
      boolean isEnabled()
      ( currentOpMode != getDestinationMode()) && isEnabled() ) <=> isOn() )
      boolean isPossibleToEnable()
      nur moeglich zu benutzen, wenn ein SessionActivityMonitor erzeugt werden kann
      OpMode setDestinationMode​(OpMode destinationMode)
      if destinationMode is not allowed, the actual setDestination Mode will be returned
      boolean setEnabled​(boolean enabled)
      !!!Dieses muss true gesetzt werden zum Nutzen dieses Features, der Rest ist automatisch
      int setMaxIdleTimeMS​(int maxIdleTime)  
    • Method Detail

      • getDestinationMode

        OpMode getDestinationMode()
        Destination OpMode of the rubberband, is at beginning the default OpMode for the user, pc, application
      • setDestinationMode

        OpMode setDestinationMode​(OpMode destinationMode)
        if destinationMode is not allowed, the actual setDestination Mode will be returned
      • getMaxIdleTimeMS

        int getMaxIdleTimeMS()
        Time of UI inactivity until the opMode is set to getDestinationMode()
      • setMaxIdleTimeMS

        int setMaxIdleTimeMS​(int maxIdleTime)
      • isPossibleToEnable

        boolean isPossibleToEnable()
        nur moeglich zu benutzen, wenn ein SessionActivityMonitor erzeugt werden kann
      • isEnabled

        boolean isEnabled()
        ( currentOpMode != getDestinationMode()) && isEnabled() ) <=> isOn() )
      • setEnabled

        boolean setEnabled​(boolean enabled)
        !!!Dieses muss true gesetzt werden zum Nutzen dieses Features, der Rest ist automatisch
        Returns:
        (enabled && isPossibleToTurnOn())
      • isActive

        boolean isActive()
        timer is running and might switch OpMode back later
      • getMinRestTimeMS

        int getMinRestTimeMS()
        Time left until switchback, if no user activity
      • getProgress

        int getProgress()
        Returns:
        0 bis 100%, 100% nur bei getDestinationMode() == getOpMode()