📄 annotationattributes.java
字号:
/**
* Get whether the callout width should adjust to follow the wrapped text bounding rectangle width,
* which may be smaller or larger then the preferred size depending on the text. Can be one
* of {@link Annotation}.SIZE_FIXED or SIZE_FIT_TEXT.
* @return whether the callout width is adjusted to follow the text bounding rectangle width.
*/
public String getAdjustWidthToText()
{
return this.adjustWidthToText != null ? this.adjustWidthToText : defaultAttributes.getAdjustWidthToText();
}
/**
* Set whether the callout width should adjust to follow the wrapped text bounding rectangle width
* which may be smaller or larger then the preferred size depending on the text. Can be one
* of {@link Annotation#SIZE_FIXED} (default) or {@link Annotation#SIZE_FIT_TEXT}.
* Setting this attribute to <code>SIZE_FIT_TEXT</code> would have the callout drawn at its exact width (see setSize()).
* @param state whether the callout width should adjust to follow the text bounding rectangle width.
*/
public void setAdjustWidthToText(String state)
{
this.adjustWidthToText = state;
}
/**
* Get the callout displacement offset in pixels from the globe Position or screen point at which it is associated.
* When the callout has a leader (see setLeader(String leader)), it will lead to the original point.
* In the actual implementation, the callout is drawn above its associated point and the leader connects at
* the bottom of the frame, in the middle. Positive X increases toward the right and positive Y in the up direction.
* @return the callout displacement offset in pixels
*/
public Point getDrawOffset()
{
return this.drawOffset != null ? this.drawOffset : defaultAttributes.getDrawOffset();
}
/**
* Set the callout displacement offset in pixels from the globe Position or screen point at which it is associated.
* When the callout has a leader (see setLeader(String leader)), it will lead to the original point.
* In the actual implementation, the callout is drawn above its associated point and the leader connects at
* the bottom of the frame, in the middle. Positive X increases toward the right and positive Y in the up direction.
* Set to <code>null</code> to use the default offset.
* @param offset the callout displacement offset in pixels
*/
public void setDrawOffset(Point offset)
{
this.drawOffset = offset;
}
/**
* Get the callout <code>Insets</code> dimensions in pixels. The text is drawn inside the callout frame
* while keeping a distance from the callout border defined in the Insets.
* @return the callout <code>Insets</code> dimensions in pixels.
*/
public Insets getInsets()
{
return this.insets != null ? this.insets : defaultAttributes.getInsets();
}
/**
* Set the callout <code>Insets</code> dimensions in pixels. The text will be drawn inside the callout frame
* while keeping a distance from the callout border defined in the Insets. Set to <code>null</code> to use the
* default Insets.
* @param insets the callout <code>Insets</code> dimensions in pixels.
*/
public void setInsets(Insets insets)
{
this.insets = insets;
}
/**
* Get the callout border line width. A value of <code>zero</code> means no border is being drawn.
* @return the callout border line width.
*/
public double getBorderWidth()
{
return this.borderWidth >= 0 ? this.borderWidth : defaultAttributes.getBorderWidth();
}
/**
* Set the callout border line width. A value of <code>zero</code> means no border
* will is drawn. Set to minus one (<code>-1</code>) to use the default value.
* @param width the callout border line width.
*/
public void setBorderWidth(double width)
{
this.borderWidth = width;
}
/**
* Get the stipple factor used for the callout border line. A value of <code>zero</code> (default) means no pattern
* is applied.
* @return the stipple factor used for the callout border line.
*/
public int getBorderStippleFactor()
{
return this.borderStippleFactor >= 0 ? this.borderStippleFactor : defaultAttributes.getBorderStippleFactor();
}
/**
* Set the stipple factor used for the callout border line. A value of <code>zero</code> (default) means no pattern
* will be applied. Set to minus one (<code>-1</code>) to use the default value.
* @param factor the stipple factor used for the callout border line.
*/
public void setBorderStippleFactor(int factor)
{
this.borderStippleFactor = factor;
}
/**
* Get the stipple pattern used for the callout border line.
* @return the stipple pattern used for the callout border line.
*/
public short getBorderStipplePattern()
{
return this.borderStipplePattern != 0x0000 ? this.borderStipplePattern : defaultAttributes.getBorderStipplePattern();
}
/**
* Set the stipple pattern used for the callout border line. Set to <code>0x0000</code> to use the default value.
* @param pattern the stipple pattern used for the callout border line.
*/
public void setBorderStipplePattern(short pattern)
{
this.borderStipplePattern = pattern;
}
/**
* Get the <code>GL</code> antialias hint used for rendering the callout border line. Can be one of
* {@link Annotation}.ANTIALIAS_DONT_CARE, ANTIALIAS_FASTEST (default) or ANTIALIAS_NICEST.
* @return the <code>GL</code> antialias hint used for rendering the callout border line.
*/
protected int getAntiAliasHint()
{
return this.antiAliasHint >=0 ? this.antiAliasHint : defaultAttributes.getAntiAliasHint();
}
/**
* Set the <code>GL</code> antialias hint used for rendering the callout border line. Can be one of
* {@link Annotation}.ANTIALIAS_DONT_CARE, ANTIALIAS_FASTEST (default) or ANTIALIAS_NICEST.
* Set to minus one (<code>-1</code>) to use the default value.
* @param hint the <code>GL</code> antialias hint used for rendering the callout border line.
*/
protected void setAntiAliasHint(int hint)
{
this.antiAliasHint = hint;
}
/**
* Get whether the annotation is visible and should be rendered.
* @return true if the annotation is visible and should be rendered.
*/
public boolean isVisible()
{
return isVisible;
}
/**
* Set whether the annotation is visible and should be rendered.
* @param visible true if the annotation is visible and should be rendered.
*/
public void setVisible(boolean visible)
{
isVisible = visible;
}
/**
* Get the <code>Font</code> used for text rendering.
* @return the <code>Font</code> used for text rendering.
*/
public Font getFont()
{
return this.font != null ? this.font : defaultAttributes.getFont();
}
/**
* Set the <code>Font</code> used for text rendering. Set to <code>null</code> to use the default value.
* @param font the <code>Font</code> used for text rendering.
*/
public void setFont(Font font)
{
this.font = font;
}
/**
* Get the text alignement. Can be one of {@link MultiLineTextRenderer}.ALIGN_LEFT (default), ALIGN_CENTER
* or ALIGN_RIGHT.
* @return align the text alignement. Can be one of MultiLineTextRenderer.ALIGN_LEFT, ALIGN_CENTER or ALIGN_RIGHT.
*/
public int getTextAlign()
{
return this.textAlign >= 0 ? this.textAlign : defaultAttributes.getTextAlign();
}
/**
* Set the text alignement. Can be one of {@link MultiLineTextRenderer}.ALIGN_LEFT (default), ALIGN_CENTER
* or ALIGN_RIGHT. Set to <code>null</code> to use the default value.
* @param align the text alignement.
*/
public void setTextAlign(int align)
{
this.textAlign = align;
}
/**
* Get the text <code>Color</code>.
* @return the text <code>Color</code>.
*/
public Color getTextColor()
{
return this.textColor != null ? this.textColor : defaultAttributes.getTextColor();
}
/**
* Set the text <code>Color</code>. Set to <code>null</code> to use the default value.
* @param color the text <code>Color</code>.
*/
public void setTextColor(Color color)
{
this.textColor = color;
}
/**
* Get the callout background <code>Color</code>.
* @return the callout background <code>Color</code>.
*/
public Color getBackgroundColor()
{
return this.backgroundColor != null ? this.backgroundColor : defaultAttributes.getBackgroundColor();
}
/**
* Set the callout background <code>Color</code>. Set to <code>null</code> to use the default value.
* @param color the callout background <code>Color</code>.
*/
public void setBackgroundColor(Color color)
{
this.backgroundColor = color;
}
/**
* Get the callout border <code>Color</code>.
* @return the callout border <code>Color</code>.
*/
public Color getBorderColor()
{
return this.borderColor != null ? this.borderColor : defaultAttributes.getBorderColor();
}
/**
* Set the callout border <code>Color</code>. Set to <code>null</code> to use the default value.
* @param color the callout border <code>Color</code>.
*/
public void setBorderColor(Color color)
{
this.borderColor = color;
}
/**
* Get the background image source. Can be a <code>String</code> providing the path to a local image,
* a {@link java.awt.image.BufferedImage} or <code>null</code>.
* @return the background image source.
*/
public Object getImageSource()
{
return this.imageSource;
}
/**
* Set the background image source. Can be a <code>String</code> providing the path to a local image
* or a {@link java.awt.image.BufferedImage}. Set to null for no background image rendering.
* @param imageSource the background image source.
*/
public void setImageSource(Object imageSource)
{
this.imageSource = imageSource;
}
/**
* Get the background image scaling factor.
* @return the background image scaling factor.
*/
public double getImageScale()
{
return this.imageScale >= 0 ? this.imageScale : defaultAttributes.getImageScale();
}
/**
* Set the background image scaling factor. Set to minus one (<code>-1</code>) to use the default value.
* @param scale the background image scaling factor.
*/
public void setImageScale(double scale)
{
this.imageScale = scale;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -