jaxx.runtime.validator.swing
Class SwingValidatorUtil

java.lang.Object
  extended by jaxx.runtime.validator.BeanValidatorUtil
      extended by jaxx.runtime.validator.swing.SwingValidatorUtil

public class SwingValidatorUtil
extends BeanValidatorUtil

The helper class for validation module.

Author:
chemit

Constructor Summary
protected SwingValidatorUtil()
           
 
Method Summary
static javax.swing.ImageIcon getErrorIcon()
           
static SwingValidatorMessageListMouseListener getErrorListMouseListener(javax.swing.JList list)
           
static SwingValidatorMessageTableMouseListener getErrorTableMouseListener(javax.swing.JTable table)
           
static java.lang.String getFieldName(SwingValidatorMessage model, java.lang.String value)
           
static javax.swing.ImageIcon getIcon(BeanValidatorScope scope)
           
static javax.swing.ImageIcon getInfoIcon()
           
static java.lang.String getMessage(SwingValidatorMessage model)
           
static javax.swing.ImageIcon getWarningIcon()
           
static void installUI(javax.swing.JTable errorTable, SwingValidatorMessageTableRenderer render)
          Prepare the ui where to display the validators messages.
static SwingValidatorMessageListMouseListener registerErrorListMouseListener(javax.swing.JList list)
          Register for a given validator list ui a validator mouse listener.
static SwingValidatorMessageTableMouseListener registerErrorTableMouseListener(javax.swing.JTable table)
          Register for a given validator table ui a validator mouse listener Note: there is onlt one listener registred for a givne table model, so invokin this method twice or more will have no effect.
 
Methods inherited from class jaxx.runtime.validator.BeanValidatorUtil
convert, getPropertyChangeListenerDescriptor, getSharedValueStack, setValidatorBean, setValidatorChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingValidatorUtil

protected SwingValidatorUtil()
Method Detail

getErrorIcon

public static javax.swing.ImageIcon getErrorIcon()

getInfoIcon

public static javax.swing.ImageIcon getInfoIcon()

getWarningIcon

public static javax.swing.ImageIcon getWarningIcon()

installUI

public static void installUI(javax.swing.JTable errorTable,
                             SwingValidatorMessageTableRenderer render)
Prepare the ui where to display the validators messages.

Parameters:
errorTable - the table where to display validators messages
render - renderer to use

registerErrorListMouseListener

public static SwingValidatorMessageListMouseListener registerErrorListMouseListener(javax.swing.JList list)
Register for a given validator list ui a validator mouse listener. Note: there is only one listener registred for a given list model, so invoking this method tiwce or more will have no effect.

Parameters:
list - the validation ui list
Returns:
the listener instanciate or found
See Also:
SwingValidatorMessageListMouseListener

registerErrorTableMouseListener

public static SwingValidatorMessageTableMouseListener registerErrorTableMouseListener(javax.swing.JTable table)
Register for a given validator table ui a validator mouse listener Note: there is onlt one listener registred for a givne table model, so invokin this method twice or more will have no effect.

Parameters:
table - the validator table ui
Returns:
the listener instanciate or found
See Also:
SwingValidatorMessageTableMouseListener

getErrorListMouseListener

public static SwingValidatorMessageListMouseListener getErrorListMouseListener(javax.swing.JList list)
Parameters:
list - the validator list ui
Returns:
the validator list mouse listener, or null if not found
See Also:
SwingValidatorMessageListMouseListener

getErrorTableMouseListener

public static SwingValidatorMessageTableMouseListener getErrorTableMouseListener(javax.swing.JTable table)
Parameters:
table - the validator table ui
Returns:
the validator table mouse listener, or null if not found
See Also:
SwingValidatorMessageTableMouseListener

getMessage

public static java.lang.String getMessage(SwingValidatorMessage model)

getFieldName

public static java.lang.String getFieldName(SwingValidatorMessage model,
                                            java.lang.String value)

getIcon

public static javax.swing.ImageIcon getIcon(BeanValidatorScope scope)


Copyright © 2008-2010 CodeLutin. All Rights Reserved.