public abstract class Marker extends java.lang.Object implements XMLable
限定符和类型 | 字段和说明 |
---|---|
protected Background |
background |
protected static double |
GAP_SIZE |
protected Background |
plotBackground |
static ColorBackground |
SCATTER_PLOT_BACKROUNG |
protected double |
size |
static java.lang.String |
XML_TAG |
构造器和说明 |
---|
Marker()
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone()
Clone.
|
static Marker |
createMarker(MarkerType markerType) |
boolean |
equals(java.lang.Object obj) |
Background |
getBackground() |
abstract java.lang.String |
getMarkerType()
kunsnat: 用于js的初始化, 返回JSON类型
|
double |
getSize() |
boolean |
isNullMarker()
是否是nullmarker
|
void |
paint(java.awt.Graphics2D g2d,
double x,
double y)
以(x, y)坐标为中心 绘制图像Paint the marker.
|
protected abstract void |
paintMarker(java.awt.Graphics2D g2d,
double x,
double y) |
protected void |
paintPlotBackground(Background plotBackground,
java.awt.Graphics2D g2d,
java.awt.Shape shape)
画点的背景色时,不考虑透明度
|
void |
readXML(XMLableReader reader)
读取子节点,应该会被XMLableReader.readXMLObject()调用多次
|
void |
setBackground(Background background) |
void |
setPlotBackground(Background colorBackGround) |
void |
setSize(double size) |
JSONObject |
toJSONObject(Repository repo)
转为json数据
|
void |
writeXML(XMLPrintWriter writer)
输出xml
|
public static final java.lang.String XML_TAG
protected double size
protected static final double GAP_SIZE
public static final ColorBackground SCATTER_PLOT_BACKROUNG
protected Background background
protected Background plotBackground
public double getSize()
public void setSize(double size)
public void setBackground(Background background)
public void setPlotBackground(Background colorBackGround)
public Background getBackground()
public void paint(java.awt.Graphics2D g2d, double x, double y)
g2d
- 用于绘制的上下文x
- x坐标y
- y坐标protected abstract void paintMarker(java.awt.Graphics2D g2d, double x, double y)
protected void paintPlotBackground(Background plotBackground, java.awt.Graphics2D g2d, java.awt.Shape shape)
plotBackground
- g2d
- shape
- public void readXML(XMLableReader reader)
XMLReadable
readXML
在接口中 XMLReadable
reader
- XML读取对象XMLableReader
public void writeXML(XMLPrintWriter writer)
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
在接口中 FCloneable
clone
在类中 java.lang.Object
java.lang.CloneNotSupportedException
- 如果克隆失败则抛出此异常public JSONObject toJSONObject(Repository repo) throws JSONException
repo
- 请求JSONException
- 抛错public abstract java.lang.String getMarkerType()
public boolean isNullMarker()
public static Marker createMarker(MarkerType markerType)