You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Shahzad Bhatti <sb...@peak6.com> on 2010/04/15 20:43:20 UTC

Using setMaximized for containers other than descendents of Window

I noticed that setMaximized is only available for Window and its subclasses. Is it possible to use setMaximum for BoxPane, TablePane or Border or a way to add these containers based on parent's size. Thanks.

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: Using setMaximized for containers other than descendents of Window

Posted by Greg Brown <gk...@mac.com>.
What I meant was, what use case are you trying to address? However, the ScrollPane is definitely a clue. Try setting the horizontal or vertical scroll policy to "fill". That tells the scroll pane to size the content to fit the available width or height, respectively. Alternatively, "fill_to_capacity" means "fill" when the content's preferred size is smaller than the scroll pane size, but "auto" when it is larger.


On Apr 20, 2010, at 7:46 PM, Shahzad Bhatti wrote:

> I am defining StackPane as parent, which has ScrollPane, which in turn has TablePane or BoxPane. I noticed that if I remove ScrollPane then it works but if I leave ScrollPane it doesn't expand. Also, when I resize the window then it does not resizes. Thanks.
> 
> 
> 
> On 4/20/10 4:37 PM, "Greg Brown" <gk...@mac.com> wrote:
> 
> TablePane supports sizing children based on a percentage of the available area:
> 
> http://pivot.apache.org/tutorials/table-panes.html
> 
> However, if you can describe more specifically what you are trying to do, maybe we can suggest a better alternative.
> 
> 
> On Apr 20, 2010, at 7:00 PM, Shahzad Bhatti wrote:
> 
>> I have tried this solution by using StackPane as parent, and using other containers such as tabs, expanders, scrollpanes and tables as its children but it's not resizing them. Is there another solution to defining children based on percentage of parent size rather than absolute width/height. Thanks.
>> 
>> 
>> On 4/15/10 11:47 AM, "Greg Brown" <gk...@mac.com> wrote:
>> 
>> No, but you can achieve something similar by using a parent container that will size a child component to fill its available area (such as StackPane).
>> 
>> On Apr 15, 2010, at 2:43 PM, Shahzad Bhatti wrote:
>> 
>>> I noticed that setMaximized is only available for Window and its subclasses. Is it possible to use setMaximum for BoxPane, TablePane or Border or a way to add these containers based on parent's size. Thanks.
>>> 
>>> ______________________________________________
>>> 
>>> See  http://www.peak6.com/email_disclaimer.php
>>> for terms and conditions related to this email
>> 
>> 
> 
> 


Re: Using setMaximized for containers other than descendents of Window

Posted by Shahzad Bhatti <sb...@peak6.com>.
I am defining StackPane as parent, which has ScrollPane, which in turn has TablePane or BoxPane. I noticed that if I remove ScrollPane then it works but if I leave ScrollPane it doesn't expand. Also, when I resize the window then it does not resizes. Thanks.



On 4/20/10 4:37 PM, "Greg Brown" <gk...@mac.com> wrote:

TablePane supports sizing children based on a percentage of the available area:

http://pivot.apache.org/tutorials/table-panes.html

However, if you can describe more specifically what you are trying to do, maybe we can suggest a better alternative.


On Apr 20, 2010, at 7:00 PM, Shahzad Bhatti wrote:

> I have tried this solution by using StackPane as parent, and using other containers such as tabs, expanders, scrollpanes and tables as its children but it's not resizing them. Is there another solution to defining children based on percentage of parent size rather than absolute width/height. Thanks.
>
>
> On 4/15/10 11:47 AM, "Greg Brown" <gk...@mac.com> wrote:
>
> No, but you can achieve something similar by using a parent container that will size a child component to fill its available area (such as StackPane).
>
> On Apr 15, 2010, at 2:43 PM, Shahzad Bhatti wrote:
>
>> I noticed that setMaximized is only available for Window and its subclasses. Is it possible to use setMaximum for BoxPane, TablePane or Border or a way to add these containers based on parent's size. Thanks.
>>
>> ______________________________________________
>>
>> See  http://www.peak6.com/email_disclaimer.php
>> for terms and conditions related to this email
>
>



Re: Using setMaximized for containers other than descendents of Window

Posted by Greg Brown <gk...@mac.com>.
TablePane supports sizing children based on a percentage of the available area:

http://pivot.apache.org/tutorials/table-panes.html

However, if you can describe more specifically what you are trying to do, maybe we can suggest a better alternative.


On Apr 20, 2010, at 7:00 PM, Shahzad Bhatti wrote:

> I have tried this solution by using StackPane as parent, and using other containers such as tabs, expanders, scrollpanes and tables as its children but it's not resizing them. Is there another solution to defining children based on percentage of parent size rather than absolute width/height. Thanks.
> 
> 
> On 4/15/10 11:47 AM, "Greg Brown" <gk...@mac.com> wrote:
> 
> No, but you can achieve something similar by using a parent container that will size a child component to fill its available area (such as StackPane).
> 
> On Apr 15, 2010, at 2:43 PM, Shahzad Bhatti wrote:
> 
>> I noticed that setMaximized is only available for Window and its subclasses. Is it possible to use setMaximum for BoxPane, TablePane or Border or a way to add these containers based on parent's size. Thanks.
>> 
>> ______________________________________________
>> 
>> See  http://www.peak6.com/email_disclaimer.php
>> for terms and conditions related to this email
> 
> 


Re: Using setMaximized for containers other than descendents of Window

Posted by Shahzad Bhatti <sb...@peak6.com>.
I have tried this solution by using StackPane as parent, and using other containers such as tabs, expanders, scrollpanes and tables as its children but it's not resizing them. Is there another solution to defining children based on percentage of parent size rather than absolute width/height. Thanks.


On 4/15/10 11:47 AM, "Greg Brown" <gk...@mac.com> wrote:

No, but you can achieve something similar by using a parent container that will size a child component to fill its available area (such as StackPane).

On Apr 15, 2010, at 2:43 PM, Shahzad Bhatti wrote:

> I noticed that setMaximized is only available for Window and its subclasses. Is it possible to use setMaximum for BoxPane, TablePane or Border or a way to add these containers based on parent's size. Thanks.
>
> ______________________________________________
>
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email



Re: HTML in labels

Posted by Greg Brown <gk...@mac.com>.
Labels don't support HTML, but you can use LinkButton and java.awt.Desktop.browse() to do this.

On Apr 15, 2010, at 8:55 PM, Shahzad Bhatti wrote:

> Is it possible to store html in labels, if so does clicking on link would open browser? Thanks.
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email


HTML in labels

Posted by Shahzad Bhatti <sb...@peak6.com>.
Is it possible to store html in labels, if so does clicking on link would open browser? Thanks.

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException

Posted by Greg Brown <gk...@mac.com>.
I think that might have been fixed for 1.5.

On Apr 15, 2010, at 5:13 PM, Shahzad Bhatti wrote:

> Though, I have filed a jira to debug errors coming from AWT- EventQueue, but today I am seeing this error when using GridPane, e.g.
>                    <Form.Section>
>                      <Border>
>                       <content>
>                          <GridPane columnCount="6" styles="{horizontalSpacing:1, verticalSpacing:1, showHorizontalGridLines:true, showVerticalGridLines:true}">
>                             <rows>
>                                <GridPane.Row>
>                                    <Label text="Account Value:" styles="{horizontalAlignment:'right', font:{size:10}, color: '#FFFFFF'}"/>
>                                    <Label textKey="accountValue" styles="{horizontalAlignment:'right',font:{size:10, bold:true}, color: '#CCCCCC'}"/>
> ...
>                                </GridPane.Row>
>                                <GridPane.Row>
> ...
>                             </rows>
>                          </GridPane>
>                       </content>
>                      </Border>
>                    </Form.Section>
> 
> 
> 
> 
> Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 3    at org.apache.pivot.wtk.skin.GridPaneSkin$Metadata.isRowVisible(Unknown Source)    at org.apache.pivot.wtk.skin.GridPaneSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> 
> 
> Any idea?
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email


AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException

Posted by Shahzad Bhatti <sb...@peak6.com>.
Though, I have filed a jira to debug errors coming from AWT- EventQueue, but today I am seeing this error when using GridPane, e.g.
                    <Form.Section>
                      <Border>
                       <content>
                          <GridPane columnCount="6" styles="{horizontalSpacing:1, verticalSpacing:1, showHorizontalGridLines:true, showVerticalGridLines:true}">
                             <rows>
                                <GridPane.Row>
                                    <Label text="Account Value:" styles="{horizontalAlignment:'right', font:{size:10}, color: '#FFFFFF'}"/>
                                    <Label textKey="accountValue" styles="{horizontalAlignment:'right',font:{size:10, bold:true}, color: '#CCCCCC'}"/>
...
                                </GridPane.Row>
                                <GridPane.Row>
...
                             </rows>
                          </GridPane>
                       </content>
                      </Border>
                    </Form.Section>




Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 3    at org.apache.pivot.wtk.skin.GridPaneSkin$Metadata.isRowVisible(Unknown Source)    at org.apache.pivot.wtk.skin.GridPaneSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Any idea?

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: Using setMaximized for containers other than descendents of Window

Posted by Greg Brown <gk...@mac.com>.
No, but you can achieve something similar by using a parent container that will size a child component to fill its available area (such as StackPane).

On Apr 15, 2010, at 2:43 PM, Shahzad Bhatti wrote:

> I noticed that setMaximized is only available for Window and its subclasses. Is it possible to use setMaximum for BoxPane, TablePane or Border or a way to add these containers based on parent's size. Thanks.
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email