[jbossseam-issues] [JBoss JIRA] Assigned: (JBSEAM-2914) PDF: Image inside a cell cannot be aligned properly
Norman Richards (JIRA)
jira-events at lists.jboss.org
Mon Apr 21 11:17:09 EDT 2008
[ http://jira.jboss.com/jira/browse/JBSEAM-2914?page=all ]
Norman Richards reassigned JBSEAM-2914:
---------------------------------------
Assignee: Norman Richards
> PDF: Image inside a cell cannot be aligned properly
> ---------------------------------------------------
>
> Key: JBSEAM-2914
> URL: http://jira.jboss.com/jira/browse/JBSEAM-2914
> Project: Seam
> Issue Type: Bug
> Components: PDF
> Affects Versions: 2.0.1.GA
> Reporter: Richard Leherpeur
> Assigned To: Norman Richards
>
> I noticed that this is not possible to properly align an image inside a cell. I investigated a little and found out that one case is missing the UICell.handleAdd method.
> The actual method is implemented as:
> public void handleAdd(Object o) {
> if (o instanceof Phrase) {
> cell.setPhrase((Phrase) o);
> } else if (o instanceof Element) {
> // calling addElement negates setPhrase, etc...
> cell.addElement((Element) o);
> } else {
> throw new RuntimeException("Can't add " + o.getClass().getName() + " to cell");
> }
> }
> The correct implementation should be:
> public void handleAdd(Object o) {
> if (o instanceof Phrase) {
> cell.setPhrase((Phrase) o);
> } else if (o instanceof Image) {
> // Allow proper control over image alignment
> cell.setImage((Image) o);
> } else if (o instanceof Element) {
> // calling addElement negates setPhrase, etc...
> cell.addElement((Element) o);
> } else {
> throw new RuntimeException("Can't add " + o.getClass().getName() + " to cell");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list