net.sf.doolin.gui.validation
Class ValidationComponentUtils

java.lang.Object
  extended by net.sf.doolin.gui.validation.ValidationComponentUtils

public class ValidationComponentUtils
extends Object

Utilities for the validation of components.

Author:
Damien Coraboeuf

Method Summary
static GUIValidation getAssociatedResult(JComponent comp, Map<Object,GUIValidation> keyMap)
          Gets GUIValidation object associated with a component.
static Object[] getMessageKeys(JComponent comp)
          Gets the field keys for a component
static void setMessageKey(JComponent component, Object messageKey)
          Sets the field key on a component
static void setMessageKeys(JComponent comp, Object[] messageKeys)
          Sets a list of field keys on a component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setMessageKey

public static void setMessageKey(JComponent component,
                                 Object messageKey)
Sets the field key on a component

Parameters:
component - Component to set
messageKey - Field key to set

setMessageKeys

public static void setMessageKeys(JComponent comp,
                                  Object[] messageKeys)
Sets a list of field keys on a component

Parameters:
comp - Component to set
messageKeys - Keys to set

getMessageKeys

public static Object[] getMessageKeys(JComponent comp)
Gets the field keys for a component

Parameters:
comp - Component
Returns:
Field keys or null if none is defined

getAssociatedResult

public static GUIValidation getAssociatedResult(JComponent comp,
                                                Map<Object,GUIValidation> keyMap)
Gets GUIValidation object associated with a component.

Parameters:
comp - Component
keyMap - Cache for the component validation messages, indexed by field key
Returns:
Validation result for this component (may be null)


Copyright © 2011. All Rights Reserved.