Constructor and Description |
---|
Resource()
Initializes a new instance of the
Resource class. |
Modifier and Type | Method and Description |
---|---|
CustomBrushes |
getCustomBrushes()
Gets a
CustomBrushes object associated with the resource. |
java.lang.String |
getId()
Gets the string identifier of this resource.
|
java.lang.String |
getName()
Gets the name of the resource.
|
java.lang.Object |
getTag()
Gets custom data associated with the resource.
|
void |
loadFrom(org.w3c.dom.Element element,
XmlSerializationContext context)
Loads resource data from an XML document.
|
void |
loadFrom(JsonObject obj,
JsonSerializationContext context)
Loads the resource from a JSON object.
|
void |
saveTo(org.w3c.dom.Element element,
XmlSerializationContext context)
Saves the resource data to an XML document.
|
void |
saveTo(JsonObject obj,
JsonSerializationContext context)
Saves the resource as a JSON object.
|
void |
setCustomBrushes(CustomBrushes value)
Sets a
CustomBrushes object associated with the resource. |
void |
setId(java.lang.String value)
Sets the string identifier of this resource.
|
void |
setName(java.lang.String value)
Sets the name of the resource.
|
void |
setTag(java.lang.Object value)
Sets custom data associated with the resource.
|
public Resource()
Resource
class.public void saveTo(org.w3c.dom.Element element, XmlSerializationContext context)
element
- Allows adding data to the XML document.context
- The context object contains the file format revision number
of the schedule being loaded. It also provides methods that
facilitate reading and writing various data types from and
to the XML document.public void loadFrom(org.w3c.dom.Element element, XmlSerializationContext context)
element
- Allows reading data from the XML document.context
- The context object contains the file format revision number
of the schedule being loaded. It also provides methods that
facilitate reading and writing various data types from and
to the XML document.public void saveTo(JsonObject obj, JsonSerializationContext context)
obj
- A JsonObject instance to contain the serialized data.context
- A JsonSerializationContext object providing contextual information about the serialization process and helper serialization methods.public void loadFrom(JsonObject obj, JsonSerializationContext context)
obj
- A JsonObject containing the resource data.context
- A JsonSerializationContext object providing contextual information about the serialization process and helper serialization methods.public java.lang.String getId()
public void setId(java.lang.String value)
If you need to change its value, make sure the identifier is always unique.
value
- A string value identifying uniquely this resource instance.public java.lang.String getName()
public void setName(java.lang.String value)
value
- A string containing the name of the resource. The default is an empty string.public CustomBrushes getCustomBrushes()
CustomBrushes
object associated with the resource.
This property defines a primary and a secondary brush used to paint the background of resource-related UI elements. The scheduled events for a resource can be displayed in their own columns in timetable, week range and resource views. In timetable view the primary brush is used to paint the non-work time cells, and the secondary brush is used to paint the work time cells. In week range view the two brushes are used to alternately paint odd and even weeks.
CustomBrushes
class that defines brushes used
to paint the background of calendar elements associated with this resource.public void setCustomBrushes(CustomBrushes value)
CustomBrushes
object associated with the resource.
This property defines a primary and a secondary brush used to paint the background of resource-related UI elements. The scheduled events for a resource can be displayed in their own columns in timetable, week range and resource views. In timetable view the primary brush is used to paint the non-work time cells, and the secondary brush is used to paint the work time cells. In week range view the two brushes are used to alternately paint odd and even weeks.
value
- An instance of the CustomBrushes
class that defines brushes used
to paint the background of calendar elements associated with this resource.public java.lang.Object getTag()
Object
.public void setTag(java.lang.Object value)
value
- An instance of any class derived from Object
.