net.infonode.properties.types
Class IntegerProperty

java.lang.Object
  extended bynet.infonode.properties.util.AbstractProperty
      extended bynet.infonode.properties.util.ValueHandlerProperty
          extended bynet.infonode.properties.types.NumberProperty
              extended bynet.infonode.properties.types.IntegerProperty
All Implemented Interfaces:
Property

public class IntegerProperty
extends NumberProperty

An integer property.

Version:
$Revision: 1.4 $

Constructor Summary
IntegerProperty(PropertyGroup group, String name, String description, int min, int max, int preferredDigitCount, PropertyValueHandler valueHandler)
          Constructor.
IntegerProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler)
          Constructor.
 
Method Summary
static IntegerProperty createPositive(PropertyGroup group, String name, String description, int preferredDigitCount, PropertyValueHandler valueHandler)
          Creates an integer property that can only be set to zero and positive integers.
 int get(Object valueContainer)
          Returns the integer value of this property in a value container.
 void set(Object valueContainer, int value)
          Sets the integer value of this property in a value container.
 
Methods inherited from class net.infonode.properties.types.NumberProperty
canBeAssiged, getLongValue, getMaxValue, getMinValue, getPreferredDigitCount
 
Methods inherited from class net.infonode.properties.util.ValueHandlerProperty
getValue, removeValue, setValue, valueIsRemovable, valueIsSet
 
Methods inherited from class net.infonode.properties.util.AbstractProperty
getDescription, getGroup, getName, getType, isMutable, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerProperty

public IntegerProperty(PropertyGroup group,
                       String name,
                       String description,
                       PropertyValueHandler valueHandler)
Constructor. Creates an unbounded integer property.

Parameters:
group - the property group
name - the property name
description - the property description
valueHandler - handles values for this property

IntegerProperty

public IntegerProperty(PropertyGroup group,
                       String name,
                       String description,
                       int min,
                       int max,
                       int preferredDigitCount,
                       PropertyValueHandler valueHandler)
Constructor.

Parameters:
group - the property group
name - the property name
description - the property description
min - the smallest value that this property can have
max - the largest value that this property can have
preferredDigitCount - the preferred number of digits to allocate space for in an editor for a property value
valueHandler - handles values for this property
Method Detail

createPositive

public static IntegerProperty createPositive(PropertyGroup group,
                                             String name,
                                             String description,
                                             int preferredDigitCount,
                                             PropertyValueHandler valueHandler)
Creates an integer property that can only be set to zero and positive integers.

Parameters:
group - the property group
name - the property name
description - the property description
preferredDigitCount - the preferred number of digits to allocate space for in an editor for a property value
valueHandler - handles values for this property
Returns:
an an integer property that can only be set to zero and positive integers

get

public int get(Object valueContainer)
Returns the integer value of this property in a value container.

Parameters:
valueContainer - the value container
Returns:
the integer value of this property

set

public void set(Object valueContainer,
                int value)
Sets the integer value of this property in a value container.

Parameters:
valueContainer - the value container
value - the float value


Copyright © 2007 NNL Technology AB. All Rights Reserved.