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

📄 xml805.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
         * @exception org.xml.sax.SAXException Any SAX exception, possibly         *            wrapping another exception.         * @see org.xml.sax.ContentHandler#endPrefixMapping         */        public void endPrefixMapping(String prefix)        throws SAXException {            if (DEBUG) {                System.out.println("endPrefixMapping prefix=" + prefix);            }        }        /**         * Receive notification of the start of an element.         *         * <p>By default, do nothing.  Application writers may override this         * method in a subclass to take specific actions at the start of         * each element (such as allocating a new tree node or writing         * output to a file).</p>         *         * @param uri The Namespace URI, or the empty string if the         *        element has no Namespace URI or if Namespace         *        processing is not being performed.         * @param localName The local name (without prefix), or the         *        empty string if Namespace processing is not being         *        performed.         * @param qName The qualified name (with prefix), or the         *        empty string if qualified names are not available.         * @param attributes The attributes attached to the element.  If         *        there are no attributes, it shall be an empty         *        Attributes object.         * @exception org.xml.sax.SAXException Any SAX exception, possibly         *            wrapping another exception.         * @see org.xml.sax.ContentHandler#startElement         */        public void startElement(String uri, String localName,                String qName, Attributes attributes)                throws SAXException {            boolean dump = false;            XmlKeyword key = xmlKeywords.get(localName);//            System.out.print("<" + key.name());            this.attributes = attributes;            switch (key) {                case technology:                    tech.techName = a("name");                    tech.className = a_("class");//                    dump = true;                    break;                case version:                    Version version = new Version();                    version.techVersion = Integer.parseInt(a("tech"));                    version.electricVersion = com.sun.electric.database.text.Version.parseVersion(a("electric"));                    tech.versions.add(version);                    break;                case numMetals:                    tech.minNumMetals = Integer.parseInt(a("min"));                    tech.maxNumMetals = Integer.parseInt(a("max"));                    tech.defaultNumMetals = Integer.parseInt(a("default"));                    break;                case scale:                    tech.scaleValue = Double.parseDouble(a("value"));                    tech.scaleRelevant = Boolean.parseBoolean(a("relevant"));                    break;                case defaultFoundry:                    tech.defaultFoundry = a("value");                    break;                case minResistance:                    tech.minResistance = Double.parseDouble(a("value"));                    break;                case minCapacitance:                    tech.minCapacitance = Double.parseDouble(a("value"));                    break;                case transparentLayer:                    curTransparent = Integer.parseInt(a("transparent"));                    curR = curG = curB = 0;                    break;                case layer:                    curLayer = new Layer();                    curLayer.name = a("name");                    curLayer.function = com.sun.electric.technology.Layer.Function.valueOf(a("fun"));                    String extraFunStr = a_("extraFun");                    if (extraFunStr != null) {                        if (extraFunStr.equals("depletion_heavy"))                            curLayer.extraFunction = com.sun.electric.technology.Layer.Function.DEPLETION|com.sun.electric.technology.Layer.Function.HEAVY;                        else if (extraFunStr.equals("depletion_light"))                            curLayer.extraFunction = com.sun.electric.technology.Layer.Function.DEPLETION|com.sun.electric.technology.Layer.Function.LIGHT;                        else if (extraFunStr.equals("enhancement_heavy"))                            curLayer.extraFunction = com.sun.electric.technology.Layer.Function.ENHANCEMENT|com.sun.electric.technology.Layer.Function.HEAVY;                        else if (extraFunStr.equals("enhancement_light"))                            curLayer.extraFunction = com.sun.electric.technology.Layer.Function.ENHANCEMENT|com.sun.electric.technology.Layer.Function.LIGHT;                        else                            curLayer.extraFunction = com.sun.electric.technology.Layer.Function.parseExtraName(extraFunStr);                    }                    curTransparent = 0;                    curR = curG = curB = 0;                    patternedOnDisplay = false;                    patternedOnPrinter = false;                    Arrays.fill(pattern, 0);                    curPatternIndex = 0;//                    EGraphics.Outline outline = null;                    break;                case transparentColor:                    curTransparent = Integer.parseInt(a("transparent"));                    if (curTransparent > 0) {                        Color color = tech.transparentLayers.get(curTransparent - 1);                        curR = color.getRed();                        curG = color.getGreen();                        curB = color.getBlue();                    }                    break;                case opaqueColor:                    curR = Integer.parseInt(a("r"));                    curG = Integer.parseInt(a("g"));                    curB = Integer.parseInt(a("b"));                    break;                case display3D:                    curLayer.thick3D = Double.parseDouble(a("thick"));                    curLayer.height3D = Double.parseDouble(a("height"));                    curLayer.mode3D = a("mode");                    curLayer.factor3D = Double.parseDouble(a("factor"));                    break;                case cifLayer:                    curLayer.cif = a("cif");                    break;                case skillLayer:                    curLayer.skill = a("skill");                    break;                case parasitics:                    curLayer.resistance = Double.parseDouble(a("resistance"));                    curLayer.capacitance = Double.parseDouble(a("capacitance"));                    curLayer.edgeCapacitance = Double.parseDouble(a("edgeCapacitance"));                    break;                case pureLayerNode:                    curLayer.pureLayerNode = new PureLayerNode();                    curLayer.pureLayerNode.name = a("name");                    String styleStr = a_("style");                    curLayer.pureLayerNode.style = styleStr != null ? Type.valueOf(styleStr) : Type.FILLED;                    curLayer.pureLayerNode.port = a("port");                    curDistance = curLayer.pureLayerNode.size;                    break;                case arcProto:                    curArc = new ArcProto();                    curArc.name = a("name");                    curArc.function = com.sun.electric.technology.ArcProto.Function.valueOf(a("fun"));                    break;                case wipable:                    curArc.wipable = true;                    break;                case curvable:                    curArc.curvable = true;                    break;                case special:                    curArc.special = true;                    break;                case notUsed:                    if (curArc != null)                        curArc.notUsed = true;                    if (curNode != null)                        curNode.notUsed = true;                    break;                case skipSizeInPalette:                    if (curArc != null)                        curArc.skipSizeInPalette = true;                    if (curNode != null)                        curNode.skipSizeInPalette = true;                    break;                case diskOffset:                    if (curArc != null)                        curArc.diskOffset.put(Integer.parseInt(a("untilVersion")), Double.parseDouble(a("width")));                    if (curNode != null)                        curNode.diskOffset.put(Integer.parseInt(a("untilVersion")), EPoint.fromLambda(Double.parseDouble(a("x")), Double.parseDouble(a("y"))));                    break;                case defaultWidth:                    if (curArc != null)                        curDistance = curArc.defaultWidth;                    if (curNode != null)                        curDistance = curNode.defaultWidth;                    break;                case arcLayer:                    ArcLayer arcLayer = new ArcLayer();                    arcLayer.layer = a("layer");                    curDistance = arcLayer.extend;                    arcLayer.style = Type.valueOf(a("style"));                    curArc.arcLayers.add(arcLayer);                    break;                case primitiveNode:                    curNode = new PrimitiveNode();                    curNode.name = a("name");                    curNode.function = com.sun.electric.technology.PrimitiveNode.Function.valueOf(a("fun"));                    break;                case shrinkArcs:                    curNode.shrinkArcs = true;                    break;                case square:                    curNode.square = true;                    break;                case canBeZeroSize:                    curNode.canBeZeroSize = true;                    break;                case wipes:                    curNode.wipes = true;                    break;                case lockable:                    curNode.lockable = true;                    break;                case edgeSelect:                    curNode.edgeSelect = true;                    break;                case lowVt:                    curNode.lowVt = true;                    break;                case highVt:                    curNode.highVt = true;                    break;                case nativeBit:                    curNode.nativeBit = true;                    break;                case od18:                    curNode.od18 = true;                    break;                case od25:                    curNode.od25 = true;                    break;                case od33:                    curNode.od33 = true;                    break;                case defaultHeight:                    curDistance = curNode.defaultHeight;                    break;                case sizeOffset:                    double lx = Double.parseDouble(a("lx"));                    double hx = Double.parseDouble(a("hx"));                    double ly = Double.parseDouble(a("ly"));                    double hy = Double.parseDouble(a("hy"));                    curNode.sizeOffset = new SizeOffset(lx, hx, ly, hy);                    break;                case nodeLayer:                    curNodeLayer = new NodeLayer();                    curNodeLayer.layer = a("layer");                    curNodeLayer.style = Type.valueOf(a("style"));                    String portNum = a_("portNum");                    if (portNum != null)                        curNodeLayer.portNum = Integer.parseInt(portNum);                    String electrical = a_("electrical");                    if (electrical != null) {                        if (Boolean.parseBoolean(electrical))                            curNodeLayer.inElectricalLayers = true;                        else                            curNodeLayer.inLayers = true;                    } else {                        curNodeLayer.inElectricalLayers = curNodeLayer.inLayers = true;                    }                    break;                case box:                    if (curNodeLayer != null) {                        curNodeLayer.representation = com.sun.electric.technology.Technology.NodeLayer.BOX;                        curNodeLayer.lx.k = da_("klx", -1);                        curNodeLayer.hx.k = da_("khx", 1);                        curNodeLayer.ly.k = da_("kly", -1);                        curNodeLayer.hy.k = da_("khy", 1);                    }                    if (curPort != null) {                        curPort.lx.k = da_("klx", -1);                        curPort.hx.k = da_("khx", 1);                        curPort.ly.k = da_("kly", -1);                        curPort.hy.k = da_("khy", 1);                    }                    break;                case points:                    curNodeLayer.representation = com.sun.electric.technology.Technology.NodeLayer.POINTS;                    break;                case multicutbox:                    curNodeLayer.representation = com.sun.electric.technology.Technology.NodeLayer.MULTICUTBOX;                    curNodeLayer.lx.k = da_("klx", -1);                    curNodeLayer.hx.k = da_("khx", 1);                    curNodeLayer.ly.k = da_("kly", -1);                    curNodeLayer.hy.k = da_("khy", 1);                    curNodeLayer.sizex = Double.parseDouble(a("sizex"));                    curNodeLayer.sizey = Double.parseDouble(a("sizey"));                    curNodeLayer.sep1d = Double.parseDouble(a("sep1d"));                    curNodeLayer.sep2d = Double.parseDouble(a("sep2d"));                    break;                case serpbox:                    curNodeLayer.representation = com.sun.electric.technology.Technology.NodeLayer.BOX;                    curNodeLayer.lx.k = da_("klx", -1);                    curNodeLayer.hx.k = da_("khx", 1);                    curNodeLayer.ly.k = da_("kly", -1);                    curNodeLayer.hy.k = da_("khy", 1);                    curNodeLayer.lWidth = Double.parseDouble(a("lWidth"));                    curNodeLayer.rWidth = Double.parseDouble(a("rWidth"));                    curNodeLayer.tExtent = Double.parseDouble(a("tExtent"));                    curNodeLayer.bExtent = Double.parseDouble(a("bExtent"));                    break;                case lambdaBox:                    if (curNodeLayer != null) {                        curNodeLayer.lx.value = Double.parseDouble(a("klx"));                        curNodeLayer.hx.value = Double.parseDouble(a("khx"));                        curNodeLayer.ly.value = Double.parseDouble(a("kly"));                        curNodeLayer.hy.value = Double.parseDouble(a("khy"));                    }                    if (curPort != null) {                        curPort.lx.value = Double.parseDouble(a("klx"));                        curPort.hx.value = Double.parseDouble(a("khx"));                        curPort.ly.value = Double.parseDouble(a("kly"));                        curPort.hy.value = Double.parseDouble(a("khy"));                    }                    break;                case techPoint:                    double xm = Double.parseDouble(a("xm"));                    double xa = Double.parseDouble(a("xa"));                    double ym = Double.parseDouble(a("ym"));                    double ya = Double.parseDouble(a("ya"));                    TechPoint p = new TechPoint(new EdgeH(xm, xa), new EdgeV(ym, ya));                    if (curNodeLayer != null)                        curNodeLayer.techPoints.add(p);                    break;                case primitivePort:                    curPort = new PrimitivePort();                    curPort.name = a("name");                    break;

⌨️ 快捷键说明

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