JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.field
Class JCInvalidInfo

java.lang.Object
  |
  +--com.klg.jclass.field.JCInvalidInfo
All Implemented Interfaces:
Serializable

public class JCInvalidInfo
extends Object
implements Serializable

This class creates an object which holds the invalid info properties.

See Also:
Serialized Form

Field Summary
protected  boolean beepOnInvalid
           
static int CLEAR_FIELD
          Use with invalidPolicy to clear the field after invalid entry.
protected  Color invalidBackground
           
protected  Color invalidForeground
           
protected  int invalidPolicy
           
static int RESTORE_DEFAULT
          Use with invalidPolicy to restore default value after invalid entry.
static int RESTORE_PREVIOUS
          Use with invalidPolicy to restore previous value after invalid entry.
static int SHOW_INVALID
          Use with invalidPolicy to display invalid values.
 
Constructor Summary
JCInvalidInfo()
          Creates a default instance where beepOnInvalid == true, policy == SHOW_INVALID, and the rest of the values are null.
JCInvalidInfo(boolean beep_on_invalid, int invalid_policy)
          Creates an instance where beepOnInvalid and invalidPolicy are set as specified and the rest of the values are null.
JCInvalidInfo(boolean beep_on_invalid, int invalid_policy, Color invalid_foreground, Color invalid_background)
          Creates a InvalidInfo object with the specified defaultValue and with invalidPolicy == RESTORE_DEFAULT, beepOnInvalid == true, and the invalid colors are null.
JCInvalidInfo(Color invalid_foreground, Color invalid_background)
          Creates a InvalidInfo object with the specified invalid colors and with invalidPolicy == SHOW_INVALID, beepOnInvalid == true, and defaultValue == null.
JCInvalidInfo(int invalid_policy)
          Creates an instance where invalidPolicy is set as specified, beepOnInvalid == true, and the rest of the values are null.
 
Method Summary
 boolean getBeepOnInvalid()
          Returns whether the component should beep or not when the user types an invalid entry.
 Color getInvalidBackground()
          Returns the background color to be used if the invalid policy is SHOW_INVALID.
 Color getInvalidForeground()
          Returns the foreground color to be used if the invalid policy is SHOW_INVALID.
 int getInvalidPolicy()
          Returns the invalid policy.
 void setBeepOnInvalid(boolean beep_on_invalid)
          Sets whether the component should beep or not when the user types an invalid entry.
 void setInvalidBackground(Color background)
          Sets the background color to be used if the invalid policy is SHOW_INVALID.
 void setInvalidForeground(Color foreground)
          Sets the foreground color to be used if the invalid policy is SHOW_INVALID.
 void setInvalidPolicy(int invalid_policy)
          Sets the invalid policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHOW_INVALID

public static final int SHOW_INVALID
Use with invalidPolicy to display invalid values.

See Also:
Constant Field Values

RESTORE_DEFAULT

public static final int RESTORE_DEFAULT
Use with invalidPolicy to restore default value after invalid entry.

See Also:
Constant Field Values

RESTORE_PREVIOUS

public static final int RESTORE_PREVIOUS
Use with invalidPolicy to restore previous value after invalid entry.

See Also:
Constant Field Values

CLEAR_FIELD

public static final int CLEAR_FIELD
Use with invalidPolicy to clear the field after invalid entry.

See Also:
Constant Field Values

beepOnInvalid

protected boolean beepOnInvalid

invalidPolicy

protected int invalidPolicy

invalidForeground

protected Color invalidForeground

invalidBackground

protected Color invalidBackground
Constructor Detail

JCInvalidInfo

public JCInvalidInfo()
Creates a default instance where beepOnInvalid == true, policy == SHOW_INVALID, and the rest of the values are null.


JCInvalidInfo

public JCInvalidInfo(boolean beep_on_invalid,
                     int invalid_policy)
Creates an instance where beepOnInvalid and invalidPolicy are set as specified and the rest of the values are null.

Parameters:
beep_on_invalid -
invalid_policy -

JCInvalidInfo

public JCInvalidInfo(int invalid_policy)
Creates an instance where invalidPolicy is set as specified, beepOnInvalid == true, and the rest of the values are null.

Parameters:
invalid_policy -

JCInvalidInfo

public JCInvalidInfo(Color invalid_foreground,
                     Color invalid_background)
Creates a InvalidInfo object with the specified invalid colors and with invalidPolicy == SHOW_INVALID, beepOnInvalid == true, and defaultValue == null.

Parameters:
invalid_foreground -
invalid_background -

JCInvalidInfo

public JCInvalidInfo(boolean beep_on_invalid,
                     int invalid_policy,
                     Color invalid_foreground,
                     Color invalid_background)
Creates a InvalidInfo object with the specified defaultValue and with invalidPolicy == RESTORE_DEFAULT, beepOnInvalid == true, and the invalid colors are null.

Parameters:
beep_on_invalid -
invalid_background -
invalid_foreground -
invalid_policy -
Method Detail

getBeepOnInvalid

public boolean getBeepOnInvalid()
Returns whether the component should beep or not when the user types an invalid entry.

Returns:
whether the component should beep or not

setBeepOnInvalid

public void setBeepOnInvalid(boolean beep_on_invalid)
Sets whether the component should beep or not when the user types an invalid entry.

Parameters:
beep_on_invalid -

getInvalidPolicy

public int getInvalidPolicy()
Returns the invalid policy. Valid values are:
SHOW_INVALID - displays invalid entry (default)
RESTORE_DEFAULT - restores the default value on invalid entry
RESTORE_PREVIOUS - restores the previous valid entry on invalid entry
CLEAR_FIELD - clears the field

Returns:
invalid policy

setInvalidPolicy

public void setInvalidPolicy(int invalid_policy)
Sets the invalid policy. Valid values are:
SHOW_INVALID - displays invalid entry (default)
RESTORE_DEFAULT - restores the default value on invalid entry
RESTORE_PREVIOUS - restores the previous valid entry on invalid entry
CLEAR_FIELD - clears the field

Parameters:
invalid_policy -

getInvalidBackground

public Color getInvalidBackground()
Returns the background color to be used if the invalid policy is SHOW_INVALID. Null means use the normal background color.

Returns:
background color to be used if the invalid policy is SHOW_INVALID

setInvalidBackground

public void setInvalidBackground(Color background)
Sets the background color to be used if the invalid policy is SHOW_INVALID. Null means use the normal background color.

Parameters:
background -

getInvalidForeground

public Color getInvalidForeground()
Returns the foreground color to be used if the invalid policy is SHOW_INVALID. Null means use the normal foreground color.

Returns:
foreground color to be used if the invalid policy is SHOW_INVALID

setInvalidForeground

public void setInvalidForeground(Color foreground)
Sets the foreground color to be used if the invalid policy is SHOW_INVALID. Null means use the normal foreground color.

Parameters:
foreground -

Copyright © 2004 Quest Software Inc..
All rights reserved.