org.formaria.swing.helper
Class AttributeHelper

java.lang.Object
  extended by org.formaria.swing.helper.AttributeHelper

public class AttributeHelper
extends java.lang.Object

A class to provide some backward compatibility with the deprecated AttributedComponent interface

Copyright (c) Formaria Ltd., 2008
License: see http://www.formaria.org/licensing


Constructor Summary
AttributeHelper(Project project)
           
 
Method Summary
 AttributeHelper getNextHelper()
           
 int setAttribute(CalendarPanel cp)
          Set one or more attributes of the component.
protected  int setAttribute(java.lang.Object component, java.lang.Class klass)
           
 int setAttribute(java.lang.Object component, java.lang.String attribName, java.lang.Object attribValue)
           
 int setAttribute(Slider slider)
          Set one or more attributes of the component.
 void setNextHelper(AttributeHelper nextHelper)
           
protected  int superSetAttribute(java.lang.Object component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeHelper

public AttributeHelper(Project project)
Method Detail

setAttribute

public int setAttribute(java.lang.Object component,
                        java.lang.String attribName,
                        java.lang.Object attribValue)

superSetAttribute

protected int superSetAttribute(java.lang.Object component)

setAttribute

protected int setAttribute(java.lang.Object component,
                           java.lang.Class klass)

getNextHelper

public AttributeHelper getNextHelper()
Returns:
the nextHelper

setNextHelper

public void setNextHelper(AttributeHelper nextHelper)
Parameters:
nextHelper - the nextHelper to set

setAttribute

public int setAttribute(Slider slider)
Set one or more attributes of the component.
  1. min, value=the minimum field value
  2. max, value=the maximum field value
  3. step, value=the field step size

Returns:
0 for success, non zero otherwise

setAttribute

public int setAttribute(CalendarPanel cp)
Set one or more attributes of the component. Currently this handles the attributes
  1. view (month|day) or
  2. format, value=the date format
  3. style, value=the default style
  4. selectedStyle, value=the selected date's style
  5. weekendStyle, value=the weekend date style
  6. highlightStyle, value=the rollover/highlighted date style
  7. headerStyle, value=the header style
  8. threeDStyle, value=the 3d element style
  9. daynames, value=true to show the day names
  10. header, value=true to show the date navigation headers

Returns:
0 for success, non zero otherwise