Class Adaptation

java.lang.Object
adaptlil.adaptations.Adaptation
Direct Known Subclasses:
ColorAdaptation, DeemphasisAdaptation, HighlightingAdaptation

public abstract class Adaptation extends Object
Abstract class for Adaptations. When making an adaptation in the AdaptLIL Architecture, following this abstract class structure allows for an easier implementation with the rest of the system.
  • Field Details

    • type

      private String type
    • state

      private boolean state
    • styleConfig

      private Map<String,String> styleConfig
    • isBeingObservedByMediator

      private boolean isBeingObservedByMediator
    • score

      private double score
    • strength

      private double strength
    • hasFlipped

      private boolean hasFlipped
  • Constructor Details

    • Adaptation

      public Adaptation(String type, boolean state, Map<String,String> styleConfig, double strength)
      Parameters:
      type -
      state -
      styleConfig - A map containing CSS style name and it's corresponding string value.
      strength -
  • Method Details

    • setBeingObservedByMediator

      public void setBeingObservedByMediator(boolean beingObservedByMediator)
      Used by mediator to flag that the Adaptation is currently selected and under observation for changes
      Parameters:
      beingObservedByMediator -
    • flipDirection

      public void flipDirection()
    • applyStyleChange

      public abstract void applyStyleChange(double stepAmount)
      Applies style change as specified by the stepAmount
      Parameters:
      stepAmount -
    • setType

      public void setType(String type)
    • setState

      public void setState(boolean state)
    • setScore

      public void setScore(double score)
    • getScore

      public double getScore()
    • getDefaultStyleConfig

      public abstract Map<String,String> getDefaultStyleConfig()
    • isBeingObservedByMediator

      public boolean isBeingObservedByMediator()
      Returns:
    • getType

      public String getType()
    • isState

      public boolean isState()
    • getStyleConfig

      public Map<String,String> getStyleConfig()
    • getStrength

      public double getStrength()
    • setStrength

      public void setStrength(double strength)
    • hasFlipped

      public boolean hasFlipped()