com.tensegrity.gui.component
Class AttributeEditorUtil

java.lang.Object
  extended bycom.tensegrity.gui.component.AttributeEditorUtil
Direct Known Subclasses:
SwingAttributeEditorUtil

public class AttributeEditorUtil
extends java.lang.Object

Utility class for use with AttributeEditors

Version:
$Id: AttributeEditorUtil.java,v 1.10 2006/01/05 12:34:34 BurkhardWick Exp $
Author:
BurkhardWick

Constructor Summary
protected AttributeEditorUtil()
          Constructor (should not be called)
 
Method Summary
static boolean isCustomAttribute(Attribute attribute)
          Method isCustomAttribute returns true if the given Attribute instance contains the interface CustomAttribute.
static boolean isCustomAttribute(java.lang.Class valueClass)
          Method isCustomAttribute returns true if the given Class instance contains the interface CustomAttribute.
static boolean isEditorAvailable(Attribute attribute)
          Checks, if an editor is available for the given attribute
static boolean isUndefinedEditable(java.lang.Object value)
          Returns true, if the given value (represented by a complex attribute) is editable in the undefined state.
static boolean renameCustomAttribute(AttributeSet set, Attribute attribute, java.lang.String value)
          Renames the given custom attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeEditorUtil

protected AttributeEditorUtil()
Constructor (should not be called)

Method Detail

renameCustomAttribute

public static final boolean renameCustomAttribute(AttributeSet set,
                                                  Attribute attribute,
                                                  java.lang.String value)
                                           throws AttributeException,
                                                  ConstraintViolationException
Renames the given custom attribute

Parameters:
set - The set containing the custom attribute
attribute - The custom attribute
value - The new name of the attribute
Returns:
True, if the attribute has been renamed successfully
Throws:
AttributeException - Forwarding exception from the AttributeSet calls
ConstraintViolationException - Forwarding exception from the AttributeSet calls

isCustomAttribute

public static boolean isCustomAttribute(java.lang.Class valueClass)
Method isCustomAttribute returns true if the given Class instance contains the interface CustomAttribute.

Parameters:
valueClass - the class to check
Returns:
boolean true, if getInterfaces() of valueClass contains CustomAttribute
See Also:
CustomAttribute

isCustomAttribute

public static boolean isCustomAttribute(Attribute attribute)
Method isCustomAttribute returns true if the given Attribute instance contains the interface CustomAttribute.

Parameters:
attribute - the attribute to check
Returns:
boolean true, if getInterfaces() of valueClass contains CustomAttribute
See Also:
CustomAttribute

isEditorAvailable

public static boolean isEditorAvailable(Attribute attribute)
Checks, if an editor is available for the given attribute

Parameters:
attribute - The attribute to check
Returns:
true, if an editor is available

isUndefinedEditable

public static boolean isUndefinedEditable(java.lang.Object value)
Returns true, if the given value (represented by a complex attribute) is editable in the undefined state.

Parameters:
value - The value to check
Returns:
true, if the given value (represented by a complex attribute) is editable in the undefined state.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.