SetIndentationLeft() 공개 메소드

public SetIndentationLeft ( float indentation, bool autoindent ) : void
indentation float
autoindent bool
리턴 void
예제 #1
0
 /**
  * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
  *
  * @param    o   the object to add.
  * @return true if adding the object succeeded
  */
 public override bool Add(IElement o)
 {
     if (o is ListItem)
     {
         ListItem item  = (ListItem)o;
         Chunk    chunk = new Chunk(preSymbol, symbol.Font);
         chunk.Attributes = symbol.Attributes;
         chunk.Append(GreekAlphabetFactory.GetString(first + list.Count, lowercase));
         chunk.Append(postSymbol);
         item.ListSymbol = chunk;
         item.SetIndentationLeft(symbolIndent, autoindent);
         item.IndentationRight = 0;
         list.Add(item);
         return(true);
     }
     else if (o is List)
     {
         List nested = (List)o;
         nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
         first--;
         list.Add(nested);
         return(true);
     }
     return(false);
 }
예제 #2
0
 /**
  * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
  *
  * @param    o    the object to add.
  * @return true if adding the object succeeded
  */
 public override bool Add(Object o)
 {
     if (o is ListItem)
     {
         ListItem item  = (ListItem)o;
         Chunk    chunk = new Chunk(preSymbol, symbol.Font);
         chunk.Append(RomanNumberFactory.GetString(first + list.Count, lowercase));
         chunk.Append(postSymbol);
         item.ListSymbol = chunk;
         item.SetIndentationLeft(symbolIndent, autoindent);
         item.IndentationRight = 0;
         list.Add(item);
         return(true);
     }
     else if (o is List)
     {
         List nested = (List)o;
         nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
         first--;
         list.Add(nested);
         return(true);
     }
     else if (o is string)
     {
         return(this.Add(new ListItem((string)o)));
     }
     return(false);
 }
예제 #3
0
 /**
  * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
  *
  * @param    o    the object to add.
  * @return true if adding the object succeeded
  */
 public override bool Add(IElement o)
 {
     if (o is ListItem)
     {
         ListItem item  = (ListItem)o;
         Chunk    chunk = new Chunk(preSymbol, symbol.Font);
         chunk.Attributes = symbol.Attributes;
         chunk.Append(((char)zn).ToString());
         chunk.Append(postSymbol);
         item.ListSymbol = chunk;
         item.SetIndentationLeft(symbolIndent, autoindent);
         item.IndentationRight = 0;
         list.Add(item);
         return(true);
     }
     else if (o is List)
     {
         List nested = (List)o;
         nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
         first--;
         list.Add(nested);
         return(true);
     }
     return(false);
 }
        /**
         * Adds an <CODE>Object</CODE> to the <CODE>List</CODE>.
         *
         * @param    o    the object to add.
         * @return true if adding the object succeeded
         */
        public override bool Add(Object o)
        {
            if (o is ListItem)
            {
                ListItem item  = (ListItem)o;
                Chunk    chunk = new Chunk(preSymbol, symbol.Font);
                switch (type)
                {
                case 0:
                    chunk.Append(((char)(first + list.Count + 171)).ToString());
                    break;

                case 1:
                    chunk.Append(((char)(first + list.Count + 181)).ToString());
                    break;

                case 2:
                    chunk.Append(((char)(first + list.Count + 191)).ToString());
                    break;

                default:
                    chunk.Append(((char)(first + list.Count + 201)).ToString());
                    break;
                }
                chunk.Append(postSymbol);
                item.ListSymbol = chunk;
                item.SetIndentationLeft(symbolIndent, autoindent);
                item.IndentationRight = 0;
                list.Add(item);
                return(true);
            }
            else if (o is List)
            {
                List nested = (List)o;
                nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
                first--;
                list.Add(nested);
                return(true);
            }
            else if (o is String)
            {
                return(this.Add(new ListItem((string)o)));
            }
            return(false);
        }
        // methods to set the membervariables

        /// <summary>
        /// Adds an Object to the List.
        /// </summary>
        /// <param name="o">the object to add</param>
        /// <returns>true is successful</returns>
        public virtual bool Add(Object o)
        {
            if (o is ListItem)
            {
                ListItem item = (ListItem)o;
                if (numbered || lettered)
                {
                    Chunk chunk = new Chunk(preSymbol, symbol.Font);
                    int   index = first + list.Count;
                    if (lettered)
                    {
                        chunk.Append(RomanAlphabetFactory.GetString(index, lowercase));
                    }
                    else
                    {
                        chunk.Append(index.ToString());
                    }
                    chunk.Append(postSymbol);
                    item.ListSymbol = chunk;
                }
                else
                {
                    item.ListSymbol = symbol;
                }
                item.SetIndentationLeft(symbolIndent, autoindent);
                item.IndentationRight = 0;
                list.Add(item);
                return(true);
            }
            else if (o is List)
            {
                List nested = (List)o;
                nested.IndentationLeft = nested.IndentationLeft + symbolIndent;
                first--;
                list.Add(nested);
                return(true);
            }
            else if (o is string)
            {
                return(this.Add(new ListItem((string)o)));
            }
            return(false);
        }