public void Set(CT_Connector obj) { //throw new NotImplementedException(); this.macroField = obj.macro; this.fPublishField = obj.fPublished; this.spPrField = obj.spPr; this.styleField = obj.style; this.nvCxnSpPrField = obj.nvCxnSpPr; }
/** * Initialize default structure of a new auto-shape * */ public static CT_Connector Prototype() { if (prototype == null) { CT_Connector shape = new CT_Connector(); CT_ConnectorNonVisual nv = shape.AddNewNvCxnSpPr(); CT_NonVisualDrawingProps nvp = nv.AddNewCNvPr(); nvp.id = (1); nvp.name = ("Shape 1"); nv.AddNewCNvCxnSpPr(); CT_ShapeProperties sp = shape.AddNewSpPr(); CT_Transform2D t2d = sp.AddNewXfrm(); CT_PositiveSize2D p1 = t2d.AddNewExt(); p1.cx = (0); p1.cy = (0); CT_Point2D p2 = t2d.AddNewOff(); p2.x =(0); p2.y=(0); CT_PresetGeometry2D geom = sp.AddNewPrstGeom(); geom.prst = (ST_ShapeType.line); geom.AddNewAvLst(); CT_ShapeStyle style = shape.AddNewStyle(); CT_SchemeColor scheme = style.AddNewLnRef().AddNewSchemeClr(); scheme.val = (ST_SchemeColorVal.accent1); style.lnRef.idx = (1); CT_StyleMatrixReference fillref = style.AddNewFillRef(); fillref.idx = (0); fillref.AddNewSchemeClr().val=(ST_SchemeColorVal.accent1); CT_StyleMatrixReference effectRef = style.AddNewEffectRef(); effectRef.idx = (0); effectRef.AddNewSchemeClr().val = (ST_SchemeColorVal.accent1); CT_FontReference fontRef = style.AddNewFontRef(); fontRef.idx = (ST_FontCollectionIndex.minor); fontRef.AddNewSchemeClr().val = (ST_SchemeColorVal.tx1); prototype = shape; } return prototype; }
/** * Construct a new XSSFConnector object. * * @param Drawing the XSSFDrawing that owns this shape * @param ctShape the shape bean that holds all the shape properties */ public XSSFConnector(XSSFDrawing drawing, CT_Connector ctShape) { this.drawing = drawing; this.ctShape = ctShape; }
public CT_Connector AddNewCxnSp() { connectorField = new CT_Connector(); return connectorField; }
public CT_Connector AddNewCxnSp() { connectorField = new CT_Connector(); return(connectorField); }
public void Set(CT_Connector obj) { this.macroField = obj.macro; this.fPublishedField = obj.fPublished; this.spPrField = obj.spPr; this.styleField = obj.style; this.nvCxnSpPrField = obj.nvCxnSpPr; }
public static CT_Connector Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) return null; CT_Connector ctObj = new CT_Connector(); ctObj.macro = XmlHelper.ReadString(node.Attributes["macro"]); ctObj.fPublished = XmlHelper.ReadBool(node.Attributes["fPublished"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "nvCxnSpPr") ctObj.nvCxnSpPr = CT_ConnectorNonVisual.Parse(childNode, namespaceManager); else if (childNode.LocalName == "spPr") ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager); else if (childNode.LocalName == "style") ctObj.style = CT_ShapeStyle.Parse(childNode, namespaceManager); } return ctObj; }