DESY ACOP Beans Home

com.cosylab.gui.displayers
Interface IconDisplayer

All Superinterfaces:
CommonDisplayer, DataConsumer, DataStateProvider, Displayer, LongConsumer, PopupManageable
All Known Implementing Classes:
AcopIcon, IconDisplayer

public interface IconDisplayer
extends Displayer, LongConsumer

IconDisplayer can display long values (similar to LongDisplayer) but instead of showing the number value it shows different icons for each of the received values.

Author:
Jaka Bobnar, Cosylab

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
 void addIcon(ValueIconPair pair)
          Associates icon with value.
 void addIcons(ValueIconPair[] icons)
          Associates icons with values.
 javax.swing.Icon getDefaultIcon()
          Returns the default icon.
 ValueIconPair[] getIcons()
          Returns an array of all icons that were associated with values.
 long getValue()
          Gets the value displayed by the displayer.
 void removeIcon(ValueIconPair pair)
          Removes icons.
 void removeIcons(ValueIconPair[] pairs)
          Removes icons.
 void setDefaultIcon(javax.swing.Icon icon)
          Sets the default icon for this displayer.
 void setIcons(ValueIconPair[] pairs)
          Associates icons with values.
 void setValue(long value)
          Sets the value 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.LongConsumer
updateValue
 
Methods inherited from interface com.cosylab.gui.displayers.DataConsumer
getDataConsumer, getDefaultDataConsumer, getName, getSupportedCharacteristics, getSupportedConsumerTypes, setCharacteristics, updateDataState
 

Method Detail

setValue

void setValue(long value)
Sets the value displayed by the displayer. This method may be invoked only by the adapter delivering a new value from the modeling layer.

Parameters:
value - new value to be displayed

getValue

long getValue()
Gets the value displayed by the displayer. This method can be invoked by any object and will probably most often be invoked by the GUI rendition code.

Returns:
double currently displayed value

setDefaultIcon

void setDefaultIcon(javax.swing.Icon icon)
Sets the default icon for this displayer. If there is no icon assigned to a specific value, a default icon is shown when that value arrives.

Parameters:
icon -

getDefaultIcon

javax.swing.Icon getDefaultIcon()
Returns the default icon.

Returns:

getIcons

ValueIconPair[] getIcons()
Returns an array of all icons that were associated with values.

Returns:

setIcons

void setIcons(ValueIconPair[] pairs)
Associates icons with values. This method overrides all previously loaded icons.

Parameters:
icons -

addIcons

void addIcons(ValueIconPair[] icons)
Associates icons with values. This methods adds icons to previously loded inventory and overrides only those values that were loaded before and now is a different values associated with them.

Parameters:
icons -

addIcon

void addIcon(ValueIconPair pair)
Associates icon with value. This methods adds icon to previously loded inventory.

Parameters:
icons -

removeIcon

void removeIcon(ValueIconPair pair)
Removes icons.

Parameters:
icons -

removeIcons

void removeIcons(ValueIconPair[] pairs)
Removes icons.

Parameters:
icons -


Copyright © 2010. All Rights Reserved.