Class Theme

All Implemented Interfaces:
Visibility, EditableTableModel, Serializable, TableModel
Direct Known Subclasses:
ChoroplethTheme, ImageTheme

public abstract class Theme extends AbstractTableModel implements EditableTableModel, Visibility
See Also:
Serialized Form
  • Field Details

    • themeName

      public String themeName
      The generic type name of the theme. Specific classes that inherit from Theme will set this value.
  • Constructor Details

    • Theme

      public Theme()
      The default constructor
  • Method Details

    • getSymbol

      public abstract Symbol getSymbol(Object key, double scale, Layer layer) throws Exception
      Get a symbol for the key value
      Parameters:
      key - the lookup value
      scale - the world to page scale
      layer - the parent layer
      Throws:
      Exception
    • getSelectedSymbol

      public abstract Symbol getSelectedSymbol()
      Get the selected object symbol for this theme
    • clone

      public abstract Object clone()
      Return a deep copy of the object as appropriate for each theme type
    • getEditor

      public abstract ThemeEditor getEditor(Layer lle)
      Return a ThemeEditor component appropriate for the theme type.
    • getRowCount

      public abstract int getRowCount()
      AbstractTableModel and EditableTableModel interfaces
      Specified by:
      getRowCount in interface TableModel
    • getColumnCount

      public abstract int getColumnCount()
      Specified by:
      getColumnCount in interface TableModel
    • getColumnName

      public abstract String getColumnName(int columnIndex)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getValueAt

      public abstract Object getValueAt(int row, int column)
      Specified by:
      getValueAt in interface TableModel
    • getColumnClass

      public abstract Class getColumnClass(int column)
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
    • isCellEditable

      public abstract boolean isCellEditable(int rowIndex, int columnIndex)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • setValueAt

      public abstract void setValueAt(Object aValue, int rowIndex, int columnIndex)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
    • getSymbol

      public abstract Symbol getSymbol(Object key)
      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.
      Parameters:
      key - the key value used to look up the appropriate symbol
    • getSymbol

      public abstract Symbol getSymbol(int row, int period) throws Exception
      Get a symbol for a given object id and period. 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.
      Parameters:
      row - the row number or object id for the feature or grid value
      period - the period of interest
      Throws:
      Exception
    • getCaption

      public String getCaption()
      Get the caption for this theme. This will be used to set the default layer title.
    • setCaption

      public void setCaption(String caption)
      Set the caption for this theme
    • setChipSize

      public void setChipSize(int width, int height)
      Set the size of the symbol preview chip used for this theme. The preview chip is used in the legend.
      Parameters:
      width - the width of the preview chip
      height - the height of the preview chip
    • getChipWidth

      public int getChipWidth()
      Get the width of the preview chip
    • getChipHeight

      public int getChipHeight()
      Get the width of the preview chip
    • getThemeName

      public String getThemeName()
      Get a name that describes the type of this theme
    • setMinScale

      public void setMinScale(double scale)
      Set the minimum scale at which this theme will be shown
      Specified by:
      setMinScale in interface Visibility
    • getMinScale

      public double getMinScale()
      Get the minimum scale at this this theme will be shown
      Specified by:
      getMinScale in interface Visibility
    • setMaxScale

      public void setMaxScale(double scale)
      Set the maximum scale at which this theme will be shown
      Specified by:
      setMaxScale in interface Visibility
    • getMaxScale

      public double getMaxScale()
      Get the maximum scale at this this theme will be shown
      Specified by:
      getMaxScale in interface Visibility
    • setAlpha

      public Visibility setAlpha(AlphaComposite alpha)
      Set the compositing (transparency) value for this theme
      Specified by:
      setAlpha in interface Visibility
    • getAlpha

      public AlphaComposite getAlpha()
      Get the compositing (transparency) value for this theme
      Specified by:
      getAlpha in interface Visibility
    • setIsScaled

      public void setIsScaled(boolean isScaled)
      Set that the symbology in this theme should be adjusted according to the scale
    • getIsScaled

      public boolean getIsScaled()
      Test if the symbology in this theme should be adjusted according to the scale
    • getSymbolType

      public int getSymbolType()
      Get the type of features that are to be represented by this theme (see SpatialStore for the type definitions.
    • setReferenceScale

      public void setReferenceScale(double scale)
    • getReferenceScale

      public double getReferenceScale()
    • isDynamic

      public boolean isDynamic()
      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.
    • resetSelectionContext

      public abstract void resetSelectionContext()
      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.
    • hasSelectionContext

      public abstract boolean hasSelectionContext()
      Ask if theme makes use of cached spatial queries to speed up operations.