DESY ACOP Beans Home

com.cosylab.gui.displayers
Interface PatternDisplayer

All Superinterfaces:
CommonDisplayer, DataConsumer, DataStateProvider, Displayer, PatternConsumer, PopupManageable

public interface PatternDisplayer
extends Displayer, PatternConsumer

A specialization of Displayer interface for patterns. A pattern is Java primitive long type that is interpreted in its binary form as a bit-pattern. In order to distinguish significant and insignificant bits, a bit-mask known as resolution is used. The total number of bits set to 1 in the bitmask determine the number of bits this displayer has to render. In order to render these bits properly, the adapter delivers the following data items:

Version:
$id$
Author:
Igor Kriznar

Field Summary
 
Fields inherited from interface com.cosylab.gui.displayers.Displayer
C_EDITABLE, DATA_SOURCE
 
Fields inherited from interface com.cosylab.gui.displayers.CommonDisplayer
C_BIT_DESCRIPTIONS, C_BIT_MASK, C_COLOR, C_CONDITION_WHEN_CLEARED, C_CONDITION_WHEN_SET, C_DESCRIPTION, C_DISPLAY_NAME, C_FORMAT, C_GRAPH_MAX, C_GRAPH_MIN, C_MAXIMUM, C_MIN_STEP, C_MINIMUM, C_POSITION, C_PROPERTY_TYPE, C_SEQUENCE_LENGTH, C_UNITS
 
Fields inherited from interface com.cosylab.gui.displayers.DataStateProvider
DATA_STATE
 
Method Summary
 java.lang.String[] getBitDescriptions()
          Returns an array of Strings, equal in length to the total number of significant bits, determined in the resolution.
 java.util.BitSet getBitMask()
          Returns the resolution bit mask determining which bits in the value are significant.
 BitCondition[] getConditionWhenCleared()
          Returns the array of Condition objects that carry information on how each significant bit should be rendered when its value is 0.
 BitCondition[] getConditionWhenSet()
          Returns an array of Condition objects that carry information on how each significant bit should be rendered when its value is 1.
 java.lang.String getFormat()
          Returns the C-style format specification used when the long bit field must be output to string format.
 java.util.BitSet getValue()
          Returns the value currently displayed by the displayer.
 void setBitDescriptions(java.lang.String[] value)
          Sets the array of descriptions to be used by the displayer.
 void setBitMask(java.util.BitSet value)
          Sets the bit-mask for this displayer.
 void setConditionWhenCleared(BitCondition[] value)
          Sets the rendering hints for the cleared bits.
 void setConditionWhenSet(BitCondition[] value)
          Sets the array of rendering hitns for set bits.
 void setFormat(java.lang.String value)
          Sets the format specification used by this displayer to render its value into one string.
 void setValue(java.util.BitSet value)
          Sets the value to be displayed by the displayer.
 
Methods inherited from interface com.cosylab.gui.displayers.Displayer
getDataSource, getTitle, isEditable, setDataSource, setTitle
 
Methods inherited from interface com.cosylab.gui.displayers.CommonDisplayer
cleanup, isSuspended, resume, suspend
 
Methods inherited from interface com.cosylab.gui.components.util.PopupManageable
getPopupManager
 
Methods inherited from interface com.cosylab.gui.displayers.DataStateProvider
addPropertyChangeListener, addPropertyChangeListener, getDataState, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface com.cosylab.gui.displayers.PatternConsumer
updateValue
 
Methods inherited from interface com.cosylab.gui.displayers.DataConsumer
getDataConsumer, getDefaultDataConsumer, getName, getSupportedCharacteristics, getSupportedConsumerTypes, setCharacteristics, updateDataState
 

Method Detail

getValue

java.util.BitSet getValue()
Returns the value currently displayed by the displayer. The value is interpreted as a bit-field.

Returns:
BitSet bit value

setValue

void setValue(java.util.BitSet value)
Sets the value to be displayed by the displayer. This method is invoked by adapter. The value is interpreted as a bit field as described in the class documentation.

Parameters:
value - the value to be displayed.

getBitDescriptions

java.lang.String[] getBitDescriptions()
Returns an array of Strings, equal in length to the total number of significant bits, determined in the resolution. For each significant bit, this array contains a (maximum) one line description.

Returns:
String[] an array of descriptions

setBitDescriptions

void setBitDescriptions(java.lang.String[] value)
Sets the array of descriptions to be used by the displayer. This method will be usually called by the adapter or user during design time.

Parameters:
value - the new array of bit descriptions
See Also:
getBitDescriptions()

getConditionWhenCleared

BitCondition[] getConditionWhenCleared()
Returns the array of Condition objects that carry information on how each significant bit should be rendered when its value is 0.

Returns:
BitCondition[] an array of rendering hints for cleared bits

setConditionWhenCleared

void setConditionWhenCleared(BitCondition[] value)
Sets the rendering hints for the cleared bits. This method will be usually called by the adapter or during design time.

Parameters:
BitCondition[] - an array of rendering hints for cleared bits.
See Also:
getConditionWhenCleared()

getConditionWhenSet

BitCondition[] getConditionWhenSet()
Returns an array of Condition objects that carry information on how each significant bit should be rendered when its value is 1.

Returns:
Condition[] an array of rendering hints for set bits

setConditionWhenSet

void setConditionWhenSet(BitCondition[] value)
Sets the array of rendering hitns for set bits. This method will be usually called by the adapter or user during design time.

Parameters:
value - the rendering hints
See Also:
getConditionWhenSet()

getFormat

java.lang.String getFormat()
Returns the C-style format specification used when the long bit field must be output to string format.

Returns:
String C-style printf format specification

setFormat

void setFormat(java.lang.String value)
Sets the format specification used by this displayer to render its value into one string.

Parameters:
String - a new C-style format specification
See Also:
getFormat()

getBitMask

java.util.BitSet getBitMask()
Returns the resolution bit mask determining which bits in the value are significant. The total number of ones in the binary representation of the bit-mask is the number of significant bits. The value to be rendered is obtained by doing a bitwise and on the resolution and the value.

Returns:
BitSet the bit-mask for this displayer

setBitMask

void setBitMask(java.util.BitSet value)
Sets the bit-mask for this displayer.

Parameters:
BitSet - the new bit-mask for this displayer
See Also:
getBitMask()


Copyright © 2010. All Rights Reserved.