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

📄 iconpositiontaghandler.java

📁 It is all about project scheduling. GanttProject is a tool for creating a project schedule by means
💻 JAVA
字号:
/** *  */package net.sourceforge.ganttproject.parser;import org.xml.sax.Attributes;/** * @author nbohn */public class IconPositionTagHandler implements TagHandler {    private int[] myList;    private String myPositions = "";    private int[] myDeletedList;    private String myDeletedPositions = "";    public IconPositionTagHandler() {    }    public void startElement(String namespaceURI, String sName, String qName,            Attributes attrs) throws FileFormatException {        if (qName.equals("positions")) {            loadIcon(attrs);            loadDeletedIcon(attrs);        }    }    public void endElement(String namespaceURI, String sName, String qName) {    }    private void loadIcon(Attributes atts) {        myPositions = atts.getValue("icons-list");        if (!myPositions.equals("")) {            String[] positions = myPositions.split(",");            myList = new int[positions.length];            for (int i = 0; i < positions.length; i++)                myList[i] = (new Integer(positions[i])).intValue();        }    }    private void loadDeletedIcon(Attributes atts) {        myDeletedPositions = atts.getValue("deletedIcons-list");        if ((myDeletedPositions != null) && (!myDeletedPositions.equals(""))) {            String[] positions = myDeletedPositions.split(",");            myDeletedList = new int[positions.length];            for (int i = 0; i < positions.length; i++)                myDeletedList[i] = (new Integer(positions[i])).intValue();        }    }    public int[] getList() {        return myList;    }    public String getPositions() {        return myPositions;    }    public int[] getDeletedList() {        return myDeletedList;    }    public String getDeletedPositions() {        return myDeletedPositions;    }}

⌨️ 快捷键说明

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