Package hec.gfx2d
Class DataTypeFactory
java.lang.Object
hec.gfx2d.DataTypeFactory
Title: General CWMS Project Description: Copyright: Copyright (c) 2000
Company: RMA
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for the DataTypeFactory object -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataType(String parameter, String name, String dssType, boolean yAxisReversed, int numLines) Adds a feature to the DataType attribute of the DataTypeFactory classgetAlwaysFirstLineProperty(String parameter, String location, String type, boolean isInstanteous, boolean useDataTypeStyles, boolean override) getDataType(G2dDssObject data) Gets the DataType attribute of the DataTypeFactory classgetDataType(G2dObject obj) Gets the DataType attribute of the DataTypeFactory classGets the DataType attribute of the DataTypeFactory classGets the DataTypes attribute of the DataTypeFactory classgetDataTypes(Vector dcList) Gets the DataTypes attribute of the DataTypeFactory classgetExcessParameter(String parameter) static DataTypeFactoryprotected BufferedReaderprotected BufferedWritergetLine(DataContainer dc) same asgetLineProperties(data, true)getLineProperties(G2dDssObject data, boolean useDataTypeStyles) getLineProperties(G2dDssObject data, String paramOverride, boolean useDataTypeStyles) getLineProperties(G2dObject data, String paramOverride, boolean useDataTypeStyles) Line style properties for all other G2dObject data typessame asgetLineProperties(dc, true);getLineProperties(DataContainer dc, boolean useDataTypeStyles) same asgetLineProperties(dc,null,useDataTypeStyles)getLineProperties(DataContainer dc, String paramOverride, boolean useDataTypeStyles) Gets the LineProperties attribute of the DataTypeFactory classgetLineProperties(List<? extends G2dObject> dataContainers) same asgetLineProperties(dataContainers, true)getLineProperties(List<? extends G2dObject> dataContainers, boolean useDataTypeStyles) same asgetLineProperties(dataContainers, null, useDataTypeStyles)getLineProperties(List<? extends G2dObject> dataContainers, String paramOverride) getLineProperties(List<? extends G2dObject> dataContainers, String param, boolean useDataTypeStyles) protected ListgetParameter(String parameter) protected Stringprotected static booleanisInstanteous(String type) protected booleanreadFile()Read the plot lines defaults from the Jars and then updates with user defined defaults stored in the "user.home" directory.protected booleanreadFile(BufferedReader reader, int loc) voidreset()Method Descriptionstatic voidsetDefaultPackage(String newPackage) set the default package to look for the default line styles.static voidsetFactory(DataTypeFactory factory) static voidsetOverrideFile(String file) set where to look for the override file.booleanMethod Description
-
Field Details
-
UNDEFINED_DATA_TYPE
Description -
PLOT_LINES_FILE
- See Also:
-
DEFAULT_PACKAGE
-
INST_VAL
-
INST_CUM
-
PER_AVER
-
PER_CUM
-
DSS_TYPES
Description -
_debug
protected static boolean _debug
-
-
Constructor Details
-
DataTypeFactory
protected DataTypeFactory()Constructor for the DataTypeFactory object
-
-
Method Details
-
getLocationList
-
setFactory
-
getFactory
-
reset
public void reset()Method Description -
getLineProperties
same asgetLineProperties(dataContainers, true)- Parameters:
dataContainers- Description- Returns:
- The LineProperties value
-
getLineProperties
public List<LineProperties> getLineProperties(List<? extends G2dObject> dataContainers, boolean useDataTypeStyles) same asgetLineProperties(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- DescriptionuseDataTypeStyles- Description- Returns:
- The LineProperties value
-
getLineProperties
same asgetLineProperties(data, true)- Parameters:
data- Description- Returns:
- The LineProperties value
-
getLineProperties
- Parameters:
data- DescriptionuseDataTypeStyles- 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
same asgetLineProperties(dc, true);- Parameters:
dc- Description- Returns:
- The LineProperties value
-
getLineProperties
same asgetLineProperties(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- DescriptionuseDataTypeStyles- Description- Returns:
- The LineProperties value
-
getAlwaysFirstLineProperty
public G2dLineProperties getAlwaysFirstLineProperty(String parameter, String location, String type, boolean isInstanteous, boolean useDataTypeStyles, boolean override) -
getDataTypes
Gets the DataTypes attribute of the DataTypeFactory class- Returns:
- The DataTypes value
-
getDataTypes
Gets the DataTypes attribute of the DataTypeFactory class- Parameters:
dcList- Description- Returns:
- The DataTypes value
-
getDataType
Gets the DataType attribute of the DataTypeFactory class- Parameters:
obj- Description- Returns:
- The DataType value
-
getDataType
Gets the DataType attribute of the DataTypeFactory class- Parameters:
data- Description- Returns:
- The DataType value
-
getDataType
Gets the DataType attribute of the DataTypeFactory class- Parameters:
dc- Description- Returns:
- The DataType value
-
getLine
- Parameters:
dc- Description- Returns:
- The Line value
-
getParameter
- Parameters:
parameter- Description- Returns:
- The Parameter value
-
getType
- Parameters:
type- Description- Returns:
- The Type value
-
getExcessParameter
- Parameters:
parameter- Description- Returns:
- The ExcessParameter value
-
getFileReader
-
getFileWriter
-
writeFile
public boolean writeFile()Method Description- Returns:
- Description
-
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
- Parameters:
reader- Descriptionloc- 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 attributename- The feature to be added to the DataType attributedssType- The feature to be added to the DataType attributeyAxisReversed- The feature to be added to the DataType attributenumLines- The feature to be added to the DataType attribute
-
isInstanteous
-
setDefaultPackage
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
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:
-