Examples of XMLNode

  • org.sf.bee.commons.xml.XmlNode
  • org.vietspider.parser.xml.XMLNode
    Created by VietSpider Studio Author : Nhu Dinh Thuan nhudinhthuan@yahoo.com Mar 13, 2006
  • org.webharvest.definition.XmlNode
  • org.zachtaylor.jnodalxml.XmlNode

  • Examples of com.lightcrafts.utils.xml.XmlNode

        }

        void save( XmlNode node ) {
            final RGBColorSelection cs = m_op.getColorSelection();

            final XmlNode colorNode = node.addChild( ColorSelectionKey );

            colorNode.setAttribute(
                HueRedKey, Float.toString( cs.red )
            );
            colorNode.setAttribute(
                HueGreenKey, Float.toString( cs.green )
            );
            colorNode.setAttribute(
                HueBlueKey, Float.toString( cs.blue )
            );
            colorNode.setAttribute(
                HueRadiusKey, Float.toString( cs.radius )
            );
            colorNode.setAttribute(
                HueEnabledKey, Boolean.toString( cs.isColorEnabled )
            );
            colorNode.setAttribute(
                LuminosityLowerKey,
                Float.toString( cs.luminosityLower )
            );
            colorNode.setAttribute(
                LuminosityLowerFeatherKey,
                Float.toString( cs.luminosityLowerFeather )
            );
            colorNode.setAttribute(
                LuminosityUpperKey,
                Float.toString( cs.luminosityUpper )
            );
            colorNode.setAttribute(
                LuminosityUpperFeatherKey,
                Float.toString( cs.luminosityUpperFeather )
            );
            colorNode.setAttribute(
                LuminosityEnabledKey,
                Boolean.toString( cs.isLuminosityEnabled )
            );
            colorNode.setAttribute(
                InvertedKey,
                Boolean.toString( cs.isInverted )
            );
        }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

        }

        private void validate() throws XMLException {
            // Explore the structure of the XmlDocument enough to make sure the
            // other methods of this class will not encounter XMLExceptions.
            XmlNode controls = getControlNode();
            if (controls == null) {
                throw new XMLException("No Control node");
            }
            XmlNode[] tools = getToolNodes();
            XmlNode[] regions = getRegionNodes();
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

            }
            return names.toArray(new String[0]);
        }

        void removeTool(int index) {
            XmlNode controls = getControlNode();
            XmlNode tool = getToolNode(index);
            XmlNode region = getRegionNode(index);
            controls.removeChild(tool);
            controls.removeChild(region);
        }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

        private XmlNode getRegionNode(int index) {
            return getRegionNodes()[index];
        }

        private XmlNode[] getToolNodes() {
            XmlNode controls = getControlNode();
            XmlNode[] nodes = controls.getChildren();
            ArrayList<XmlNode> tools = new ArrayList<XmlNode>();
            for (XmlNode node : nodes) {
                if (isToolNode(node)) {
                    tools.add(node);
                }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

                return null;
            }
        }

        private XmlNode[] getRegionNodes() {
            XmlNode controls = getControlNode();
            XmlNode[] nodes = controls.getChildren();
            ArrayList<XmlNode> tools = new ArrayList<XmlNode>();
            for (XmlNode node : nodes) {
                if (isRegionNode(node)) {
                    tools.add(node);
                }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

        public void save(XmlNode node) {
            node.setAttribute(WidthTag, Float.toString(width));
            for (Iterator i=points.iterator(); i.hasNext(); ) {
                Point2D p = (Point2D) i.next();
                XmlNode pointNode = node.addChild(PointTag);
                pointNode.setAttribute("x", Double.toString(p.getX()));
                pointNode.setAttribute("y", Double.toString(p.getY()));
            }
            if (clonePt != null) {
                node = node.addChild(CloneTag);
                clonePt.save(node);
            }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

            return node.getName().equals("Region");
        }

        private XmlNode getControlNode() {
            try {
                XmlNode root = xml.getRoot();
                XmlNode node = root.getChild("Controls");
                return node;
            }
            catch (XMLException e) {
                // Can't happen if validate() returned.
                return null;
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

                throw new XMLException("Invalid curve width", e);
            }
            points.clear();
            XmlNode[] children = node.getChildren();
            for (int n=0; n<children.length; n++) {
                XmlNode child = children[n];
                if (child.getName().equals(PointTag)) {
                    try {
                        double x = Double.parseDouble(child.getAttribute("x"));
                        double y = Double.parseDouble(child.getAttribute("y"));
                        Point2D p = new Point2D.Double(x, y);
                        points.add(p);
                    }
                    catch (NumberFormatException e) {
                        throw new XMLException("Invalid curve coordinates", e);
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

            Set curves = getAllCurves();
            Map curveNumbers = new HashMap();   // CubicCurves to Integers
            int count = 0;
            for (Iterator i=curves.iterator(); i.hasNext(); ) {
                Curve curve = (Curve) i.next();
                XmlNode curveNode = node.addChild(CurveTag);
                CurveFactory.save(curve, curveNode);
                curveNumbers.put(curve, count++);
            }
            for (Iterator i=comps.iterator(); i.hasNext(); ) {
                CurveComponent comp = (CurveComponent) i.next();
                XmlNode compNode = node.addChild(ComponentTag);
                Set compCurves = getCurves(comp);
                for (Iterator j=compCurves.iterator(); j.hasNext(); ) {
                    Curve compCurve = (Curve) j.next();
                    Integer index = (Integer) curveNumbers.get(compCurve);
                    XmlNode refNode = compNode.addChild(ReferenceTag);
                    refNode.setAttribute(IndexTag, index.toString());
                }
            }
        }
    View Full Code Here

    Examples of com.sun.enterprise.deployment.node.XMLNode

        * @return the descriptor instance to associate with this XMLNode
        */   
        public Object getDescriptor() {
      if (descriptor==null) {
          descriptor = new JavaWebStartAccessDescriptor();
                XMLNode parentNode = getParentNode();
                if (parentNode != null && (parentNode instanceof AppClientRuntimeNode)) {
                    Object parentDescriptor = parentNode.getDescriptor();
                    if (parentDescriptor != null && (parentDescriptor instanceof ApplicationClientDescriptor) ) {
                        ApplicationClientDescriptor acDescriptor = (ApplicationClientDescriptor) parentDescriptor;
                        acDescriptor.setJavaWebStartAccessDescriptor(descriptor);
                    }
                   
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.