Package hec.gfx2d
Class G2dGlyph
java.lang.Object
hec.gfx2d.G2dGlyph
- All Implemented Interfaces:
Serializable,Observer
- Direct Known Subclasses:
BarGlyph,ComplexSeasonalDataGlyph,DataSetGlyph,DefaultG2dGlyph,G2dEditGlyph,LocalDSSTimeSeriesCollectionGlyph,PairedDataGlyph,PairedValuesExtDataGlyph,ProfileDataG2dGlyph,SimpleArrayGlyph,SimpleJTableBarGlyph,SimpleJTableGlyph,SimpleJTableSeasonalGlyph,SimpleJTableStepGlyph,SimplePairedValuesDataGlyph,SimpleSeasonalDataGlyph,TimeSeriesGlyph,TimeWindowPlotGlyph
Abstract base class for specific glyphs that performs drawing and editing functions
for Map objects.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis is a listener that accepts OK events from the Properties dialog. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WorldRectprotected G2dGlyphDrawPropprotected G2dObjectprotected G2dLineprotected G2dLine[]protected G2dPolygonprotected Scaleprotected Viewportprotected static final intprotected static final int[]protected static final int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidprotected G2dLineprotected voidbooleandataAtPoint(LocalPt pt) abstract voidvoiddrawLegendPict(Graphics g, int curveIndex, Dimension dim) voidedit the first line in the Glyph.voideditLineProperties(int curveNum) edit the curve in the Glyph specified by curveNumprotected voidfinalize()intgetCurveName(int curveIndex) intgetLegendPictSize(int curveIndex) protected DimensiongetLine()getLine(int index) Returns a references to a line.getName()protected ListgetScale()Returns a tool tip text for this glyph.Computes a bounding rectangle of the visible region of the glyph.booleanisCurveDrawn(int curveNumber) is a curve drawn or not.booleanbooleanbooleanbooleanmouseDragged(LocalPt pt) Method called when the mouse is dragged.booleanobjectDoubleClick(LocalPt pt, int modifiers) booleanobjectPopupMenu(LocalPt pt, int modifiers) booleanobjectSelect(LocalPt pt, int modifiers) booleanpointerOver(LocalPt pt) voidvoidsetCurveDrawn(int curveNumber, boolean drawn) set a curve drawn or not.voidvoidsetLegendItemsVisible(boolean b) voidvoidsetLineVisible(boolean visible) voidvoidsetShowAllCurvesOnLegend(boolean b) voidsetVisible(boolean visible) booleanReturns true if all curves are to be displayed on the lenged.voidDescription of the MethodtoString()voidupdate(Observable o, Object arg)
-
Field Details
-
_viewport
-
_g2dObject
-
_scale
-
_drawProp
-
_line
-
_lineArray
-
_polygon
-
_bounds
-
maxPtArraySz
protected static final int maxPtArraySz- See Also:
-
xarray
protected static final int[] xarray -
yarray
protected static final int[] yarray
-
-
Constructor Details
-
G2dGlyph
-
-
Method Details
-
createG2dLine
-
buildLineArray
protected void buildLineArray() -
finalize
-
isVisible
public boolean isVisible() -
setVisible
public void setVisible(boolean visible) -
getVisibleRect
Computes a bounding rectangle of the visible region of the glyph. Ranges from the max/min X-Y Axis values -
getViewport
-
getScale
-
update
-
getName
-
getBounds
-
dataAtPoint
-
objectPopupMenu
-
pointerOver
-
objectSelect
-
objectDoubleClick
-
mouseDragged
Method called when the mouse is dragged.- Parameters:
pt- the new point of where the mouse was dragged to.- Returns:
- true if the mouse dragged event was accepted and consumed otherwise false.
-
clearSelection
public void clearSelection() -
getToolTipText
Returns a tool tip text for this glyph. Returns null if there is none -
getDeviceResolution
public int getDeviceResolution() -
draw
-
showPopup
Description of the Method- Parameters:
c- Description of Parameterx- Description of Parametery- Description of Parameter
-
getLegendPictSize
-
showAllCurvesOnLegend
public boolean showAllCurvesOnLegend()Returns true if all curves are to be displayed on the lenged. If false is returned, just display one legend item that represents all curves. Usefull for trying to compact the legend.- Returns:
-
setShowAllCurvesOnLegend
public void setShowAllCurvesOnLegend(boolean b) -
isLegendItemsVisible
public boolean isLegendItemsVisible() -
setLegendItemsVisible
public void setLegendItemsVisible(boolean b) -
isLineVisible
public boolean isLineVisible() -
setLineVisible
public void setLineVisible(boolean visible) -
setLineColor
-
setFillColor
-
setColor
-
setProperties
-
getProperties
-
getG2dObject
-
getLine
-
toString
-
editLineProperties
public void editLineProperties()edit the first line in the Glyph. -
editLineProperties
public void editLineProperties(int curveNum) edit the curve in the Glyph specified by curveNum- Parameters:
curveNum- the curve number.
-
getOKListeners
-
createPopupMenu
protected void createPopupMenu() -
getLine
Returns a references to a line. If the index is to small or too large then null is returned.- Parameters:
index-- Returns:
-
getCurveCount
public int getCurveCount() -
getCurveName
-
drawLegendPict
-
getLegendPictSize
-
isCurveDrawn
public boolean isCurveDrawn(int curveNumber) is a curve drawn or not. Sub-classes need to implement this functionality- Parameters:
curveNumber-- Returns:
- true if the curve should be drawn.
-
setCurveDrawn
public void setCurveDrawn(int curveNumber, boolean drawn) set a curve drawn or not. Sub-classes need to implement this functionality- Parameters:
curveNumber-drawn-
-