public class IlvSimpleActivityReader extends Object implements IlvActivityReader
Constructor and Description |
---|
IlvSimpleActivityReader()
Creates an
IlvSimpleActivityReader with no |
Modifier and Type | Method and Description |
---|---|
protected IlvActivity |
createActivity(String id,
String name,
Date start,
Date end)
Creates an
IlvSimpleActivity with the specified parameters. |
IlvTimeReader |
getTimeReader()
Returns the time reader that is used to read the start time and the end
time of the activity.
|
IlvActivity |
readActivity(Element elem,
IlvGanttDocumentReader.Context readContext)
Reads an
IlvSimpleActivity from a given Element . |
Date |
readTime(Element elem,
String attr)
Reads the start or the end time of the specified activity.
|
void |
setTimeReader(IlvTimeReader reader)
Sets the time reader that is used to read the start time and the end
time of the activity.
|
public IlvSimpleActivityReader()
IlvSimpleActivityReader
with nopublic IlvActivity readActivity(Element elem, IlvGanttDocumentReader.Context readContext) throws IlvGanttReaderException
IlvSimpleActivity
from a given Element
.readActivity
in interface IlvActivityReader
elem
- The given element to read from.readContext
- The read context.IlvGanttReaderException
createActivity(java.lang.String, java.lang.String, java.util.Date, java.util.Date)
protected IlvActivity createActivity(String id, String name, Date start, Date end)
IlvSimpleActivity
with the specified parameters.
This method is called by readActivity
.
If you want to create a customized activity reader, you can override
this method to create a customized activity.id
- The id for the new activity.name
- The name for the new activity.start
- The start time for the new activity.end
- The end time for the new activity.public IlvTimeReader getTimeReader()
null
. In this case, the
IlvGanttDocumentReader
will set a time reader based upon the
format specified by the dateFormat
attribute of the
<activities>
element.getTimeReader
in interface IlvActivityReader
public void setTimeReader(IlvTimeReader reader)
IlvGanttDocumentReader
will set a time reader based
upon the format specified by the dateFormat
attribute
of the <activities>
element.setTimeReader
in interface IlvActivityReader
reader
- The new time reader.public Date readTime(Element elem, String attr) throws IlvGanttReaderException
elem
- The element to read from.attr
- Indicates to read the start or the end time.IlvGanttReaderException
getTimeReader()
,
setTimeReader(ilog.views.gantt.xml.IlvTimeReader)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.