Beispiel #1
0
// ---------------------------------------------------------------------------

        /**
         * Add content to a ColumnText object.
         * @param ct the ColumnText object
         * @param movie a Movie object
         * @param img the poster of the image
         */
        public void AddContent(ColumnText ct, Movie movie, Image img)
        {
            ct.AddElement(img);
            ct.AddElement(new Paragraph(movie.Title, FilmFonts.BOLD));
            if (!string.IsNullOrEmpty(movie.OriginalTitle))
            {
                ct.AddElement(new Paragraph(movie.OriginalTitle, FilmFonts.ITALIC));
            }
            ct.AddElement(PojoToElementFactory.GetDirectorList(movie));
            ct.AddElement(PojoToElementFactory.GetYearPhrase(movie));
            ct.AddElement(PojoToElementFactory.GetDurationPhrase(movie));
            ct.AddElement(PojoToElementFactory.GetCountryList(movie));
            ct.AddElement(Chunk.NEWLINE);
        }
Beispiel #2
0
// ---------------------------------------------------------------------------

        /**
         * Add content to a ColumnText object.
         * @param ct the ColumnText object
         * @param movie a Movie object
         * @param img the poster of the image
         */
        public void AddContent(ColumnText ct, Movie movie)
        {
            Paragraph p;

            p               = new Paragraph(new Paragraph(movie.Title, FilmFonts.BOLD));
            p.Alignment     = Element.ALIGN_CENTER;
            p.SpacingBefore = 16;
            ct.AddElement(p);
            if (!string.IsNullOrEmpty(movie.OriginalTitle))
            {
                p           = new Paragraph(movie.OriginalTitle, FilmFonts.ITALIC);
                p.Alignment = Element.ALIGN_RIGHT;
                ct.AddElement(p);
            }
            p = new Paragraph();
            p.Add(PojoToElementFactory.GetYearPhrase(movie));
            p.Add(" ");
            p.Add(PojoToElementFactory.GetDurationPhrase(movie));
            p.Alignment = Element.ALIGN_JUSTIFIED_ALL;
            ct.AddElement(p);
            p = new Paragraph(new Chunk(new StarSeparator()));
            p.SpacingAfter = 12;
            ct.AddElement(p);
        }