Class BeanNode<T>

java.lang.Object
xal.extension.bricks.Brick
xal.extension.bricks.BeanNode<T>
All Implemented Interfaces:
DataListener
Direct Known Subclasses:
BorderNode, ViewNode

public abstract class BeanNode<T> extends Brick implements DataListener
brick which represents a Java Bean
  • Field Details

    • BEAN_DATA_LABEL

      protected static final String BEAN_DATA_LABEL
      data label from bean properties
      See Also:
    • beanObject

      protected final T beanObject
      bean object
    • beanProxy

      protected final BeanProxy<T> beanProxy
      the bean proxy
    • beanSettings

      protected final Map<String,Object> beanSettings
      bean settings
    • tag

      protected String tag
      tag for identifying this node
    • customBeanClassName

      protected String customBeanClassName
      custom bean class name
  • Constructor Details

  • Method Details

    • getBeanProxy

      public BeanProxy<T> getBeanProxy()
      Get the view proxy
      Returns:
      the view proxy
    • getPrototypeBean

      protected T getPrototypeBean(BeanProxy<T> beanProxy)
      get the bean instance
    • getBeanObject

      public T getBeanObject()
      Get the bean object
    • getBeanObjectBeanInfo

      public BeanInfo getBeanObjectBeanInfo()
      Get the bean info of the view. Get the view's bean info
    • getTag

      public String getTag()
      Get this node's tag
      Returns:
      this node's tag
    • setTag

      public void setTag(String tag)
      Set this node's tag
      Parameters:
      tag - the new tag
    • hasCustomBeanClass

      public boolean hasCustomBeanClass()
      Determine whether this node has a custom bean class
      Returns:
      true if this node has a custom bean class and false if not
    • getCustomBeanClassName

      public String getCustomBeanClassName()
      Get this node's custom bean class name
      Returns:
      this node's custom bean class name
    • setCustomBeanClassName

      public void setCustomBeanClassName(String name)
      Set this node's custom bean class name
      Parameters:
      name - the new custom bean class name
    • getClassName

      public String getClassName()
      get the fully qualified class name
      Returns:
      the custom class name if it exists or the prototype class name if there is no custom class
    • getShortClassName

      public String getShortClassName()
      get the short version of the class name
      Returns:
      the short version of the class name
    • getJythonReferenceSnippet

      public String getJythonReferenceSnippet()
      get the Jython reference snippet
    • getJavaReferenceSnippet

      public String getJavaReferenceSnippet()
      get the java reference snippet
    • getXALReferenceSnippet

      public String getXALReferenceSnippet()
      get the java reference snippet
    • getJavaDeclarationSnippet

      public String getJavaDeclarationSnippet()
      Get the java declaration snippet
      Returns:
      the java declaration snippet
    • refreshDisplay

      public void refreshDisplay()
      refresh display
    • applyBeanSettings

      protected void applyBeanSettings()
      apply the bean settings
    • getProperyDescriptorTable

      protected Map<String,PropertyDescriptor> getProperyDescriptorTable()
      Get the property descriptor table keyed by property name
    • getPropertyValue

      public Object getPropertyValue(PropertyDescriptor propertyDescriptor) throws Exception
      get the property value
      Throws:
      Exception
    • setPropertyValue

      public void setPropertyValue(PropertyDescriptor propertyDescriptor, Object value)
      update the property with the specified value
    • getViewNodeContainer

      public ViewNodeContainer getViewNodeContainer()
      Get the containing node
      Returns:
      the parent view node
    • display

      public void display()
      Display the bean's window
    • dataLabel

      public abstract String dataLabel()
      Provides the name used to identify the class in an external data source.
      Specified by:
      dataLabel in interface DataListener
      Returns:
      a tag that identifies the receiver's type
    • update

      public void update(DataAdaptor adaptor)
      Update the data based on the information provided by the data provider.
      Specified by:
      update in interface DataListener
      Parameters:
      adaptor - The adaptor from which to update the data
    • write

      public void write(DataAdaptor adaptor)
      Write data to the data adaptor for storage.
      Specified by:
      write in interface DataListener
      Parameters:
      adaptor - The adaptor to which the receiver's data is written
    • getPropertyArchiver

      public static DataListener getPropertyArchiver(String name, Object value)
      get the archiver of bean properties
    • toString

      public String toString()
      get a label
      Overrides:
      toString in class Object