Package hec.gfx2d

Class DataTypeFactory

java.lang.Object
hec.gfx2d.DataTypeFactory

public class DataTypeFactory extends Object
Title: General CWMS Project Description: Copyright: Copyright (c) 2000 Company: RMA
  • Field Details

    • UNDEFINED_DATA_TYPE

      public static final DataType UNDEFINED_DATA_TYPE
      Description
    • PLOT_LINES_FILE

      public static final String PLOT_LINES_FILE
      See Also:
    • DEFAULT_PACKAGE

      protected static String DEFAULT_PACKAGE
    • INST_VAL

      public static String INST_VAL
    • INST_CUM

      public static String INST_CUM
    • PER_AVER

      public static String PER_AVER
    • PER_CUM

      public static String PER_CUM
    • DSS_TYPES

      public static final String[] DSS_TYPES
      Description
    • _debug

      protected static boolean _debug
  • Constructor Details

    • DataTypeFactory

      protected DataTypeFactory()
      Constructor for the DataTypeFactory object
  • Method Details

    • getLocationList

      protected List getLocationList()
    • setFactory

      public static void setFactory(DataTypeFactory factory)
    • getFactory

      public static DataTypeFactory getFactory()
    • reset

      public void reset()
      Method Description
    • getLineProperties

      public List<LineProperties> getLineProperties(List<? extends G2dObject> dataContainers)
      same as getLineProperties(dataContainers, true)
      Parameters:
      dataContainers - Description
      Returns:
      The LineProperties value
    • getLineProperties

      public List<LineProperties> getLineProperties(List<? extends G2dObject> dataContainers, boolean useDataTypeStyles)
      same as getLineProperties(dataContainers, null, useDataTypeStyles)
      Parameters:
      dataContainers -
      useDataTypeStyles -
      Returns:
    • getLineProperties

      public List<LineProperties> getLineProperties(List<? extends G2dObject> dataContainers, String paramOverride)
    • getLineProperties

      public List<LineProperties> getLineProperties(List<? extends G2dObject> dataContainers, String param, boolean useDataTypeStyles)
      Parameters:
      dataContainers - Description
      useDataTypeStyles - Description
      Returns:
      The LineProperties value
    • getLineProperties

      public G2dLineProperties getLineProperties(G2dDssObject data)
      same as getLineProperties(data, true)
      Parameters:
      data - Description
      Returns:
      The LineProperties value
    • getLineProperties

      public G2dLineProperties getLineProperties(G2dDssObject data, boolean useDataTypeStyles)
      Parameters:
      data - Description
      useDataTypeStyles - Description
      Returns:
      The LineProperties value
    • getLineProperties

      public G2dLineProperties getLineProperties(G2dDssObject data, String paramOverride, boolean useDataTypeStyles)
      Parameters:
      data -
      paramOverride -
      useDataTypeStyles -
      Returns:
    • getLineProperties

      public G2dLineProperties getLineProperties(G2dObject data, String paramOverride, boolean useDataTypeStyles)
      Line style properties for all other G2dObject data types
      Parameters:
      data -
      paramOverride -
      useDataTypeStyles -
      Returns:
    • getLineProperties

      public G2dLineProperties getLineProperties(DataContainer dc)
      same as getLineProperties(dc, true);
      Parameters:
      dc - Description
      Returns:
      The LineProperties value
    • getLineProperties

      public G2dLineProperties getLineProperties(DataContainer dc, boolean useDataTypeStyles)
      same as getLineProperties(dc,null,useDataTypeStyles)
      Parameters:
      dc -
      useDataTypeStyles -
      Returns:
    • getLineProperties

      public G2dLineProperties getLineProperties(DataContainer dc, String paramOverride, boolean useDataTypeStyles)
      Gets the LineProperties attribute of the DataTypeFactory class
      Parameters:
      dc - Description
      useDataTypeStyles - Description
      Returns:
      The LineProperties value
    • getAlwaysFirstLineProperty

      public G2dLineProperties getAlwaysFirstLineProperty(String parameter, String location, String type, boolean isInstanteous, boolean useDataTypeStyles, boolean override)
    • getDataTypes

      public Vector getDataTypes()
      Gets the DataTypes attribute of the DataTypeFactory class
      Returns:
      The DataTypes value
    • getDataTypes

      public Vector getDataTypes(Vector dcList)
      Gets the DataTypes attribute of the DataTypeFactory class
      Parameters:
      dcList - Description
      Returns:
      The DataTypes value
    • getDataType

      public DataType getDataType(G2dObject obj)
      Gets the DataType attribute of the DataTypeFactory class
      Parameters:
      obj - Description
      Returns:
      The DataType value
    • getDataType

      public DataType getDataType(G2dDssObject data)
      Gets the DataType attribute of the DataTypeFactory class
      Parameters:
      data - Description
      Returns:
      The DataType value
    • getDataType

      public DataType getDataType(DataContainer dc)
      Gets the DataType attribute of the DataTypeFactory class
      Parameters:
      dc - Description
      Returns:
      The DataType value
    • getLine

      public G2dLine getLine(DataContainer dc)
      Parameters:
      dc - Description
      Returns:
      The Line value
    • getParameter

      public String getParameter(String parameter)
      Parameters:
      parameter - Description
      Returns:
      The Parameter value
    • getType

      protected String getType(String type)
      Parameters:
      type - Description
      Returns:
      The Type value
    • getExcessParameter

      public String getExcessParameter(String parameter)
      Parameters:
      parameter - Description
      Returns:
      The ExcessParameter value
    • getFileReader

      protected BufferedReader getFileReader()
    • getFileWriter

      protected BufferedWriter getFileWriter()
    • writeFile

      public boolean writeFile()
      Method Description
      Returns:
      Description
    • getFileName

      public String getFileName()
      Returns:
      The FileName value
    • readFile

      protected boolean readFile()
      Read the plot lines defaults from the Jars and then updates with user defined defaults stored in the "user.home" directory.
      Returns:
      true if successfull otherwise false.
    • readFile

      protected boolean readFile(BufferedReader reader, int loc)
      Parameters:
      reader - Description
      loc - Description
      Returns:
      Description
    • addDataType

      public void addDataType(String parameter, String name, String dssType, boolean yAxisReversed, int numLines)
      Adds a feature to the DataType attribute of the DataTypeFactory class
      Parameters:
      parameter - The feature to be added to the DataType attribute
      name - The feature to be added to the DataType attribute
      dssType - The feature to be added to the DataType attribute
      yAxisReversed - The feature to be added to the DataType attribute
      numLines - The feature to be added to the DataType attribute
    • isInstanteous

      protected static boolean isInstanteous(String type)
    • setDefaultPackage

      public static void setDefaultPackage(String newPackage)
      set the default package to look for the default line styles. by default it looks in the hec/gfx2d/ package
      Parameters:
      newPackage - new package. with trailing slash, no leading slash
    • setOverrideFile

      public static void setOverrideFile(String file)
      set where to look for the override file. This is the file the user creates when they edit the default line styles.
      Parameters:
      file - the new file location
      See Also: