public class GraphStyle extends java.lang.Object implements MergeableXML, java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
a_effect |
protected static java.lang.String |
a_effectUsed |
protected static java.lang.String |
a_fillColor |
protected static java.lang.String |
a_fillColorUsed |
protected static java.lang.String |
a_markerShape |
protected static java.lang.String |
a_markerShapeUsed |
protected static java.lang.String |
a_markerVisible |
protected static java.lang.String |
a_markerVisibleUsed |
protected static java.lang.String |
GRAPH_STYLE_NAME |
protected ErrorHandler |
m_eh |
protected java.awt.Color |
m_fillColor |
protected CommonGraph |
m_graph |
protected int |
m_markerShape |
protected boolean |
m_markerVisible |
protected java.util.BitSet |
m_propertyUsedFlags |
protected static int |
NumberOfPropertyBits |
protected static java.lang.String |
se_gradient |
protected static java.lang.String |
se_none |
Constructor and Description |
---|
GraphStyle()
Constructor
|
GraphStyle(CommonGraph graph)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones this object.
|
CommonGraph |
getCommonGraph() |
int |
getEffect()
Gets the effect applied on the marker
This is enabled only for bubble
graphs for now and can be used to conditionally
make the bubble appear to be flat or 3D.
|
ErrorHandler |
getErrorHandler() |
java.awt.Color |
getFillColor()
Retrieves the color for the marker.
|
int |
getMarkerShape()
Retrieves the shape of the marker.
|
java.util.BitSet |
getPropertyUsedFlags() |
oracle.dss.util.xml.ObjectNode |
getXML(boolean allProperties,
boolean emptyElement)
Retrieves XML that represents properties and their values in the form
of and
ObjectNode . |
boolean |
isAnythingOverridden()
Specifies whether any property has been explicitly set.
|
boolean |
isEffectUsed() |
boolean |
isFillColorUsed()
Indicates whether the
fillColor property has been explicitly set. |
boolean |
isMarkerShapeUsed()
Indicates whether the
MarkerVisible property has been explicitly set. |
boolean |
isMarkerVisible()
Retrieves the visibility of the marker.
|
boolean |
isMarkerVisibleUsed()
Indicates whether the
MarkerVisible property has been explicitly set. |
void |
merge(Mergeable style)
Merges the specified object with this object.
|
void |
setCommonGraph(CommonGraph graph) |
void |
setEffect(int effect)
Sets the effect which can be used to set a gradient
on the markers/bubbles .This is enabled only for bubble
graphs for now and can be used to conditionally
make the bubble appear to be flat or 3D.
|
void |
setEffectUsed(boolean used) |
void |
setErrorHandler(ErrorHandler eh)
Specifies the error handler for this
ViewStyle . |
void |
setFillColor(java.awt.Color color)
Specifies the color for the marker.
|
void |
setFillColorUsed(boolean used)
Specifies whether the
fillColor property has been explicitly set. |
void |
setMarkerShape(int shape)
Specifies the marker shape.
|
void |
setMarkerShapeUsed(boolean used)
Specifies whether the
MarkerShape property has been explicitly set. |
void |
setMarkerVisible(boolean visible)
Specifies the visibility of the marker.
|
void |
setMarkerVisibleUsed(boolean used)
Specifies whether the
MarkerVisible property has been explicitly set. |
void |
setPropertyUsedFlags(java.util.BitSet bs) |
boolean |
setXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset)
Specifies XML that represents properties and values.
|
protected CommonGraph m_graph
protected ErrorHandler m_eh
protected java.awt.Color m_fillColor
protected boolean m_markerVisible
protected int m_markerShape
protected java.util.BitSet m_propertyUsedFlags
protected static int NumberOfPropertyBits
protected static final java.lang.String a_fillColor
protected static final java.lang.String a_markerVisible
protected static final java.lang.String a_markerShape
protected static final java.lang.String a_effect
protected static final java.lang.String a_fillColorUsed
protected static final java.lang.String a_markerVisibleUsed
protected static final java.lang.String a_markerShapeUsed
protected static final java.lang.String a_effectUsed
protected static final java.lang.String GRAPH_STYLE_NAME
protected static final java.lang.String se_none
protected static final java.lang.String se_gradient
public GraphStyle()
public GraphStyle(CommonGraph graph)
public void setFillColor(java.awt.Color color)
color
- The color for the markers.public void setEffect(int effect)
effect
- The effect to be applied which can have two values GraphConstants.SE_NONE
orGraphConstants.SE_GRADIENT
public int getEffect()
public java.awt.Color getFillColor()
public void setMarkerVisible(boolean visible)
visible
- A boolean specifying visibility.public boolean isMarkerVisible()
public void setMarkerShape(int shape)
shape
- An integer representing shape of the marker.BaseGraphComponent#MS_SQUARE
,
BaseGraphComponent#MS_CIRCLE
,
BaseGraphComponent#MS_DIAMOND
,
BaseGraphComponent#MS_PLUS
,
BaseGraphComponent#MS_TRIANGLE_DOWN
,
BaseGraphComponent#MS_TRIANGLE_UP
public int getMarkerShape()
BaseGraphComponent#MS_SQUARE
,
BaseGraphComponent#MS_CIRCLE
,
BaseGraphComponent#MS_DIAMOND
,
BaseGraphComponent#MS_PLUS
,
BaseGraphComponent#MS_TRIANGLE_DOWN
,
BaseGraphComponent#MS_TRIANGLE_UP
public boolean isAnythingOverridden()
isAnythingOverridden
in interface Mergeable
true
- if any property has been set explicitly,
even if the set value is the same as the previous value,
false
if no property has been set.public void merge(Mergeable style)
public java.lang.Object clone()
public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties, boolean emptyElement)
ObjectNode
.getXML
in interface MergeableXML
allProperties
- true
to store all property values in XML,
false
to store only values that are different
from default values.emptyElement
- true
if an empty element needs to be returned
when none of the property values have changed from default.
false
if null should should be returned when
none of the property values have changed from default.
This argument is considered only if
allProperties
is false
.public boolean setXML(oracle.dss.util.xml.ObjectNode node, java.lang.String version, int reset)
MergeableXML
.setXML
in interface MergeableXML
node
- ObjectNode
that has the properties and their values.version
- The XML version.reset
- A constant that indicates how much to reset when XML
is applied. Valid values are listed in the See Also section.true
if XML is properly applied,
false
if the XML cannot be applied.Rule#RESET_NONE
,
Rule#RESET_XML_PROPERTIES
,
Rule#RESET_EVERYTHING
public void setMarkerShapeUsed(boolean used)
MarkerShape
property has been explicitly set.
This method is called by the setMarkerShape
method.
When the parameter value of this method is true
, the property's value will be used in the merging process.used
- true
if the property has been explicitly set, false
if the property has not been explicitly set.public boolean isMarkerShapeUsed()
MarkerVisible
property has been explicitly set.
When the return value of this method is true
, the property's value will be used in the merging process.true
if the property has been explicitly set, if the property has not been explicitly set.public void setMarkerVisibleUsed(boolean used)
MarkerVisible
property has been explicitly set.
This method is called by the setMarkerVisible
method.
When the parameter value of this method is true
, the property's value will be used in the merging process.used
- true
if the property has been explicitly set, false
if the property has not been explicitly set.public boolean isMarkerVisibleUsed()
MarkerVisible
property has been explicitly set.
When the return value of this method is true
, the property's value will be used in the merging process.true
if the property has been explicitly set, if the property has not been explicitly set.public void setFillColorUsed(boolean used)
fillColor
property has been explicitly set.
This method is called by the setFillColor
method.
When the parameter value of this method is true
, the property's value will be used in the merging process.used
- true
if the property has been explicitly set, false
if the property has not been explicitly set.public boolean isFillColorUsed()
fillColor
property has been explicitly set.
When the return value of this method is true
, the property's value will be used in the merging process.true
if the property has been explicitly set, if the property has not been explicitly set.public void setEffectUsed(boolean used)
public boolean isEffectUsed()
public java.util.BitSet getPropertyUsedFlags()
public void setPropertyUsedFlags(java.util.BitSet bs)
public CommonGraph getCommonGraph()
public void setCommonGraph(CommonGraph graph)
public void setErrorHandler(ErrorHandler eh)
ViewStyle
.
When you set this ViewStyle
on a Dataview
,
the error handler currently set on this ViewStyle
will be removed
and the ViewStyle
will use the error handler set on the Dataview
.
For operations that you do before you set the ViewStyle
on a Dataview
, you should call this method to set your
own error handler.
This handler will then be removed and the error handler of the
Dataview
will be used instead.eh
- The error handler to use.public ErrorHandler getErrorHandler()