类 Graphic
- java.lang.Object
-
- org.meteoinfo.geometry.graphic.Artist
-
- org.meteoinfo.geometry.graphic.Graphic
-
- 直接已知子类:
ChartGraphic,GraphicCollection,ImageGraphic,Line2DGraphic,Point2DGraphic,PolygonGraphic
public class Graphic extends Artist
Graphic class- 作者:
- Yaqiang Wang
-
-
字段概要
字段 修饰符和类型 字段 说明 protected GraphicclipGraphicprotected GeneralPathclipPathprotected inthandleprotected ColorBreaklegendprotected Shapeshapeprotected Transformtransform
-
构造器概要
构造器 构造器 说明 Graphic()ConstructorGraphic(Shape shape, ColorBreak legend)Constructor
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidaddLegend(Document doc, Element parent, ColorBreak aLegend, ShapeTypes shapeType)Add legend to XML documentprotected voidaddShape(Document doc, Element parent, Shape aShape)Add shape to XML documentvoiddoTransform()Transform the graphicvoidexportToXML(Document doc, Element parent)Export to XML documentGraphicgetClipGraphic()Get clip graphicGeneralPathgetClipPath()Get clip pathExtentgetExtent()Get extentGraphicgetGraphicN(int idx)Get Graphic by indexintgetHandle()Get handleColorBreakgetLegend()Get legendintgetNumGraphics()Get graphics numberResizeAbilitygetResizeAbility()Get resize abilityShapegetShape()Get shapeShapeTypesgetShapeType()Get shape typeTransformgetTransform()Get transformvoidimportFromXML(Element graphicNode)Import from xml nodebooleanisClip()Has clip path or notbooleanisCollection()Get if is GraphicCollectionbooleanisSingleLegend()Get is single legend or notprotected ColorBreakloadLegend(Node legendNode, ShapeTypes shapeType)protected ShapeloadShape(Node shapeNode)voidsetClipGraphic(Graphic graphic)Set clip graphicvoidsetClipPath(GeneralPath clipPath)Set clip pathvoidsetClipPath(Graphic graphic)Set clip pathvoidsetExtent(Extent value)Set extentvoidsetHandle(int value)Set handlevoidsetLegend(ColorBreak legend)Set legendvoidsetShape(Shape aShape)Set shapevoidsetTransform(Transform value)Set transformvoidverticeAddUpdate(int vIdx, PointD point)Vertice edited updatevoidverticeMoveUpdate(int vIdx, double newX, double newY)Vertice edited updatevoidverticeRemoveUpdate(int vIdx)Vertice edited update-
从类继承的方法 org.meteoinfo.geometry.graphic.Artist
isAntiAlias, isVisible, setAntiAlias, setVisible
-
-
-
-
字段详细资料
-
shape
protected Shape shape
-
legend
protected ColorBreak legend
-
clipPath
protected GeneralPath clipPath
-
clipGraphic
protected Graphic clipGraphic
-
transform
protected Transform transform
-
handle
protected int handle
-
-
构造器详细资料
-
Graphic
public Graphic()
Constructor
-
Graphic
public Graphic(Shape shape, ColorBreak legend)
Constructor- 参数:
shape- a shapelegend- a legend
-
-
方法详细资料
-
getShape
public Shape getShape()
Get shape- 返回:
- Shape
-
setShape
public void setShape(Shape aShape)
Set shape- 参数:
aShape- a shape
-
getLegend
public ColorBreak getLegend()
Get legend- 返回:
- Legend
-
setLegend
public void setLegend(ColorBreak legend)
Set legend- 参数:
legend- Legend
-
getTransform
public Transform getTransform()
Get transform- 返回:
- Transform
-
setTransform
public void setTransform(Transform value)
Set transform- 参数:
value- Transform
-
getClipPath
public GeneralPath getClipPath()
Get clip path- 返回:
- Clip path
-
isClip
public boolean isClip()
Has clip path or not- 返回:
- Has clip path or not
-
setClipPath
public void setClipPath(GeneralPath clipPath)
Set clip path- 参数:
clipPath- Clip path
-
setClipPath
public void setClipPath(Graphic graphic)
Set clip path- 参数:
graphic- Clip path
-
getClipGraphic
public Graphic getClipGraphic()
Get clip graphic- 返回:
- Clip graphic
-
setClipGraphic
public void setClipGraphic(Graphic graphic)
Set clip graphic- 参数:
graphic- Clip graphic
-
getResizeAbility
public ResizeAbility getResizeAbility()
Get resize ability- 返回:
- Resize ability
-
getHandle
public int getHandle()
Get handle- 返回:
- Handle
-
setHandle
public void setHandle(int value)
Set handle- 参数:
value- Handle
-
getExtent
public Extent getExtent()
Get extent- 返回:
- The extent
-
setExtent
public void setExtent(Extent value)
Set extent- 参数:
value- The extent
-
isSingleLegend
public boolean isSingleLegend()
Get is single legend or not- 返回:
- Boolean
-
isCollection
public boolean isCollection()
Get if is GraphicCollection- 返回:
- Boolean
-
getShapeType
public ShapeTypes getShapeType()
Get shape type- 返回:
- The shape type
-
getNumGraphics
public int getNumGraphics()
Get graphics number- 返回:
- 1
-
getGraphicN
public Graphic getGraphicN(int idx)
Get Graphic by index- 参数:
idx- Index- 返回:
- Graphic
-
doTransform
public void doTransform()
Transform the graphic
-
verticeMoveUpdate
public void verticeMoveUpdate(int vIdx, double newX, double newY)Vertice edited update- 参数:
vIdx- Vertice indexnewX- New XnewY- New Y
-
verticeAddUpdate
public void verticeAddUpdate(int vIdx, PointD point)Vertice edited update- 参数:
vIdx- Vertice indexpoint- The add vertice
-
verticeRemoveUpdate
public void verticeRemoveUpdate(int vIdx)
Vertice edited update- 参数:
vIdx- Vertice index
-
exportToXML
public void exportToXML(Document doc, Element parent)
Export to XML document- 参数:
doc- XML documentparent- Parent XML element
-
addShape
protected void addShape(Document doc, Element parent, Shape aShape)
Add shape to XML document- 参数:
doc- XML documentparent- Parent XML elementaShape- The shape
-
addLegend
protected void addLegend(Document doc, Element parent, ColorBreak aLegend, ShapeTypes shapeType)
Add legend to XML document- 参数:
doc- XML documentparent- Parent XML elementaLegend- The legendshapeType- The shape type
-
importFromXML
public void importFromXML(Element graphicNode)
Import from xml node- 参数:
graphicNode- Graphic xml node
-
loadLegend
protected ColorBreak loadLegend(Node legendNode, ShapeTypes shapeType)
-
-