public class GraphicalPrimitive2D extends GraphicalPrimitive1D
The GraphicalPrimitive2D
class implements attributes and methods necessary for 2D objects
like rectangles, polygons or ellipses. The attributes that are implemented are a fill color
and a fill rule that specifies how the fill color is applied.
The GraphicalPrimitive2D
class is derived from GraphicalPrimitive1D
and inherits all its methods
and attributes.
Modifier and Type | Field and Description |
---|---|
static int |
EVENODD   |
static int |
INHERIT   |
static int |
NONZERO   |
static int |
UNSET   |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getFillColor()
Returns the fill color.
|
int |
getFillRule()
Returns the fill rule.
|
boolean |
isSetFill()
Returns true if the fill attribute is set or false otherwise.
|
boolean |
isSetFillColor()
Returns true if the fill attribute is set or false otherwise.
|
boolean |
isSetFillRule()
Returns true if the fill rule attribute is set or false otherwise.
|
void |
setFillColor(java.lang.String color)
Set fill color to the id of a color definition, the id of a gradient
definition or a color value string.
|
void |
setFillRule(int rule)
Sets the fill rule.
|
addDash, clearDashes, getDashByIndex, getId, getNumDashes, getStroke, getStrokeWidth, insertDash, isSetDashArray, isSetId, isSetStroke, isSetStrokeWidth, removeDash, setDashByIndex, setId, setStroke, setStrokeWidth, toXML, unsetId
getIdentityMatrix2D, getMatrix2D, setMatrix, setMatrix2D
getIdentityMatrix, getMatrix, isSetMatrix
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, cloneObject, connectToChild, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, getElementName, getIdAttribute, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getName, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getObjectVersion, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getTypeCode, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetIdAttribute, isSetMetaId, isSetModelHistory, isSetName, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setIdAttribute, setMetaId, setModelHistory, setName, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetIdAttribute, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public static final int UNSET
public static final int NONZERO
public static final int EVENODD
public static final int INHERIT
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the GraphicalPrimitive2D.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke GraphicalPrimitive2D.delete()
themselves.
delete
 in class GraphicalPrimitive1D
public void setFillColor(java.lang.String color)
color
- the id of a color deifnition or a gradient or a color value string.public void setFillRule(int rule)
If the fill rule for an object is unset, it default to INHERIT, which means that it inherits the attribute from it's parent group. The topmost group in an object hierarchy has a default value for this attribute which is GraphicalPrimitive2D.NONZERO.
For more details please consult the render extension specification.
rule
- the fill rule to be set.public java.lang.String getFillColor()
public int getFillRule()
public boolean isSetFill()
This function is deprecated, please use isSetFillColor instead.
public boolean isSetFillColor()
public boolean isSetFillRule()