DESY ACOP Beans Home

com.cosylab.gui.components.range2
Class RangedValueEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.cosylab.gui.components.range2.RangedValueEvent
All Implemented Interfaces:
java.io.Serializable

public class RangedValueEvent
extends java.util.EventObject

This is the event object holding the information about the change in RangedValue. This implementation notifies about changes in minimum, maximum, value or policy changes. More than one change can be carried by this event.

Version:
$id$
Author:
Ales Pucelj
See Also:
Serialized Form

Field Summary
static int MAXIMUM_CHANGED
           
static int MINIMUM_CHANGED
           
static int POLICY_CHANGED
           
static int RAW_VALUE_CHANGED
           
static int VALUE_CHANGED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RangedValueEvent(java.lang.Object source, boolean policyChanged)
          Constructor for RangedValueEvent.
RangedValueEvent(java.lang.Object source, boolean min, boolean max, boolean val, boolean raw)
          Constructor for RangedValueEvent.
 
Method Summary
 int getChange()
          Returns the change mask.
 boolean isMaximumChanged()
          Returns whether value has changed.
 boolean isMinimumChanged()
          Reuturns whether minimum has changed.
 boolean isMinMaxChanged()
          Returns whether minimum and maximum have changed.
 boolean isMinOrMaxChanged()
          Returns whether minimum or maximum have changed.
 boolean isPolicyChanged()
          Returns whether the policies have changed.
 boolean isRawValueChanged()
          Returns whether value has changed.
 boolean isValueChanged()
          Returns whether value has changed.
protected  void setBit(int bit, boolean state)
           
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_CHANGED

public static final int MINIMUM_CHANGED
See Also:
Constant Field Values

MAXIMUM_CHANGED

public static final int MAXIMUM_CHANGED
See Also:
Constant Field Values

VALUE_CHANGED

public static final int VALUE_CHANGED
See Also:
Constant Field Values

RAW_VALUE_CHANGED

public static final int RAW_VALUE_CHANGED
See Also:
Constant Field Values

POLICY_CHANGED

public static final int POLICY_CHANGED
See Also:
Constant Field Values
Constructor Detail

RangedValueEvent

public RangedValueEvent(java.lang.Object source,
                        boolean min,
                        boolean max,
                        boolean val,
                        boolean raw)
Constructor for RangedValueEvent. This constructor initializes the fields to notify of change in minimum, maximum and/or value.

Parameters:
source -
min - boolean Has minimum changed.
max - boolean Has maximum changed.
val - boolean Has value changed.

RangedValueEvent

public RangedValueEvent(java.lang.Object source,
                        boolean policyChanged)
Constructor for RangedValueEvent. This constructor initializes the fields to notify of change in policies.

Parameters:
source - Object
policyAdded - boolean True if policy added, false if removed.
Method Detail

setBit

protected final void setBit(int bit,
                            boolean state)
Parameters:
bit - int
state - boolean

isMinimumChanged

public final boolean isMinimumChanged()
Reuturns whether minimum has changed.

Returns:
boolean

isMaximumChanged

public final boolean isMaximumChanged()
Returns whether value has changed.

Returns:
boolean

isValueChanged

public final boolean isValueChanged()
Returns whether value has changed.

Returns:
boolean

isRawValueChanged

public final boolean isRawValueChanged()
Returns whether value has changed.

Returns:
boolean

isMinMaxChanged

public final boolean isMinMaxChanged()
Returns whether minimum and maximum have changed.

Returns:
boolean

isMinOrMaxChanged

public final boolean isMinOrMaxChanged()
Returns whether minimum or maximum have changed.

Returns:
boolean

isPolicyChanged

public final boolean isPolicyChanged()
Returns whether the policies have changed.

Returns:
boolean

getChange

public final int getChange()
Returns the change mask. This value can be then checked agains the constants defined by this event to determine which changes have occured.

Returns:
int


Copyright © 2010. All Rights Reserved.