~ubuntu-branches/ubuntu/trusty/libitext-java/trusty

« back to all changes in this revision

Viewing changes to core/com/lowagie/text/html/simpleparser/FactoryProperties.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-10-02 21:23:15 UTC
  • mfrom: (5.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091002212315-br9lwonsyo2jgycx
* New upstream release (Closes: #549347).
* Build-Depends on libbctsp-java.
* Build-Depends on debhelper (>= 7).
* Added missing Depends on ${misc:Depends}.
* Added Vcs-Svn and Vcs-Browser fields.
* Updated Standards-Version 3.8.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
                }
117
117
        }
118
118
 
119
 
        public static Paragraph createParagraph(HashMap props) {
120
 
                Paragraph p = new Paragraph();
121
 
                String value = (String) props.get("align");
122
 
                if (value != null) {
123
 
                        if (value.equalsIgnoreCase("center"))
124
 
                                p.setAlignment(Element.ALIGN_CENTER);
125
 
                        else if (value.equalsIgnoreCase("right"))
126
 
                                p.setAlignment(Element.ALIGN_RIGHT);
127
 
                        else if (value.equalsIgnoreCase("justify"))
128
 
                                p.setAlignment(Element.ALIGN_JUSTIFIED);
129
 
                }
130
 
                p.setHyphenation(getHyphenation(props));
131
 
                setParagraphLeading(p, (String) props.get("leading"));
132
 
                return p;
133
 
        }
134
 
 
135
119
        public static void createParagraph(Paragraph p, ChainedProperties props) {
136
120
                String value = props.getProperty("align");
137
121
                if (value != null) {
291
275
                        } else if (key.equals(Markup.CSS_KEY_FONTSIZE)) {
292
276
                                h.put("size", Float.toString(Markup.parseLength(prop
293
277
                                                .getProperty(key)))
294
 
                                                + "px");
 
278
                                                + "pt");
295
279
                        } else if (key.equals(Markup.CSS_KEY_FONTSTYLE)) {
296
280
                                String ss = prop.getProperty(key).trim().toLowerCase();
297
281
                                if (ss.equals("italic") || ss.equals("oblique"))
399
383
                        } else if (key.equals(Markup.CSS_KEY_TEXTALIGN)) {
400
384
                                String ss = prop.getProperty(key).trim().toLowerCase();
401
385
                                h.put("align", ss);
 
386
                        } else if (key.equals(Markup.CSS_KEY_PADDINGLEFT)) {
 
387
                                String ss = prop.getProperty(key).trim().toLowerCase();
 
388
                                h.put("indent", Float.toString(Markup.parseLength(ss)));
402
389
                        }
403
390
                }
404
391
        }