⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resourcesaver.java

📁 It is all about project scheduling. GanttProject is a tool for creating a project schedule by means
💻 JAVA
字号:
package net.sourceforge.ganttproject.io;import java.util.List;import javax.xml.transform.sax.TransformerHandler;import org.xml.sax.SAXException;import org.xml.sax.helpers.AttributesImpl;import net.sourceforge.ganttproject.IGanttProject;import net.sourceforge.ganttproject.resource.HumanResource;import net.sourceforge.ganttproject.resource.ProjectResource;class ResourceSaver extends SaverBase {    void save(IGanttProject project, TransformerHandler handler) throws SAXException {        final AttributesImpl attrs = new AttributesImpl();        startElement("resources", handler);        ProjectResource[] resources = project.getHumanResourceManager().getResourcesArray();        for (int i = 0; i < resources.length; i++) {            HumanResource p = (HumanResource) resources[i];            addAttribute("id", String.valueOf(p.getId()), attrs);            addAttribute("name", p.getName(), attrs);            addAttribute("function", p.getRole().getPersistentID(), attrs);            addAttribute("contacts", p.getMail(), attrs);            addAttribute("phone", p.getPhone(), attrs);            emptyElement("resource", attrs, handler);        }        endElement("resources", handler);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -