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 ImageIcon getErrorIcon()
           
static SwingValidatorMessageListMouseListener getErrorListMouseListener(JList list)
           
static SwingValidatorMessageTableMouseListener getErrorTableMouseListener(JTable table)
           
static String getFieldName(SwingValidatorMessage model, String value)
           
static ImageIcon getIcon(BeanValidatorScope scope)
           
static ImageIcon getInfoIcon()
           
static String getMessage(SwingValidatorMessage model)
           
static ImageIcon getWarningIcon()
           
static void installUI(JTable errorTable, SwingValidatorMessageTableRenderer render)
          Prepare the ui where to display the validators messages.
static SwingValidatorMessageListMouseListener registerErrorListMouseListener(JList list)
          Register for a given validator list ui a validator mouse listener.
static SwingValidatorMessageTableMouseListener registerErrorTableMouseListener(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 ImageIcon getErrorIcon()

getInfoIcon

public static ImageIcon getInfoIcon()

getWarningIcon

public static ImageIcon getWarningIcon()

installUI

public static void installUI(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(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(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(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(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 String getMessage(SwingValidatorMessage model)

getFieldName

public static String getFieldName(SwingValidatorMessage model,
                                  String value)

getIcon

public static ImageIcon getIcon(BeanValidatorScope scope)


Copyright © 2008-2010 CodeLutin. All Rights Reserved.