org.formaria.aria.helper
Class AttributedComponentHelper

java.lang.Object
  extended by org.formaria.aria.helper.AttributedComponentHelper

public class AttributedComponentHelper
extends java.lang.Object

A helper for setting common properties

Copyright (c) Formaria Ltd., 2008

License: see license.txt


Constructor Summary
AttributedComponentHelper()
           
 
Method Summary
static int setAttribute(Project project, java.lang.Object comp, java.lang.String attribName, java.lang.Object attribValue)
          Set one or more attributes of the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributedComponentHelper

public AttributedComponentHelper()
Method Detail

setAttribute

public static int setAttribute(Project project,
                               java.lang.Object comp,
                               java.lang.String attribName,
                               java.lang.Object attribValue)
Set one or more attributes of the component.
  1. alignment, value=(Left|Right|Center|Leading|Trailing)
  2. border, value=0, to tun off the border
  3. margin, value=the size in pixels of the margin (the space between the border and the text)
  4. tooltip, value=the tooltip text
  5. format, value=integer|curreny|date|decimal or a mask for a mask format
  6. editable, value=(true|false) set the edit to being editable

Parameters:
project - the current project
attribName - the name of the attribute
attribValue - the value of the attribute
Returns:
0 for success, non zero for failure or to require some further action