org.fopps.model
Class Parameter

java.lang.Object
  |
  +--org.fopps.model.AbstractItem
        |
        +--org.fopps.model.TreeItem
              |
              +--org.fopps.model.ConfigurationItem
                    |
                    +--org.fopps.model.Parameter

public class Parameter
extends ConfigurationItem

Parameter represents a configuration entry for numeric parameters

Author:
Oliver Wieland

Field Summary
 
Fields inherited from class org.fopps.model.TreeItem
mChildren, mParent
 
Fields inherited from class org.fopps.model.AbstractItem
ADDED_EVENT, CHANGE_EVENT, name, REMOVED_EVENT
 
Constructor Summary
Parameter(java.lang.String pName, ConfigurationItem pParent, Feature pFeature)
           
Parameter(java.lang.String pName, ConfigurationItem pParent, java.lang.Object pDefaultValue, Feature pFeature, java.lang.Number pValue)
           
Parameter(java.lang.String pName, Feature pFeature)
           
Parameter(java.lang.String pName, TreeItem pParent, boolean pChildrenAllowed, java.lang.Object pDefaultValue, Feature pFeature, java.lang.Number pValue)
           
 
Method Summary
 java.lang.Object getValue()
          Returns the current value
 java.lang.Object[] possibleValues()
          Returns all possible values of this item.
 void restoreDefault()
          Restores default value
 boolean setValue(int pIndex)
          Set a value by given index.
 boolean setValue(java.lang.Object pValue)
          Set a value by an object value.
 boolean switchToNextValue()
          Switches to next possible value
 boolean switchToPrevValue()
          Switches to next possible value
 
Methods inherited from class org.fopps.model.ConfigurationItem
addAttachmentsFromFeature, fireItemChanged, getAttachments, getBinding, getChildrenForConfiguration, getDefaultValue, getDescription, getFeature, getOrigin, getSymbolicVar, isLocked, isSet, setDefaultValue, setIsLocked, setupInitialConfiguration, toString
 
Methods inherited from class org.fopps.model.TreeItem
addChildren, allChildrenCount, childrenAllowed, childrenCount, delete, first, getChildAt, getChildren, getDepth, getIndexOfChild, getParent, getPath, getRoot, isLeaf, last, notifyListeners, removeAllChildren, removeAllChildrenRecursive, removeChildren, setChildren, setParent
 
Methods inherited from class org.fopps.model.AbstractItem
addIncoming, addListener, addOutgoing, commitGhostRelations, containsType, copyAttributes, filterElements, fireItemAdded, fireItemRemoved, getConstraints, getIncoming, getIncomingConstraints, getListeners, getName, getOutgoing, getOutgoingConstraints, getRelationTo, hasConstraints, isBlockEvents, isConnectedWith, removeAllConstraints, removeAllIncoming, removeAllListener, removeAllOutgoing, removeAllRelations, removeGhostRelations, removeIncoming, removeListener, removeOutgoing, removeRelationTo, setBlockEvents, setDescription, setIncoming, setName, setOutgoing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Parameter

public Parameter(java.lang.String pName,
                 Feature pFeature)

Parameter

public Parameter(java.lang.String pName,
                 ConfigurationItem pParent,
                 Feature pFeature)

Parameter

public Parameter(java.lang.String pName,
                 TreeItem pParent,
                 boolean pChildrenAllowed,
                 java.lang.Object pDefaultValue,
                 Feature pFeature,
                 java.lang.Number pValue)

Parameter

public Parameter(java.lang.String pName,
                 ConfigurationItem pParent,
                 java.lang.Object pDefaultValue,
                 Feature pFeature,
                 java.lang.Number pValue)
Method Detail

restoreDefault

public void restoreDefault()
Restores default value

Specified by:
restoreDefault in class ConfigurationItem

switchToNextValue

public boolean switchToNextValue()
Switches to next possible value

Specified by:
switchToNextValue in class ConfigurationItem
Returns:
true, if value was changed

switchToPrevValue

public boolean switchToPrevValue()
Switches to next possible value

Specified by:
switchToPrevValue in class ConfigurationItem
Returns:
true, if value was changed

setValue

public boolean setValue(int pIndex)
Set a value by given index. Parameter types have no set of values, so the index is interpreted as value.

Specified by:
setValue in class ConfigurationItem
Parameters:
pIndex - New value
Returns:
true, if value was changed

setValue

public boolean setValue(java.lang.Object pValue)
Set a value by an object value. Every subclass should at least support strings

Specified by:
setValue in class ConfigurationItem
Parameters:
pValue - New value
Returns:
true, if value was changed

possibleValues

public java.lang.Object[] possibleValues()
Returns all possible values of this item. Parameter types have no explicit set of values, so this method returns always an empty array

Specified by:
possibleValues in class ConfigurationItem

getValue

public java.lang.Object getValue()
Returns the current value

Specified by:
getValue in class ConfigurationItem


Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.