org.das2.beans
Class AccessLevelBeanInfo

java.lang.Object
  extended by java.beans.SimpleBeanInfo
      extended by org.das2.beans.AccessLevelBeanInfo
All Implemented Interfaces:
java.beans.BeanInfo
Direct Known Subclasses:
AttachedLabelBeanInfo, ColumnColumnConnectorBeanInfo, CrossHairRendererBeanInfo, DasApplicationBeanInfo, DasAxisBeanInfo, DasCanvasBeanInfo, DasCanvasComponentBeanInfo, DasColorBarBeanInfo, DasColumnBeanInfo, DasLabelAxisBeanInfo, DasMouseInputAdapterBeanInfo, DasPlotBeanInfo, DasRowBeanInfo, DasServerBeanInfo, DataPointRecorderBeanInfo, DataSetDescriptorBeanInfo, FormButtonBeanInfo, FormCheckBoxBeanInfo, FormChoiceBeanInfo, FormListBeanInfo, FormPanelBeanInfo, FormRadioButtonBeanInfo, FormRadioButtonGroupBeanInfo, FormTabBeanInfo, FormTextBeanInfo, FormTextFieldBeanInfo, FormWindowBeanInfo, ImplicitAccessLevelBeanInfo, LabelDragRendererBeanInfo, MouseModuleBeanInfo, RendererBeanInfo, RowRowConnectorBeanInfo, SpectrogramRendererBeanInfo, StackedHistogramRendererBeanInfo, StreamDataSetDescriptorBeanInfo, SymbolLineRendererBeanInfo, TickCurveRendererBeanInfo

public abstract class AccessLevelBeanInfo
extends java.beans.SimpleBeanInfo

This class is designed to implement access levels for bean properties. The system property "edu.uiowa.physics.das.beans.AccessLevelBeanInfo.AccessLevel" will determine the access level of the bean. The access levels that are currently supported are "ALL" and "END_USER". The access level must be set prior to this class being loaded.


Nested Class Summary
static class AccessLevelBeanInfo.AccessLevel
          Type-safe enumeration class used to specify access levels for bean properties.
static class AccessLevelBeanInfo.PersistenceLevel
          this level indicates what persistence is allowed.
protected static class AccessLevelBeanInfo.Property
          AccessLevelBeanInfo.Property is a helper class for subclasses of AccessLevelBeanInfo to specify a list of properties in a way that is independant of the underlying Bean/PropertyDescriptor implementation.
 
Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
protected AccessLevelBeanInfo(AccessLevelBeanInfo.Property[] properties, java.lang.Class beanClass)
          Creates and instance of AccessLevelBeanInfo.
 
Method Summary
static AccessLevelBeanInfo.AccessLevel getAccessLevel()
          Returns the access level for AccessLevelBeanInfo objects.
 java.beans.BeanDescriptor getBeanDescriptor()
           
static java.lang.Object getLock()
           
 AccessLevelBeanInfo.Property getProperty(java.beans.PropertyDescriptor pd)
           
 java.beans.PropertyDescriptor[] getPropertyDescriptors()
           
 java.beans.PropertyDescriptor[] getPropertyDescriptors(AccessLevelBeanInfo.PersistenceLevel persistenceLevel)
          convenient method that only returns the descriptors for the specified persistence level.
static void setAccessLevel(AccessLevelBeanInfo.AccessLevel level)
          Sets the access level for AccessLevelBeanInfo objects.
 
Methods inherited from class java.beans.SimpleBeanInfo
getAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, loadImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessLevelBeanInfo

protected AccessLevelBeanInfo(AccessLevelBeanInfo.Property[] properties,
                              java.lang.Class beanClass)
Creates and instance of AccessLevelBeanInfo. Each element of the properties array must be of the type Object[] with the following format: { propertyName, accessorMethod, mutatorMethod, accessLevel} where the elements have the following meaning.

Method Detail

getAccessLevel

public static AccessLevelBeanInfo.AccessLevel getAccessLevel()
Returns the access level for AccessLevelBeanInfo objects.


setAccessLevel

public static void setAccessLevel(AccessLevelBeanInfo.AccessLevel level)
Sets the access level for AccessLevelBeanInfo objects.


getLock

public static java.lang.Object getLock()

getPropertyDescriptors

public java.beans.PropertyDescriptor[] getPropertyDescriptors(AccessLevelBeanInfo.PersistenceLevel persistenceLevel)
convenient method that only returns the descriptors for the specified persistence level. Also implements the property inheritance.


getPropertyDescriptors

public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface java.beans.BeanInfo
Overrides:
getPropertyDescriptors in class java.beans.SimpleBeanInfo

getProperty

public AccessLevelBeanInfo.Property getProperty(java.beans.PropertyDescriptor pd)

getBeanDescriptor

public java.beans.BeanDescriptor getBeanDescriptor()
Specified by:
getBeanDescriptor in interface java.beans.BeanInfo
Overrides:
getBeanDescriptor in class java.beans.SimpleBeanInfo