public class GlobalRenderInformation extends RenderInformationBase
GlobalRenderInformation
is the render information stored in the ListOfLayouts
. GlobalRenderInformation
can be
applied to all layouts.
GlobalRenderInformation
is one of the subclasses of RenderInformationBase
. A global render information object
contains color definitions, gradient definitions and line endings as defined in RenderInformationBase
.
Additionally it has a list of global styles which specifies type and role based render information.
Global render information can not specify id based render information because it does not belong to a certain layout
but it belongs to all layouts.
Constructor and Description |
---|
GlobalRenderInformation()
Creates a new
GlobalRenderInformation object with the given SBML level
and SBML version. |
GlobalRenderInformation(long level)
Creates a new
GlobalRenderInformation object with the given SBML level
and SBML version. |
GlobalRenderInformation(long level,
long version)
Creates a new
GlobalRenderInformation object with the given SBML level
and SBML version. |
GlobalRenderInformation(long level,
long version,
long pkgVersion)
Creates a new
GlobalRenderInformation object with the given SBML level
and SBML version. |
GlobalRenderInformation(RenderPkgNamespaces renderns)
Creates a new
GlobalRenderInformation object with the given SBMLNamespaces . |
GlobalRenderInformation(RenderPkgNamespaces renderns,
String id)
Constructor which creates a
GlobalRenderInformation with the given id
and all lists empty. |
Modifier and Type | Method and Description |
---|---|
int |
addStyle(GlobalStyle pStyle)
Adds a copy of a
GlobalStyle to the GlobalRenderInformation object. |
GlobalRenderInformation |
cloneObject()
Creates and returns a deep copy of this
GlobalRenderInformation object. |
void |
connectToChild()   |
GlobalStyle |
createStyle(String id)
Creates a new
GlobalStyle object. |
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getElementName()
Returns the XML element name of this object, which for
GlobalRenderInformation , is always 'renderInformation'. |
ListOfGlobalStyles |
getListOfStyles()
Returns a pointer to the
ListOfGlobalStyles object. |
long |
getNumStyles()
Returns the number of styles.
|
GlobalStyle |
getStyle(long i)
Returns a pointer to the style with the given index.
|
GlobalStyle |
getStyle(String id)
Returns a pointer to the style with the given
id . |
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
void |
parseXML(XMLNode node)
Parses the xml information in the given node and sets the attributes.
|
XMLNode |
toXML()
Creates an
XMLNode object from this GlobalRenderInformation object. |
addColorDefinition, addGradientDefinition, addLineEnding, createColorDefinition, createLinearGradientDefinition, createLineEnding, createRadialGradientDefinition, getBackgroundColor, getColorDefinition, getColorDefinition, getGradientDefinition, getGradientDefinition, getId, getLineEnding, getLineEnding, getListOfColorDefinitions, getListOfGradientDefinitions, getListOfLineEndings, getName, getNumColorDefinitions, getNumGradientDefinitions, getNumLineEndings, getProgramName, getProgramVersion, getReferenceRenderInformationId, isSetId, isSetName, removeColorDefinition, removeGradientDefinition, removeLineEnding, setBackgroundColor, setId, setName, setProgramName, setProgramVersion, setReferenceRenderInformationId, unsetId, unsetName
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserData
public GlobalRenderInformation(long level, long version, long pkgVersion) throws SBMLConstructorException
GlobalRenderInformation
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public GlobalRenderInformation(long level, long version) throws SBMLConstructorException
GlobalRenderInformation
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public GlobalRenderInformation(long level) throws SBMLConstructorException
GlobalRenderInformation
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public GlobalRenderInformation() throws SBMLConstructorException
GlobalRenderInformation
object with the given SBML level
and SBML version.
level
- SBML level of the new objectlevel
- SBML version of the new objectSBMLConstructorException
public GlobalRenderInformation(RenderPkgNamespaces renderns) throws SBMLConstructorException
GlobalRenderInformation
object with the given SBMLNamespaces
.
sbmlns
- The SBML namespace for the object.SBMLConstructorException
public GlobalRenderInformation(RenderPkgNamespaces renderns, String id) throws SBMLConstructorException
GlobalRenderInformation
with the given id
and all lists empty.
id
- the new id for the GlobalRenderInformation
.
This constructor is deprecated. The new libsbml API only has
constructors which take the SBML level and version or one that takes
an SBMLNamespaces
object.
SBMLConstructorException
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 GlobalRenderInformation.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 GlobalRenderInformation.delete()
themselves.
delete
 in class RenderInformationBase
public void parseXML(XMLNode node)
node
- the XMLNode
object reference that describes the GlobalRenderInformation
object to be instantiated.public long getNumStyles()
public ListOfGlobalStyles getListOfStyles()
ListOfGlobalStyles
object.
public GlobalStyle getStyle(long i)
null
is returned.
i
- index of the GlobalStyle
to be returned.
public GlobalStyle getStyle(String id)
id
.
If the id is invalid, null
is returned.
id
- id of the GlobalStyle
to be returned.
id
or null
public GlobalStyle createStyle(String id)
GlobalStyle
object. The object is added to and owned
by the GlobalRenderInformation
object.
id
- for the new style.
public int addStyle(GlobalStyle pStyle)
GlobalStyle
to the GlobalRenderInformation
object.
The style is only added if it is valid, i.e. it has to have an id and
a valid group.
pointer
- to the global style object to be added.
#createStyle()
GlobalRenderInformation
. Changes made to the original object
instance (such as resetting attribute values) will not affect the
instance in the GlobalRenderInformation
. In addition, the caller should make
sure to free the original object if it is no longer being used, or
else a memory leak will result. Please see GlobalRenderInformation#createStyle()
for a method that does not lead to these issues.
public String getElementName()
GlobalRenderInformation
, is always 'renderInformation'.
getElementName
 in class SBase
'renderInformation'.
public GlobalRenderInformation cloneObject()
GlobalRenderInformation
object.
cloneObject
 in class SBase
GlobalRenderInformation
.public int getTypeCode()
LibSBML attaches an
identifying code to every kind of SBML object. These are known as
SBML type codes. In other languages, the set of type codes
is stored in an enumeration in the Java language interface for
libSBML, the type codes are defined as static integer constants in
interface class libsbmlConstants
. The names of the type codes
all begin with the characters SBML_.
getTypeCode
 in class SBase
SBML_UNKNOWN
(default).
GlobalRenderInformation.getElementName()
public XMLNode toXML()
XMLNode
object from this GlobalRenderInformation
object.
XMLNode
with the XML representation for the
GlobalRenderInformation
object.public void connectToChild()
connectToChild
 in class RenderInformationBase