You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Roger and Beth Whitcomb <Ro...@rbwhitcomb.com> on 2010/10/05 18:32:51 UTC
Prompt sizing between 1.5.2 and 2.0
Hi,
I'm seeing what looks like a small problem with sizing
of a Prompt when given a body in 2.0 as opposed to 1.5.2. Here is the
source of the body:
<?xml version="1.0" encoding="UTF-8"?>
<TablePane xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk">
<columns>
<TablePane.Column width="1*"/>
</columns>
<rows>
<TablePane.Row height="-1">
<Label wtkx:id="aboutVersionLabel" text="%aboutVersionLabel"
styles="{font:{italic:true, bold:true, size:11}}"/>
</TablePane.Row>
<TablePane.Row height="-1">
<Label text="%copyright" styles="{font:{size:11}}"/>
</TablePane.Row>
<TablePane.Row height="24">
<Separator styles="{padding:{top:8,bottom:8}}"/>
</TablePane.Row>
<TablePane.Row height="-1">
<Label text="Built on $(__DATE__) at $(__TIME__)" styles="{font:{size:9}}"/>
</TablePane.Row>
<TablePane.Row height="-1">
<Label text="Java version $(__JAVA_VERSION__)" styles="{font:{size:9}}"/>
</TablePane.Row>
</rows>
</TablePane>
The code to display it looks like this:
@Override
public void aboutRequested() {
Component body = (Component)readObject("about", this);
aboutVersionLabel.setText(String.format(aboutVersionLabel.getText(),
APP_VERSION));
Prompt.prompt(MessageType.INFO,
(String)resources.get("mainAppTitle"), body, mainWindow);
}
Here is what it looks like under 1.5.2 -- very nice looking (IMO),
although I don't know why it has what looks like unwarranted extra width
on the right, based on the content.
But, in 2.0 (head revs built the other day), it is sized just a little
bit too narrow so that the last character gets chopped off. And even
though there is the sizing widget in the lower right, these just seems
cheesy to me that it couldn't get sized correctly to begin with. Or am
I wrong? Is there something else I should be doing to get the size right?
Thanks!
*Roger Whitcomb*
Architect, Engineering
*Ingres Corporation***
roger.whitcomb@ingres.com <ma...@ingres.com>
*PHONE* +1 650.587.5596
*FAX* +1 650.587.5550
*www.ingres.com* <http://www.ingres.com/>
This transmission is confidential and intended solely for the use of the
recipient named above. It may contain confidential, proprietary, or
legally privileged information. If you are not the intended recipient,
you are hereby notified that any unauthorized review, use, disclosure or
distribution is strictly prohibited. If you have received this
transmission in error, please contact the sender by reply e-mail and
delete the original transmission and all copies from your system.
RE: Prompt sizing between 1.5.2 and 2.0
Posted by "Roger L. Whitcomb" <Ro...@ingres.com>.
Got it. Thanks!
Roger Whitcomb | Architect, Engineering | Roger.Whitcomb@ingres.com|
Ingres | 500 Arguello Street | Suite 200 | Redwood City | CA | 94063 |
USA
<http://www.google.com/maps?f=q&hl=en&geocode=&q=500+Arguello+Street+%7C
+Suite+200+%7C+Redwood+City+%7C+CA+%7C+94063+%7C+USA+&sll=37.0625,-95.67
7068&sspn=50.557552,73.037109&ie=UTF8&t=h&z=16&iwloc=addr> | +1
650-587-5596 | fax: +1 650-587-5550
From: Greg Brown [mailto:gkbrown@mac.com]
Sent: Tuesday, October 05, 2010 1:21 PM
To: user@pivot.apache.org
Subject: Re: Prompt sizing between 1.5.2 and 2.0
The problem is that a Prompt's preferred size in Pivot 2.0 is slightly
smaller than in Pivot 1.5, and the labels in your prompt's body are not
configured to wrap. As a result, the text is getting clipped.
I increased the default size slightly, but you should probably add a
"wrapText:true" style to your labels just to be on the safe side (for
example, in case the user manually resizes the prompt).
G
On Oct 5, 2010, at 12:32 PM, Roger and Beth Whitcomb wrote:
Hi,
I'm seeing what looks like a small problem with sizing
of a Prompt when given a body in 2.0 as opposed to 1.5.2. Here is the
source of the body:
<?xml version="1.0" encoding="UTF-8"?>
<TablePane xmlns:wtkx="http://pivot.apache.org/wtkx"
<http://pivot.apache.org/wtkx>
xmlns="org.apache.pivot.wtk">
<columns>
<TablePane.Column width="1*"/>
</columns>
<rows>
<TablePane.Row height="-1">
<Label wtkx:id="aboutVersionLabel" text="%aboutVersionLabel"
styles="{font:{italic:true, bold:true, size:11}}"/>
</TablePane.Row>
<TablePane.Row height="-1">
<Label text="%copyright" styles="{font:{size:11}}"/>
</TablePane.Row>
<TablePane.Row height="24">
<Separator styles="{padding:{top:8,bottom:8}}"/>
</TablePane.Row>
<TablePane.Row height="-1">
<Label text="Built on $(__DATE__) at $(__TIME__)"
styles="{font:{size:9}}"/>
</TablePane.Row>
<TablePane.Row height="-1">
<Label text="Java version $(__JAVA_VERSION__)"
styles="{font:{size:9}}"/>
</TablePane.Row>
</rows>
</TablePane>
The code to display it looks like this:
@Override
public void aboutRequested() {
Component body = (Component)readObject("about", this);
aboutVersionLabel.setText(String.format(aboutVersionLabel.getText(),
APP_VERSION));
Prompt.prompt(MessageType.INFO,
(String)resources.get("mainAppTitle"), body, mainWindow);
}
Here is what it looks like under 1.5.2 - very nice looking (IMO),
although I don't know why it has what looks like unwarranted extra width
on the right, based on the content.
<Mail Attachment.png>
But, in 2.0 (head revs built the other day), it is sized just a little
bit too narrow so that the last character gets chopped off. And even
though there is the sizing widget in the lower right, these just seems
cheesy to me that it couldn't get sized correctly to begin with. Or am
I wrong? Is there something else I should be doing to get the size
right?
<Mail Attachment.png>
Thanks!
Roger Whitcomb
Architect, Engineering
Ingres Corporation
roger.whitcomb@ingres.com
PHONE +1 650.587.5596
FAX +1 650.587.5550
www.ingres.com <http://www.ingres.com/>
This transmission is confidential and intended solely for the use of the
recipient named above. It may contain confidential, proprietary, or
legally privileged information. If you are not the intended recipient,
you are hereby notified that any unauthorized review, use, disclosure or
distribution is strictly prohibited. If you have received this
transmission in error, please contact the sender by reply e-mail and
delete the original transmission and all copies from your system.
Re: Prompt sizing between 1.5.2 and 2.0
Posted by Greg Brown <gk...@mac.com>.
The problem is that a Prompt's preferred size in Pivot 2.0 is slightly smaller than in Pivot 1.5, and the labels in your prompt's body are not configured to wrap. As a result, the text is getting clipped.
I increased the default size slightly, but you should probably add a "wrapText:true" style to your labels just to be on the safe side (for example, in case the user manually resizes the prompt).
G
On Oct 5, 2010, at 12:32 PM, Roger and Beth Whitcomb wrote:
> Hi,
> I’m seeing what looks like a small problem with sizing of a Prompt when given a body in 2.0 as opposed to 1.5.2. Here is the source of the body:
> <?xml version="1.0" encoding="UTF-8"?>
> <TablePane xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <columns>
> <TablePane.Column width="1*"/>
> </columns>
> <rows>
> <TablePane.Row height="-1">
> <Label wtkx:id="aboutVersionLabel" text="%aboutVersionLabel" styles="{font:{italic:true, bold:true, size:11}}"/>
> </TablePane.Row>
> <TablePane.Row height="-1">
> <Label text="%copyright" styles="{font:{size:11}}"/>
> </TablePane.Row>
> <TablePane.Row height="24">
> <Separator styles="{padding:{top:8,bottom:8}}"/>
> </TablePane.Row>
> <TablePane.Row height="-1">
> <Label text="Built on $(__DATE__) at $(__TIME__)" styles="{font:{size:9}}"/>
> </TablePane.Row>
> <TablePane.Row height="-1">
> <Label text="Java version $(__JAVA_VERSION__)" styles="{font:{size:9}}"/>
> </TablePane.Row>
> </rows>
> </TablePane>
>
> The code to display it looks like this:
> @Override
> public void aboutRequested() {
> Component body = (Component)readObject("about", this);
> aboutVersionLabel.setText(String.format(aboutVersionLabel.getText(), APP_VERSION));
> Prompt.prompt(MessageType.INFO, (String)resources.get("mainAppTitle"), body, mainWindow);
> }
>
> Here is what it looks like under 1.5.2 – very nice looking (IMO), although I don’t know why it has what looks like unwarranted extra width on the right, based on the content.
> <Mail Attachment.png>
>
> But, in 2.0 (head revs built the other day), it is sized just a little bit too narrow so that the last character gets chopped off. And even though there is the sizing widget in the lower right, these just seems cheesy to me that it couldn’t get sized correctly to begin with. Or am I wrong? Is there something else I should be doing to get the size right?
> <Mail Attachment.png>
>
> Thanks!
>
>
>
> Roger Whitcomb
> Architect, Engineering
> Ingres Corporation
> roger.whitcomb@ingres.com
>
> PHONE +1 650.587.5596
> FAX +1 650.587.5550
>
> www.ingres.com
>
> This transmission is confidential and intended solely for the use of the recipient named above. It may contain confidential, proprietary, or legally privileged information. If you are not the intended recipient, you are hereby notified that any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this transmission in error, please contact the sender by reply e-mail and delete the original transmission and all copies from your system.
>