Ejemplo n.º 1
0
 /**
  * Makes a copy of the given RtfBorder
  *
  * @param doc The RtfDocument this RtfBorder belongs to
  * @param borderType The border type of this RtfBorder
  * @param border The RtfBorder to copy
  */
 protected internal RtfBorder(RtfDocument doc, int borderType, RtfBorder border) : base(doc)
 {
     this.borderType     = borderType;
     this.borderPosition = border.GetBorderPosition();
     this.borderStyle    = border.GetBorderStyle();
     this.borderWidth    = border.GetBorderWidth();
     this.borderColor    = new RtfColor(this.document, border.GetBorderColor());
 }
Ejemplo n.º 2
0
 /**
  * Constructs a RtfBorderGroup based on another RtfBorderGroup.
  *
  * @param doc The RtfDocument this RtfBorderGroup belongs to
  * @param borderType The type of borders this RtfBorderGroup contains
  * @param borderGroup The RtfBorderGroup to use as a base
  */
 protected internal RtfBorderGroup(RtfDocument doc, int borderType, RtfBorderGroup borderGroup) : base(doc)
 {
     this.borders    = new Hashtable();
     this.borderType = borderType;
     if (borderGroup != null)
     {
         foreach (DictionaryEntry entry in borderGroup.GetBorders())
         {
             int       borderPos = (int)entry.Key;
             RtfBorder border    = (RtfBorder)entry.Value;
             this.borders[borderPos] = new RtfBorder(this.document, this.borderType, border);
         }
     }
 }
Ejemplo n.º 3
0
        /**
         * Sets a border in the Hashtable of borders
         *
         * @param borderPosition The position of this RtfBorder
         * @param borderStyle The type of borders this RtfBorderGroup contains
         * @param borderWidth The border width to use
         * @param borderColor The border color to use
         */
        private void SetBorder(int borderPosition, int borderStyle, float borderWidth, Color borderColor)
        {
            RtfBorder border = new RtfBorder(this.document, this.borderType, borderPosition, borderStyle, borderWidth, borderColor);

            this.borders[borderPosition] = border;
        }