|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.DrawingAttributes com.bbn.openmap.omGraphics.GraphicAttributes
public class GraphicAttributes
The GraphicAttributes provides an extension to DrawingAttributes by provideing a mechanism for loading and managing different graphic attributes that may be used, such as line type (LINETYPE_STRAIGHT, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, or LINETYPE_UNKNOWN), or render type (RENDERTYPE_XY, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, or RENDERTYPE_UNKNOWN). The DrawingAttributes class fishes out the applicable properties for you, creates the objects needed, and then lets you get those objects when needed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bbn.openmap.omGraphics.DrawingAttributes |
---|
DrawingAttributes.Builder, DrawingAttributes.DrawingAttributesGUIButton |
Field Summary | |
---|---|
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. |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Field Detail |
---|
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
Constructor Detail |
---|
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.Method Detail |
---|
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |