edu.indiana.iucbrf.feature
Class TableFeature

java.lang.Object
  extended by edu.indiana.iucbrf.feature.AbstractFeature
      extended by edu.indiana.iucbrf.feature.TableFeature
All Implemented Interfaces:
Feature, SwingRepresentableWithDomain, SwingRepresentable, java.io.Serializable, java.lang.Comparable

public class TableFeature
extends AbstractFeature
implements SwingRepresentableWithDomain

Make a subclass which passes up the appropriate rowToFeatureKey array. In this way, the subclass will be a distinguishable type.

See Also:
Serialized Form

Field Summary
static java.lang.Class CLASS
           
protected  int collectionTypeThisIsIn
           
static int DEFAULT_VARIABLE_TYPE
           
protected  FeatureKey featureKey
           
static java.lang.reflect.Constructor STANDARD_CONSTRUCTOR
           
 
Fields inherited from class edu.indiana.iucbrf.feature.AbstractFeature
DEFAULT_CONSTRUCTED, NO_STANDARD_CONSTRUCTOR, value
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Fields inherited from interface edu.indiana.iucbrf.feature.Feature
DEFAULT_FEATURE_DIFFERENTIATORS_BY_VARTYPE, FEATURE_VALUE_FONT, INTERVAL_VARIABLE, LABEL_WIDTH, NOMINAL_VARIABLE, ORDINAL_VARIABLE, OTHER_VARIABLE
 
Constructor Summary
TableFeature(Distribution distribution)
           
TableFeature(Distribution[] distribution, Domain domain, java.lang.Integer collectionTypeThisIsIn, FeatureKey thisFeatureKey)
           
TableFeature(Distribution[] distribution, Domain domain, int collectionTypeThisIsIn, FeatureKey thisFeatureKey)
           
TableFeature(Feature[] featureArray, Domain domain, int collectionTypeThisIsIn, FeatureKey thisFeatureKey)
          Creates a new instance of TableFeature
TableFeature(FeatureCollection rowValues, int collectionTypeThisIsIn, FeatureKey thisFeatureKey)
           
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(java.lang.Object otherFeature)
          Compare this feature with another, based on their double values.
 int getDefaultVariableType()
          Get the variable type (for example, Feature.NOMINAL_VARIABLE, Feature.ORDINAL_VARIABLE, Feature.INTERVAL_VARIABLE, or Feature.OTHER_VARIABLE).
static FeatureInputPanel getFeatureInputPanel(int collectionType, Domain domain, FeatureKey featureKey, boolean allowUnknowns)
           
 FeatureKey[] getRowToFeatureKey(Domain domain)
           
 Feature midpoint(Feature other_feature)
           
 void setValue(java.lang.Object new_value)
           
 java.lang.String toString()
           
 javax.swing.JComponent toSwing(Domain domain)
           
 javax.swing.JComponent toSwing(int detailLevel)
          Detail level may be ignored by implementations.
 
Methods inherited from class edu.indiana.iucbrf.feature.AbstractFeature
adjust, checkAndGetDoubleValue, equals, getValue, toString, toSwing, toSwing
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_VARIABLE_TYPE

public static final int DEFAULT_VARIABLE_TYPE
See Also:
Constant Field Values

CLASS

public static final java.lang.Class CLASS

collectionTypeThisIsIn

protected int collectionTypeThisIsIn

featureKey

protected FeatureKey featureKey

STANDARD_CONSTRUCTOR

public static final transient java.lang.reflect.Constructor STANDARD_CONSTRUCTOR
Constructor Detail

TableFeature

public TableFeature(FeatureCollection rowValues,
                    int collectionTypeThisIsIn,
                    FeatureKey thisFeatureKey)

TableFeature

public TableFeature(Distribution distribution)

TableFeature

public TableFeature(Feature[] featureArray,
                    Domain domain,
                    int collectionTypeThisIsIn,
                    FeatureKey thisFeatureKey)
Creates a new instance of TableFeature


TableFeature

public TableFeature(Distribution[] distribution,
                    Domain domain,
                    java.lang.Integer collectionTypeThisIsIn,
                    FeatureKey thisFeatureKey)

TableFeature

public TableFeature(Distribution[] distribution,
                    Domain domain,
                    int collectionTypeThisIsIn,
                    FeatureKey thisFeatureKey)
Method Detail

getDefaultVariableType

public int getDefaultVariableType()
Description copied from interface: Feature
Get the variable type (for example, Feature.NOMINAL_VARIABLE, Feature.ORDINAL_VARIABLE, Feature.INTERVAL_VARIABLE, or Feature.OTHER_VARIABLE).

Specified by:
getDefaultVariableType in interface Feature

getRowToFeatureKey

public FeatureKey[] getRowToFeatureKey(Domain domain)

compareTo

public int compareTo(java.lang.Object otherFeature)
Description copied from class: AbstractFeature
Compare this feature with another, based on their double values. Note that since this assumes the features are DoubleRepresentable, an IllegalArgumentException will be thrown if the features being compared are not actually DoubleRepresentable. Whether this version or an overriding subclass' version is used:
Return value is < 0 (here, -1) if "this" is less than otherFeature.
Return value is > 0 (here, 1) if "this" is greater than otherFeature.
Return value is = 0 (here, 0) if "this" equals otherFeature.

Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class AbstractFeature

midpoint

public Feature midpoint(Feature other_feature)
Specified by:
midpoint in interface Feature
Specified by:
midpoint in class AbstractFeature

setValue

public void setValue(java.lang.Object new_value)
Specified by:
setValue in interface Feature

clone

public java.lang.Object clone()
Specified by:
clone in interface Feature
Specified by:
clone in class AbstractFeature

toString

public java.lang.String toString()
Overrides:
toString in class AbstractFeature

toSwing

public javax.swing.JComponent toSwing(int detailLevel)
Description copied from interface: SwingRepresentable
Detail level may be ignored by implementations. If used, the standard is for detailLevel 0 to be least detail, with higher values growing more detailed. 0 is least detail, higher numbers are more

Specified by:
toSwing in interface SwingRepresentable
Overrides:
toSwing in class AbstractFeature

toSwing

public javax.swing.JComponent toSwing(Domain domain)
Specified by:
toSwing in interface SwingRepresentableWithDomain

getFeatureInputPanel

public static FeatureInputPanel getFeatureInputPanel(int collectionType,
                                                     Domain domain,
                                                     FeatureKey featureKey,
                                                     boolean allowUnknowns)