Overview  Package   Class  Tree  Index 

be.lassi.domain
Class Level

java.lang.Object
  extended by be.lassi.domain.Level
Direct Known Subclasses:
TimedLevel

public class Level
extends java.lang.Object

Represents channel level value, manages any listeners that listen for level value changes.


Constructor Summary
Level()
           
 
Method Summary
 void add(LevelListener levelListener)
          Adds a level value change listener.
 boolean equals(java.lang.Object object)
          
 int getIntValue()
          Gets the integer (percentage) level value.
 float getValue()
          Gets the float level value.
 int hashCode()
          
 boolean hasListeners()
          Indicates whether there are any listeners registered to monitor level value changes.
 boolean isActive()
           
 void remove(LevelListener levelListener)
          Removes a level value change listener.
 void set(Level other)
           
 void setActive(boolean active)
           
 void setIntValue(int value)
          Set the integer (percentage) level value.
 void setValue(float newValue)
          Sets the float level value.
 void setValueWithoutUpdate(float newValue, LevelListener listener)
          Set the float level value, while notifying all level value change listeners except the one in the method parameter.
 java.lang.String string()
           
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Level

public Level()
Method Detail

add

public void add(LevelListener levelListener)
Adds a level value change listener.

Parameters:
levelListener - the level value change listener to be added

equals

public boolean equals(java.lang.Object object)

Overrides:
equals in class java.lang.Object

getIntValue

public int getIntValue()
Gets the integer (percentage) level value.

Returns:
int the integer level value 0 -> 100

getValue

public float getValue()
Gets the float level value.

Returns:
float the float level value

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

hasListeners

public boolean hasListeners()
Indicates whether there are any listeners registered to monitor level value changes.

Returns:
true if there is at least one listener

isActive

public boolean isActive()

remove

public void remove(LevelListener levelListener)
Removes a level value change listener.

Parameters:
levelListener - the level value change listener to be removed

set

public void set(Level other)

setActive

public void setActive(boolean active)

setIntValue

public void setIntValue(int value)
Set the integer (percentage) level value.

Parameters:
value - the integer level value 0 -> 100

setValue

public void setValue(float newValue)
Sets the float level value.

Parameters:
newValue - the float level value

setValueWithoutUpdate

public void setValueWithoutUpdate(float newValue,
                                  LevelListener listener)
Set the float level value, while notifying all level value change listeners except the one in the method parameter. Only sets the new level value if it is sufficiently different from the old value. Does not notify the listeners if the change is not big enough.

Parameters:
newValue - the new float level value
listener - the listener that should not be notified of the change

string

public java.lang.String string()

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2