public class GraphicAttributes extends DrawingAttributes implements java.awt.event.ActionListener, java.io.Serializable, OMGraphicConstants
DrawingAttributes.Builder, DrawingAttributes.DrawingAttributesGUIButton
Modifier and Type | Field and Description |
---|---|
static GraphicAttributes |
DEFAULT |
protected boolean |
enableLineTypeChoice
Flag to disable choice of line type, from an external source.
|
protected int |
lineType
The line type of a graphic, defaults to LINETYPE_STRAIGHT.
|
static java.lang.String |
lineTypeProperty
The name of the property that holds the line type of the graphic.
|
protected int |
renderType
The rendertype of a graphic.
|
static java.lang.String |
renderTypeProperty
The name of the property that holds the render type of the graphic.
|
alwaysSetTextToBlack, baseScale, baseScaleProperty, bse, capProperty, dashPatternProperty, dashPhaseProperty, defaultDashLength, defaultDashPhase, defaultFillPaintString, defaultLinePaintString, defaultLineWidth, defaultMattingPaintString, defaultSelectPaintString, enableFillPaintChoice, FillColorCommand, fillColorItem, fillPaint, fillPaintProperty, fillPattern, fillPatternProperty, fPattern, icon_height, icon_width, joinProperty, LineColorCommand, lineColorItem, lineMenuAdditions, linePaint, linePaintProperty, lineWidthProperty, logger, matted, MattedCommand, mattedEnabledItem, mattedProperty, MattingColorCommand, mattingColorItem, mattingPaint, mattingPaintProperty, miterLimitProperty, NONE, orientation, pointOval, PointOvalProperty, pointRadius, PointRadiusProperty, propertyChangeSupport, propertyPrefix, SelectColorCommand, selectColorItem, selectPaint, selectPaintProperty, stroke
ADD_GRAPHIC_MASK, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
GraphicAttributes()
Create a GraphicAttributes with the default settings - clear fill paint
and pattern, sold black edge line of width 1.
|
GraphicAttributes(java.util.Properties props)
Create the GraphicAttributes and call init without a prefix for the
properties.
|
GraphicAttributes(java.lang.String prefix,
java.util.Properties props)
Create the GraphicAttributes and call init with a prefix for the
properties.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Shallow clone.
|
boolean |
getEnableLineTypeChoice() |
static GraphicAttributes |
getGADefaultClone()
If you want to get a DEFAULT DrawingAttributes object that you may
modify, get your own copy.
|
int |
getLineType()
Get the lineType.
|
javax.swing.JMenu |
getLineTypeMenu() |
int |
getRenderType()
Get the renderType.
|
void |
setEnableLineTypeChoice(boolean value)
Method should be called on this GraphicAttributes object if the OMGraphic
type doesn't support line types to disable the choice from the line menu.
|
void |
setFrom(OMGraphic graphic)
Set the GraphicAttributes parameters based on the current settings of an
OMGraphic.
|
void |
setFrom(OMGraphic graphic,
boolean resetGUI)
Set the GraphicAttributes parameters based on the current settings of an
OMGraphic.
|
void |
setLineType(int lt)
Set the line type.
|
protected void |
setPreStrokeMenuOptions(javax.swing.JPopupMenu popup) |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
PropertyConsumer method.
|
void |
setRenderType(int rt)
Set the render type.
|
void |
setTo(GraphicAttributes clone) |
void |
setTo(OMGraphic graphic)
Set all the attributes for the graphic that are contained within this
GraphicAttributes class.
|
void |
setTo(OMGraphic graphic,
boolean resetGUI)
Set all the attributes for the graphic that are contained within this
GraphicAttributes class.
|
actionPerformed, calculateTextColor, cloneBasicStroke, equals, getALineButton, getBaseScale, getBasicStrokeEditor, getColorAndLineMenu, getColorMenu, getDefaultClone, getDrawingAttributesIcon, getFillPaint, getFillPaintForScale, getFillPattern, getGradientPaintForShape, getGUI, getIconForPaint, getInitPropertiesOrder, getLineMenuAdditions, getLinePaint, getLock, getMattedIcon, getMattingIconForPaint, getMattingPaint, getNewPaint, getOrientation, getPaletteIcon, getPointRadius, getProperties, getPropertyChangeSupport, getPropertyInfo, getPropertyPrefix, getSelectPaint, getStroke, getStrokeForScale, hashCode, init, init, isClear, isEnableFillPaintChoice, isMatted, isPointOval, normalizeOn128, propertyChange, releaseLock, render, render, resetGUI, setBaseScale, setEnableFillPaintChoice, setFillPaint, setFillPattern, setLineMenuAdditions, setLinePaint, setMatted, setMattingPaint, setOMGraphicAttributesForScale, setOMGraphicEdgeAttributes, setOMGraphicEdgeAttributesForScale, setOrientation, setPointOval, setPointRadius, setPostStrokeMenuOptions, setPreStrokeMenuOptions, setProperties, setPropertyChangeSupport, setPropertyPrefix, setSelectPaint, setStroke, setStrokeMenuOptions, setTo, sTransfer, toString, transfer
public static final java.lang.String lineTypeProperty
public static final java.lang.String renderTypeProperty
protected int lineType
protected int renderType
protected boolean enableLineTypeChoice
public static final GraphicAttributes DEFAULT
public GraphicAttributes()
public GraphicAttributes(java.util.Properties props)
props
- the Properties to look in.public GraphicAttributes(java.lang.String prefix, java.util.Properties props)
prefix
- the prefix marker to use for a property, like
prefix.propertyName. The period is added in this function.props
- the Properties to look in.public static GraphicAttributes getGADefaultClone()
public void setProperties(java.lang.String prefix, java.util.Properties props)
setProperties
in interface PropertyConsumer
setProperties
in class DrawingAttributes
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.lang.Object clone()
DrawingAttributes
clone
in class DrawingAttributes
public void setTo(GraphicAttributes clone)
public int getLineType()
public void setLineType(int lt)
public int getRenderType()
public void setRenderType(int rt)
public void setFrom(OMGraphic graphic)
setFrom
in class DrawingAttributes
public void setFrom(OMGraphic graphic, boolean resetGUI)
setFrom
in class DrawingAttributes
graphic
- OMGraphic to gather settings from.resetGUI
- flag to cause GraphicAttribute GUI reset.public void setTo(OMGraphic graphic)
setTo
in class DrawingAttributes
graphic
- OMGraphic.public void setTo(OMGraphic graphic, boolean resetGUI)
setTo
in class DrawingAttributes
graphic
- OMGraphic.resetGUI
- reset the GraphicAttributes GUI if desired.public void setEnableLineTypeChoice(boolean value)
public boolean getEnableLineTypeChoice()
protected void setPreStrokeMenuOptions(javax.swing.JPopupMenu popup)
public javax.swing.JMenu getLineTypeMenu()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details