Package hec.map.aishape
Class AiShapeGlyphDataRecord
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.map.GlyphDataRecord
hec.map.aishape.AiShapeGlyphDataRecord
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,GlyphDataRecordSerializable,PropertyChangeListener,Serializable,Cloneable,Comparable,EventListener,Observer,Modifiable
public class AiShapeGlyphDataRecord
extends GlyphDataRecord
implements GlyphDataRecordSerializable, PropertyChangeListener
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final intFields inherited from class hec.map.GlyphDataRecord
GDR_EXTENSIONFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanchooseQueryFields(JDialog parent, List availableFields) static booleancreateArrayElements(org.jdom.Element base, float[] array) add the Elements that represent the array to theElementbase with theDEFAULT_STEPnumber of array entries per arrayElementstatic booleancreateArrayElements(org.jdom.Element base, float[] array, int step) add the Elements that represent the array to theElementbase with the step number of array entries per arrayElementvoiddeserialize(BufferedReader reader) booleandoublegetAlpha()float[]intbooleangetDrawingAttribute(Object field) intgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.intReturns the style that is used to fill a polygon.static float[]getFloatArrayElements(org.jdom.Element elem) intintdoubleintintintReturns the type of symbol drawing, i.e.protected static intgetStepSize(Object array) return the step size to write the arrays out withintReturns the type of symbol drawing, i.e.intReturns the index of the symbol to draw.booleanbooleanhasDrawingAttribute(Object field) Returns true if there is a drawing attribute for a given field.booleanvoidprotected voidread0(String type, String param, BufferedReader input) The abstract read which the concrete subclass must define.voidorg.jdom.Documentsave the data for this InundationManagerGroup object to an XML Document.voidserialize(BufferedWriter writer) voidsetAlpha(double alpha) voidsetBorderLineColor(Color borderColor) voidsetBorderLineStyle(float[] lineStyle) voidsetBorderWidth(int width) voidvoidvoidsetColorContourSteps(int numSteps) voidvoidvoidsetDisplayBorder(boolean b) voidsetDrawAreas(boolean draw) voidsetDrawingAttribute(Object field, ShapeDrawingAttribute attr) voidsetDrawUsingDefaultColor(boolean b) voidsetFieldIndex(int idx) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetFillColor(Color fillColor) voidsetFillStyle(int fillStyle) voidvoidsetLabelFieldIndex(int index) Sets the index into the database columns for the data to use as a label.voidsetLabelFont(Font font) voidsetLabelPosition(int position) Sets the position of the label around a center point, such as NORTH, EAST, WEST, SOUTH, etc.voidsetLabelRotation(double roation) Sets the rotaion value.voidsetNumGradations(int numGradations) voidsetPointSize(int size) voidsetPolygonDrawType(int drawType) voidvoidsetSymbolDrawType(int drawType) Sets the drawing type as either UNIQUE or SINGLE symbolvoidsetSymbolIndex(int symbolIdx) Sets the index of the symbol to draw.voidsetUseGradations(boolean b) booleanprotected voidwrite0(BufferedWriter output) The abstract write which the concrete subclass must define.Methods inherited from class hec.map.GlyphDataRecord
clone, getShowLegend, read, readAsciiSerialized, setMap, setShowLegend, writeMethods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Field Details
-
SINGLE_SYMBOL
public static final int SINGLE_SYMBOL- See Also:
-
UNIQUE_SYMBOL
public static final int UNIQUE_SYMBOL- See Also:
-
FLOAT_ARRAY_NODE_NAME
- See Also:
-
LENGTH_ATTRIBUTE
- See Also:
-
STEP_ATTRIBUTE
- See Also:
-
RANGE_ATTRIBUTE
- See Also:
-
DATA_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
AiShapeGlyphDataRecord
public AiShapeGlyphDataRecord()
-
-
Method Details
-
getUseGradations
public boolean getUseGradations() -
setDrawAreas
public void setDrawAreas(boolean draw) -
getDrawAreas
public boolean getDrawAreas() -
setUseGradations
public void setUseGradations(boolean b) -
getNumGradations
public int getNumGradations() -
setNumGradations
public void setNumGradations(int numGradations) -
getAlpha
public double getAlpha() -
setAlpha
public void setAlpha(double alpha) -
setPolygonDrawType
public void setPolygonDrawType(int drawType) -
getPolygonDrawType
public int getPolygonDrawType()Returns the type of symbol drawing, i.e. UNIQUE or SINGLE -
setSymbolDrawType
public void setSymbolDrawType(int drawType) Sets the drawing type as either UNIQUE or SINGLE symbol -
getSymbolDrawType
public int getSymbolDrawType()Returns the type of symbol drawing, i.e. UNIQUE or SINGLE -
setSymbolIndex
public void setSymbolIndex(int symbolIdx) Sets the index of the symbol to draw. This value is used in the RmaSymbol class to identify the type of symbol to use, i.e. SQUARE, CIRCLE, etc. -
getSymbolIndex
public int getSymbolIndex()Returns the index of the symbol to draw. This value is used in the RmaSymbol class to identify the type of symbol to use, i.e. SQUARE, CIRCLE, etc. -
setLabelFont
-
getLabelFont
-
getDefaultLineColor
-
setDefaultLineColor
-
getDefaultColor
-
setDefaultColor
-
getColorContourStart
-
setColorContourStart
-
setColorContourSteps
public void setColorContourSteps(int numSteps) -
setColorContourEnd
-
getColorContourEnd
-
setHighlightColor
-
getHighlightColor
-
chooseQueryFields
-
getQueryFields
-
setQueryFields
-
getFieldIndex
public int getFieldIndex() -
setFieldIndex
public void setFieldIndex(int idx) -
getDrawingAttribute
-
buildColor
-
hasDrawingAttribute
Returns true if there is a drawing attribute for a given field. -
setDrawingAttribute
-
read0
Description copied from class:GlyphDataRecordThe abstract read which the concrete subclass must define.- Specified by:
read0in classGlyphDataRecord- Throws:
IOException
-
write0
Description copied from class:GlyphDataRecordThe abstract write which the concrete subclass must define.- Specified by:
write0in classGlyphDataRecord- Throws:
IOException
-
useAsciiSerialization
public boolean useAsciiSerialization()- Overrides:
useAsciiSerializationin classGlyphDataRecord
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin classGlyphDataRecord- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Overrides:
setFieldObjectin classGlyphDataRecord- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-
getLabelRotation
public double getLabelRotation() -
setLabelRotation
public void setLabelRotation(double roation) Sets the rotaion value. This value describes how much to rotate the label around a center point. -
setLabelPosition
public void setLabelPosition(int position) Sets the position of the label around a center point, such as NORTH, EAST, WEST, SOUTH, etc. These are position points on a compass. -
getLabelPosition
public int getLabelPosition() -
setLabelFieldIndex
public void setLabelFieldIndex(int index) Sets the index into the database columns for the data to use as a label. set a value of -1 to turn the labels off -
getLabelFieldIndex
public int getLabelFieldIndex() -
setPointSize
public void setPointSize(int size) -
getPointSize
public int getPointSize() -
getBorderLineStyle
public float[] getBorderLineStyle() -
setBorderLineStyle
public void setBorderLineStyle(float[] lineStyle) -
getBorderWidth
public int getBorderWidth() -
setBorderWidth
public void setBorderWidth(int width) -
getBorderLineColor
-
setBorderLineColor
-
setDisplayBorder
public void setDisplayBorder(boolean b) -
isBorderDisplayed
public boolean isBorderDisplayed() -
setFillStyle
public void setFillStyle(int fillStyle) -
getFillStyle
public int getFillStyle()Returns the style that is used to fill a polygon. Valid values are defined in RmaDrawConst. HS_SOLID, HS_HORIZONTAL, HS_VERTICAL, HS_BDIAGONAL, HS_FDIAGONAL, HS_CROSS, HS_DIAGCROSS -
getFillColor
-
setFillColor
-
setDrawUsingDefaultColor
public void setDrawUsingDefaultColor(boolean b) -
drawUsingDefaultColor
public boolean drawUsingDefaultColor() -
serialize
- Specified by:
serializein interfaceGlyphDataRecordSerializable- Throws:
IOException
-
saveDocument
public org.jdom.Document saveDocument()save the data for this InundationManagerGroup object to an XML Document.- Returns:
- the XML Document containing the data for this XMLExample
-
deserialize
- Specified by:
deserializein interfaceGlyphDataRecordSerializable- Throws:
IOExceptionorg.jdom.JDOMException
-
createArrayElements
public static boolean createArrayElements(org.jdom.Element base, float[] array) add the Elements that represent the array to theElementbase with theDEFAULT_STEPnumber of array entries per arrayElement- Parameters:
base- the Element to add the array Elements toarray- the array to save- Returns:
- true if the array Elements were successfully added to the base Element
-
createArrayElements
public static boolean createArrayElements(org.jdom.Element base, float[] array, int step) add the Elements that represent the array to theElementbase with the step number of array entries per arrayElement- Parameters:
base- the Element to add the array Elements toarray- the array to savestep- the number of array positions to store in each array Element- Returns:
- true if the array Elements were successfully added to the base Element
-
getStepSize
return the step size to write the arrays out with- Parameters:
array- the array- Returns:
- the step size
-
getFloatArrayElements
public static float[] getFloatArrayElements(org.jdom.Element elem) -
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
addPropertyChangeListener
-
removePropertyChangeListener
-