Class NumericTheme

All Implemented Interfaces:
Visibility, EditableTableModel, Serializable, Comparator, TableModel
Direct Known Subclasses:
GradientTheme

public class NumericTheme extends ChoroplethTheme
This class renders features based on a numeric value classified based on ranges of values.
See Also:
Serialized Form
  • Field Details

  • Constructor Details

  • Method Details

    • getMethod

      public int getMethod()
    • setMethod

      public void setMethod(int method)
    • getNDec

      public int getNDec()
    • setNDec

      public void setNDec(int ndec)
    • getIntervals

      public int getIntervals()
    • setIntervals

      public void setIntervals(int intervals)
    • getColumnName

      public String getColumnName(int columnIndex)
      Specified by:
      getColumnName in interface TableModel
      Specified by:
      getColumnName in class Theme
    • setStats

      public void setStats(double min, double max, double mean, double stdev)
    • getMin

      public double getMin()
    • getMax

      public double getMax()
    • getSubEditor

      public ThemeEditor getSubEditor(Layer lle)
      Description copied from class: ChoroplethTheme
      Retrive an editor object that will cusomtize the theme.
      Specified by:
      getSubEditor in class ChoroplethTheme
      Parameters:
      lle - the parent layer
    • setFieldname

      public void setFieldname(String fieldname)
      Description copied from class: ChoroplethTheme
      Set the column name or expression that will categorize each feature. This method is deprecated. Associate the fieldname to use with the theme by using the GeoRelLayer(GeoRelationalStore,ChoroplethTheme,String) constructor.
      Specified by:
      setFieldname in class ChoroplethTheme
    • isDynamic

      public boolean isDynamic()
      Description copied from class: Theme
      By default themes are static and do not change over time. Override this method if a change in period should result in the theme being redrawn.
      Overrides:
      isDynamic in class Theme
    • getNormalize

      @Deprecated public String getNormalize()
      Deprecated.
      Normalization fields are deprecated.
      See Also:
      setNormalize(java.lang.String)
    • setNormalize

      @Deprecated public void setNormalize(String normalize)
      Deprecated.
      Normalization fields are deprecated. Instead use an expression that includes the denominator to be used to scale the value. For example
       feature.Habitat.Marten/area()
       
    • updateKeys

      public void updateKeys()
    • getSymbol

      public Symbol getSymbol(Object key)
      Description copied from class: Theme
      Get a symbol for a specific key. This method only gets the raw symbol type, and is usually called by other methods that will take unclassified values and visibility parameters in to account.
      Specified by:
      getSymbol in class Theme
      Parameters:
      key - the key value used to look up the appropriate symbol
    • getDataValueAt

      public Object getDataValueAt(int row, int period)
      Description copied from class: ChoroplethTheme
      Get the data value for the given object id and period. Themes may override this method to apply normalization or other adjustments.
      Specified by:
      getDataValueAt in class ChoroplethTheme
    • compile

      public void compile(Layer layer, AttributeStore store, String fieldname) throws Exception
      Description copied from class: ChoroplethTheme
      Prepare the theme for use with this layer. If the theme specified a field or expression then the expression will be compiled, possibly resulting in an Exception.

      This method will not change the thematic symbols. In order to automatically build a new list of symbols use the generateSymbols method of the appropriate theme.

      The symbols for unclassified data values and selected features will be adjusted if the underlying feature type changes (e.g. from Polygon to Line).

      Overrides:
      compile in class ChoroplethTheme
      Parameters:
      layer - the parent layer
      store - the attribute table to compile the expression against
      fieldname - the fieldname or expression to use to lookup values for this theme
      Throws:
      Exception
    • generateSymbols

      public void generateSymbols(String fieldname, Window owner, int period, Layer layer) throws Exception
      Description copied from class: ChoroplethTheme
      This method causes the theme information to be recalulated on a new column.
      Specified by:
      generateSymbols in class ChoroplethTheme
      Throws:
      Exception
    • generateSymbols

      public void generateSymbols(String fieldname, Window owner, int period, Layer layer, int method, int intervals, int ndec) throws Exception
      This method causes the theme information to be recalulated on a new column. This involves rescanning the attribute table to determine the min and max range of the data values, and creating categories based on the calssification parameters. Symbols wil be created using the current palette.
      Parameters:
      fieldname - the column name or expression used to classify the symbols
      owner - the window of the calling GUI, or null
      period - the period of interest
      layer - the parent layer
      method - the classification method
      intervals - the number of intervals to be used in the classification
      ndec - the number of decimals to round the classification ranges at
      Throws:
      Exception
    • resetSelectionContext

      public void resetSelectionContext()
      Description copied from class: Theme
      Selection contexts can cache results of time consuming selection operations involved in some spatial quary operators. This method will release the cached selection values so that the query will be recalculated.
      Specified by:
      resetSelectionContext in class Theme
    • hasSelectionContext

      public boolean hasSelectionContext()
      Description copied from class: Theme
      Ask if theme makes use of cached spatial queries to speed up operations.
      Specified by:
      hasSelectionContext in class Theme
    • clone

      public Object clone()
      Description copied from class: Theme
      Return a deep copy of the object as appropriate for each theme type
      Specified by:
      clone in class Theme
    • clone

      public Object clone(NumericTheme uv)