You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Jérôme Serré <je...@gmail.com> on 2010/04/26 16:06:52 UTC

Load url from applet

Hello,

Is it possible to load a page in the browser from an applet pivot ?
something like:
getAppletContext (). showDocument (new URL ());

Thanks



 

__

Cordialement

Jérôme Serré

 



RE: Load url from applet

Posted by Jérôme Serré <je...@gmail.com>.
Thank you for your quick response
I try...

-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : lundi 26 avril 2010 16:12
À : user@pivot.apache.org
Objet : Re: Load url from applet

One approach is to use java.awt.Desktop#browse(). This works well because it
works for both desktop and browser application contexts. However, it will
generally open the page in a new window, which may not be what you want.

You can also use BrowserApplicationContext.eval(), which can be used to
execute arbitrary JavaScript in the page. However, this only works when
running in the browser.

On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:

> Hello,
> 
> Is it possible to load a page in the browser from an applet pivot ?
> something like:
> getAppletContext (). showDocument (new URL ());
> 
> Thanks
> 
> 
> 
> 
> 
> __
> 
> Cordialement
> 
> Jérôme Serré
> 
> 
> 
> 


RE: Load url from applet

Posted by Jérôme Serré <je...@gmail.com>.
Thanks very much,
It's wonderful :)


-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : mardi 27 avril 2010 13:59
À : user@pivot.apache.org
Objet : Re: Load url from applet

You should just be able to call:

  BrowserApplicationContext.eval("loadPage()", myApplication);

This demo app does something similar:

 
http://svn.apache.org/repos/asf/pivot/trunk/demos/src/org/apache/pivot/demos
/dom/DOMInteractionDemo.java

The HTML page defines the following function, which is called by the button
press listener defined in startup():

    <script type="text/javascript">
        // This function will be called by Pivot
        function sayHello(helloText) {
            alert(helloText);
        }
    </script>

On Apr 27, 2010, at 3:22 AM, Jérôme Serré wrote:

> I am sorry Greg but I don't know to do it.
> The html page is "administration.html", there is a script (js) :
> 
> <html>
> ....
> <script>
> function loadPage() { window.location.replace("/ihm/page/relecture.html");
}
> </script>
> ....
> application_class_name:"ihm.applet.Administration"
> ...
> deployJava.runApplet(attributes, parameters, "1.6");
> ....
> </html>
> 
> How execute the function "loadPage" form applet Administration ?
> Could you tell me an example ?
> 
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 26 avril 2010 18:08
> À : user@pivot.apache.org
> Objet : Re: Load url from applet
> 
> The application name is just the name of the applet hosting the
application.
> However, you don't need that to call eval() - you just need the
application
> instance.
> 
> On Apr 26, 2010, at 12:02 PM, Jérôme Serré wrote:
> 
>> Thank you,
>> I will use BrowserApplicationContext.eval(), but I don't know how to get
> the
>> name of Application. 
>> Is it the name of the page or do I create loading and how ?
>> 
>> -----Message d'origine-----
>> De : Greg Brown [mailto:gkbrown@mac.com] 
>> Envoyé : lundi 26 avril 2010 16:12
>> À : user@pivot.apache.org
>> Objet : Re: Load url from applet
>> 
>> One approach is to use java.awt.Desktop#browse(). This works well because
> it
>> works for both desktop and browser application contexts. However, it will
>> generally open the page in a new window, which may not be what you want.
>> 
>> You can also use BrowserApplicationContext.eval(), which can be used to
>> execute arbitrary JavaScript in the page. However, this only works when
>> running in the browser.
>> 
>> On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:
>> 
>>> Hello,
>>> 
>>> Is it possible to load a page in the browser from an applet pivot ?
>>> something like:
>>> getAppletContext (). showDocument (new URL ());
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>>> 
>>> 
>>> __
>>> 
>>> Cordialement
>>> 
>>> Jérôme Serré
>>> 
>>> 
>>> 
>>> 
>> 
> 


Re: Mixing Pivot and Swing

Posted by Greg Brown <gk...@mac.com>.
Sorry, I mean Pivot ListView, not List.

On Apr 27, 2010, at 8:50 AM, Greg Brown wrote:

> As I recall, the code was a bit ugly. I had originally hoped that we could simply delegate UI events and paint() calls to the wrapped component, but it seems like Swing components don't work well unless they are attached to an AWT component hierarchy. That meant that we had to attach it to the DisplayHost directly, which made it behave like a heavyweight AWT component does in a Swing app - it basically sits on top of everything else.
> 
> Maybe if you describe what you are trying to do, we can help identify a way to do it with a Pivot List?
> 
> 
> On Apr 27, 2010, at 8:43 AM, Rendell, Stephen / Kuehne + Nagel / Ntg CI wrote:
> 
>> Is there some example code for this custom swing adapter knocking around? We are interested in the ability to include a JList in a pivot Frame (along with pivot components)
>> 
>> Thanks again,
>> Steve
>> 
>> -----Original Message-----
>> From:   Todd Volkert
>> 
>> I actually got a custom swing adapter working in a Pivot app of mine with
>> handling of mouse and keyboard events, but the one thing I couldn't get
>> around was how some Swing components paint directly to the AWT peer, thus
>> bypassing Pivot's paint calls and messing with the z-order.  If JEditorPane
>> doesn't do this, then you may be ok.
>> 
>> -T
>> 
>> On Sun, Jan 17, 2010 at 2:43 PM, Greg Brown <gk...@mac.com> wrote:
>> 
>>> Hi LM,
>>> 
>>> There is currently no way to include a Swing component in a Pivot app via
>>> WTKX. We had experimental support for a SwingAdapter component a while back,
>>> but there were some challenges in propagating mouse and keyboard input to
>>> the Swing components.
>>> 
>>> If you don't need to handle user input events, you should be able to write
>>> a wrapper component that delegates paint() calls to an embedded JEditorPane.
>>> Actually, you could still do this even if you do need to handle input
>>> events, as long as you register the events on the wrapper component, not the
>>> actual Swing component.
>>> 
>>> Hope this helps,
>>> Greg
>>> 
>>> On Jan 17, 2010, at 2:28 PM, Luke Merolla wrote:
>>> 
>>>> Hello everybody,
>>>> 
>>>> I want to ask how it is possible to mix an application with Pivot and
>>> Swing component.
>>>> Basically what I'm trying to do is to have an application built with
>>> Pivot, but I need to use JEditorPane to show some HTML pages.
>>>> 
>>>> Is there a way to put Swing component into the wtkx file?
>>>> 
>>>> Any other suggestion is very welcome.
>>>> 
>>>> Thanks in advance,
>>>> LM
>> 
>> 
>> 
>> Kuehne + Nagel Ltd. ( the Company) trade solely upon the conditions of the British International Freight Association. Copies of these Conditions can be obtained on application to the Company or upon application to the Director General of the British International Freight Association at Redfern House, Browells Lane, Feltham, Middx, TW13 7EP
>> 
>> This email and any attachments are confidential and solely for the use of the intended  recipient. They may contain material protected by legal professional or other privilege. If  you are not the intended recipient or the person responsible for delivering to the intended  recipient, you are not authorised to and must not disclose, copy, distribute or retain this  email or its attachments. Although this email and its attachments are believed to be free  of any virus or other defect, it is the responsibility of the recipient to ensure that they  are virus free and no responsibility is accepted by the company for any loss or damage  arising from receipt or use thereof.
>> 
>> Kuehne + Nagel Ltd.
>> Registered in England and Wales number 01722216.
>> VAT Registration Number GB 864 4409 10.
>> Registered Office: 1 Union Business Park, Florence Way, Rockingham Road, Uxbridge, Middlesex. UB8 2LS
> 


Re: Mixing Pivot and Swing

Posted by Greg Brown <gk...@mac.com>.
As I recall, the code was a bit ugly. I had originally hoped that we could simply delegate UI events and paint() calls to the wrapped component, but it seems like Swing components don't work well unless they are attached to an AWT component hierarchy. That meant that we had to attach it to the DisplayHost directly, which made it behave like a heavyweight AWT component does in a Swing app - it basically sits on top of everything else.

Maybe if you describe what you are trying to do, we can help identify a way to do it with a Pivot List?


On Apr 27, 2010, at 8:43 AM, Rendell, Stephen / Kuehne + Nagel / Ntg CI wrote:

> Is there some example code for this custom swing adapter knocking around? We are interested in the ability to include a JList in a pivot Frame (along with pivot components)
> 
> Thanks again,
> Steve
> 
> -----Original Message-----
> From:   Todd Volkert
> 
> I actually got a custom swing adapter working in a Pivot app of mine with
> handling of mouse and keyboard events, but the one thing I couldn't get
> around was how some Swing components paint directly to the AWT peer, thus
> bypassing Pivot's paint calls and messing with the z-order.  If JEditorPane
> doesn't do this, then you may be ok.
> 
> -T
> 
> On Sun, Jan 17, 2010 at 2:43 PM, Greg Brown <gk...@mac.com> wrote:
> 
>> Hi LM,
>> 
>> There is currently no way to include a Swing component in a Pivot app via
>> WTKX. We had experimental support for a SwingAdapter component a while back,
>> but there were some challenges in propagating mouse and keyboard input to
>> the Swing components.
>> 
>> If you don't need to handle user input events, you should be able to write
>> a wrapper component that delegates paint() calls to an embedded JEditorPane.
>> Actually, you could still do this even if you do need to handle input
>> events, as long as you register the events on the wrapper component, not the
>> actual Swing component.
>> 
>> Hope this helps,
>> Greg
>> 
>> On Jan 17, 2010, at 2:28 PM, Luke Merolla wrote:
>> 
>>> Hello everybody,
>>> 
>>> I want to ask how it is possible to mix an application with Pivot and
>> Swing component.
>>> Basically what I'm trying to do is to have an application built with
>> Pivot, but I need to use JEditorPane to show some HTML pages.
>>> 
>>> Is there a way to put Swing component into the wtkx file?
>>> 
>>> Any other suggestion is very welcome.
>>> 
>>> Thanks in advance,
>>> LM
> 
> 
> 
> Kuehne + Nagel Ltd. ( the Company) trade solely upon the conditions of the British International Freight Association. Copies of these Conditions can be obtained on application to the Company or upon application to the Director General of the British International Freight Association at Redfern House, Browells Lane, Feltham, Middx, TW13 7EP
> 
> This email and any attachments are confidential and solely for the use of the intended  recipient. They may contain material protected by legal professional or other privilege. If  you are not the intended recipient or the person responsible for delivering to the intended  recipient, you are not authorised to and must not disclose, copy, distribute or retain this  email or its attachments. Although this email and its attachments are believed to be free  of any virus or other defect, it is the responsibility of the recipient to ensure that they  are virus free and no responsibility is accepted by the company for any loss or damage  arising from receipt or use thereof.
> 
> Kuehne + Nagel Ltd.
> Registered in England and Wales number 01722216.
> VAT Registration Number GB 864 4409 10.
> Registered Office: 1 Union Business Park, Florence Way, Rockingham Road, Uxbridge, Middlesex. UB8 2LS


Re: Mixing Pivot and Swing

Posted by "Rendell, Stephen / Kuehne + Nagel / Ntg CI" <St...@kuehne-nagel.com>.
Is there some example code for this custom swing adapter knocking around? We are interested in the ability to include a JList in a pivot Frame (along with pivot components)

Thanks again,
Steve

-----Original Message-----
From:   Todd Volkert

I actually got a custom swing adapter working in a Pivot app of mine with
handling of mouse and keyboard events, but the one thing I couldn't get
around was how some Swing components paint directly to the AWT peer, thus
bypassing Pivot's paint calls and messing with the z-order.  If JEditorPane
doesn't do this, then you may be ok.

-T

On Sun, Jan 17, 2010 at 2:43 PM, Greg Brown <gk...@mac.com> wrote:

> Hi LM,
>
> There is currently no way to include a Swing component in a Pivot app via
> WTKX. We had experimental support for a SwingAdapter component a while back,
> but there were some challenges in propagating mouse and keyboard input to
> the Swing components.
>
> If you don't need to handle user input events, you should be able to write
> a wrapper component that delegates paint() calls to an embedded JEditorPane.
> Actually, you could still do this even if you do need to handle input
> events, as long as you register the events on the wrapper component, not the
> actual Swing component.
>
> Hope this helps,
> Greg
>
> On Jan 17, 2010, at 2:28 PM, Luke Merolla wrote:
>
> > Hello everybody,
> >
> > I want to ask how it is possible to mix an application with Pivot and
> Swing component.
> > Basically what I'm trying to do is to have an application built with
> Pivot, but I need to use JEditorPane to show some HTML pages.
> >
> > Is there a way to put Swing component into the wtkx file?
> >
> > Any other suggestion is very welcome.
> >
> > Thanks in advance,
> > LM



Kuehne + Nagel Ltd. ( the Company) trade solely upon the conditions of the British International Freight Association. Copies of these Conditions can be obtained on application to the Company or upon application to the Director General of the British International Freight Association at Redfern House, Browells Lane, Feltham, Middx, TW13 7EP

This email and any attachments are confidential and solely for the use of the intended  recipient. They may contain material protected by legal professional or other privilege. If  you are not the intended recipient or the person responsible for delivering to the intended  recipient, you are not authorised to and must not disclose, copy, distribute or retain this  email or its attachments. Although this email and its attachments are believed to be free  of any virus or other defect, it is the responsibility of the recipient to ensure that they  are virus free and no responsibility is accepted by the company for any loss or damage  arising from receipt or use thereof.

Kuehne + Nagel Ltd.
Registered in England and Wales number 01722216.
VAT Registration Number GB 864 4409 10.
Registered Office: 1 Union Business Park, Florence Way, Rockingham Road, Uxbridge, Middlesex. UB8 2LS

Re: Load url from applet

Posted by Greg Brown <gk...@mac.com>.
You should just be able to call:

  BrowserApplicationContext.eval("loadPage()", myApplication);

This demo app does something similar:

  http://svn.apache.org/repos/asf/pivot/trunk/demos/src/org/apache/pivot/demos/dom/DOMInteractionDemo.java

The HTML page defines the following function, which is called by the button press listener defined in startup():

    <script type="text/javascript">
        // This function will be called by Pivot
        function sayHello(helloText) {
            alert(helloText);
        }
    </script>

On Apr 27, 2010, at 3:22 AM, Jérôme Serré wrote:

> I am sorry Greg but I don't know to do it.
> The html page is "administration.html", there is a script (js) :
> 
> <html>
> ....
> <script>
> function loadPage() { window.location.replace("/ihm/page/relecture.html"); }
> </script>
> ....
> application_class_name:"ihm.applet.Administration"
> ...
> deployJava.runApplet(attributes, parameters, "1.6");
> ....
> </html>
> 
> How execute the function "loadPage" form applet Administration ?
> Could you tell me an example ?
> 
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 26 avril 2010 18:08
> À : user@pivot.apache.org
> Objet : Re: Load url from applet
> 
> The application name is just the name of the applet hosting the application.
> However, you don't need that to call eval() - you just need the application
> instance.
> 
> On Apr 26, 2010, at 12:02 PM, Jérôme Serré wrote:
> 
>> Thank you,
>> I will use BrowserApplicationContext.eval(), but I don't know how to get
> the
>> name of Application. 
>> Is it the name of the page or do I create loading and how ?
>> 
>> -----Message d'origine-----
>> De : Greg Brown [mailto:gkbrown@mac.com] 
>> Envoyé : lundi 26 avril 2010 16:12
>> À : user@pivot.apache.org
>> Objet : Re: Load url from applet
>> 
>> One approach is to use java.awt.Desktop#browse(). This works well because
> it
>> works for both desktop and browser application contexts. However, it will
>> generally open the page in a new window, which may not be what you want.
>> 
>> You can also use BrowserApplicationContext.eval(), which can be used to
>> execute arbitrary JavaScript in the page. However, this only works when
>> running in the browser.
>> 
>> On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:
>> 
>>> Hello,
>>> 
>>> Is it possible to load a page in the browser from an applet pivot ?
>>> something like:
>>> getAppletContext (). showDocument (new URL ());
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>>> 
>>> 
>>> __
>>> 
>>> Cordialement
>>> 
>>> Jérôme Serré
>>> 
>>> 
>>> 
>>> 
>> 
> 


RE: Load url from applet

Posted by Jérôme Serré <je...@gmail.com>.
I am sorry Greg but I don't know to do it.
The html page is "administration.html", there is a script (js) :

<html>
....
<script>
function loadPage() { window.location.replace("/ihm/page/relecture.html"); }
</script>
....
application_class_name:"ihm.applet.Administration"
...
deployJava.runApplet(attributes, parameters, "1.6");
....
</html>

How execute the function "loadPage" form applet Administration ?
Could you tell me an example ?


-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : lundi 26 avril 2010 18:08
À : user@pivot.apache.org
Objet : Re: Load url from applet

The application name is just the name of the applet hosting the application.
However, you don't need that to call eval() - you just need the application
instance.

On Apr 26, 2010, at 12:02 PM, Jérôme Serré wrote:

> Thank you,
> I will use BrowserApplicationContext.eval(), but I don't know how to get
the
> name of Application. 
> Is it the name of the page or do I create loading and how ?
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 26 avril 2010 16:12
> À : user@pivot.apache.org
> Objet : Re: Load url from applet
> 
> One approach is to use java.awt.Desktop#browse(). This works well because
it
> works for both desktop and browser application contexts. However, it will
> generally open the page in a new window, which may not be what you want.
> 
> You can also use BrowserApplicationContext.eval(), which can be used to
> execute arbitrary JavaScript in the page. However, this only works when
> running in the browser.
> 
> On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:
> 
>> Hello,
>> 
>> Is it possible to load a page in the browser from an applet pivot ?
>> something like:
>> getAppletContext (). showDocument (new URL ());
>> 
>> Thanks
>> 
>> 
>> 
>> 
>> 
>> __
>> 
>> Cordialement
>> 
>> Jérôme Serré
>> 
>> 
>> 
>> 
> 


Re: Adding containers at runtime.

Posted by Greg Brown <gk...@mac.com>.
Could you use data binding to update the data instead of re-creating all of the components each time the data is updated?

On Apr 27, 2010, at 11:39 AM, Shahzad Bhatti wrote:

> Actually, I need to design this table for stock option quotes that are continuously changing, so every time one or more option strike price changes I get the updated data and as a result I recreate all rollups and tables. Usually, I get this data every second so it causes recreation of rollups and tables. I can optimize by caching some data, however structure of the data can changed. For example, currently for each month, I create a rollup, which has two tables, one for call options and one for put options. However, I may get new months or old months may need to be removed. Let me know if you an suggest any performance improvements. Thanks.
> 
> 
> 
> On 4/27/10 4:52 AM, "Greg Brown" <gk...@mac.com> wrote:
> 
> Are you loading the content every time the rollup is expanded, or just the first time?
> 
> On Apr 26, 2010, at 8:27 PM, Shahzad Bhatti wrote:
> 
>> I found that I was reusing WTKSerializer for all sections so changing it reload for every section fixed it. Though, I noticed severe slowness in this approach. So, I am wondering if there is a better way to show tables by sections (Actually, in my case I have two tables per section). Thanks.
>> 
>> 
>> 
>> On 4/26/10 4:37 PM, "Shahzad Bhatti" <sb...@peak6.com> wrote:
>> 
>> I am trying to implement groups of collapsible table by using Rollup and TablePane. At high level, I have a ScrollPane, which in turn has BoxPane. I store the id of BoxPane in my application. Then at runtime, I load the wtkx file containing Rollup and TablePane for each section and then add them to BoxPane. However, it's now showing the contents of the Rollup and tables and I only see thin bar and everything  mangled together. I tried calling validate on top level BoxPane, but it didn't help. Any idea what could be causing it? Thanks.
>> 
>> ______________________________________________
>> 
>> See  http://www.peak6.com/email_disclaimer.php
>> for terms and conditions related to this email
>> 
> 
> 


Re: Docking/undocking panels

Posted by Greg Brown <gk...@mac.com>.
> For the first part, I would like to add some icons on the expander's title bar that user can click to undock or close. For example, in eclipse you can double click tab bar to expand it or click on X to close it. Similarly, in Xcode you can double click a file that shows up as separate frame instead of within main panel.  Any suggestions on adding it.

Expander isn't currently meant to be used in this way. However, I imagine that is how the hypothetical new DockPanel component might work. A nested DockPanel.Frame class might provide these features.

> For second part, in eclipse you have tabs panels on left , lower and right side  and you can drag the tabs bar towards right, down or left and it moves all tabs along those axis. Any suggestions on adding something like that.


You could probably do this via the existing DnD support, but I imagine that a DockPanel component would probably help here as well.

You are welcome to submit a feature request to add this to a future release. However, I might suggest that, if you need this functionality sooner, you could attempt to build it yourself and, if you are so inclined, submit the result for inclusion in the platform.

Greg


Re: Docking/undocking panels

Posted by Shahzad Bhatti <sb...@peak6.com>.
For the first part, I would like to add some icons on the expander's title bar that user can click to undock or close. For example, in eclipse you can double click tab bar to expand it or click on X to close it. Similarly, in Xcode you can double click a file that shows up as separate frame instead of within main panel.  Any suggestions on adding it.

For second part, in eclipse you have tabs panels on left , lower and right side  and you can drag the tabs bar towards right, down or left and it moves all tabs along those axis. Any suggestions on adding something like that.

Thanks.



On 4/27/10 12:39 PM, "Greg Brown" <gk...@mac.com> wrote:

> *   When I define layout using use panels such as BoxPane, TablePane, etc, the layout is fixed. I am looking for a way to undock a panel within my BoxPane or TablePane and undock it so that user can move it outside the parent container. Can someone suggest a way to do it.

Pivot doesn't currently include a panel that supports docking in this way. However, it is certainly feasible and would be a valuable addition to the platform.

> *   Also,  I have some panel with a bunch of tabs and I would like to drag the parent container on the left or top of the screen and automatically change tabs layout to go vertical or horizontal and dock it to the side of the screen that user has selected (similar to how Eclipse IDE works). Is there an easy way to add that feature.

I can't picture exactly what you are describing, but it seems like you might be able to use Pivot's drag/drop support for this.



______________________________________________

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

Re: Docking/undocking panels

Posted by Greg Brown <gk...@mac.com>.
> *   When I define layout using use panels such as BoxPane, TablePane, etc, the layout is fixed. I am looking for a way to undock a panel within my BoxPane or TablePane and undock it so that user can move it outside the parent container. Can someone suggest a way to do it.

Pivot doesn't currently include a panel that supports docking in this way. However, it is certainly feasible and would be a valuable addition to the platform.

> *   Also,  I have some panel with a bunch of tabs and I would like to drag the parent container on the left or top of the screen and automatically change tabs layout to go vertical or horizontal and dock it to the side of the screen that user has selected (similar to how Eclipse IDE works). Is there an easy way to add that feature.

I can't picture exactly what you are describing, but it seems like you might be able to use Pivot's drag/drop support for this.


Docking/undocking panels

Posted by Shahzad Bhatti <sb...@peak6.com>.
I have two questions on docking/undocking:

 *   When I define layout using use panels such as BoxPane, TablePane, etc, the layout is fixed. I am looking for a way to undock a panel within my BoxPane or TablePane and undock it so that user can move it outside the parent container. Can someone suggest a way to do it.
 *   Also,  I have some panel with a bunch of tabs and I would like to drag the parent container on the left or top of the screen and automatically change tabs layout to go vertical or horizontal and dock it to the side of the screen that user has selected (similar to how Eclipse IDE works). Is there an easy way to add that feature.


Thanks.

______________________________________________

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

Re: Adding containers at runtime.

Posted by Shahzad Bhatti <sb...@peak6.com>.
Actually, I need to design this table for stock option quotes that are continuously changing, so every time one or more option strike price changes I get the updated data and as a result I recreate all rollups and tables. Usually, I get this data every second so it causes recreation of rollups and tables. I can optimize by caching some data, however structure of the data can changed. For example, currently for each month, I create a rollup, which has two tables, one for call options and one for put options. However, I may get new months or old months may need to be removed. Let me know if you an suggest any performance improvements. Thanks.



On 4/27/10 4:52 AM, "Greg Brown" <gk...@mac.com> wrote:

Are you loading the content every time the rollup is expanded, or just the first time?

On Apr 26, 2010, at 8:27 PM, Shahzad Bhatti wrote:

> I found that I was reusing WTKSerializer for all sections so changing it reload for every section fixed it. Though, I noticed severe slowness in this approach. So, I am wondering if there is a better way to show tables by sections (Actually, in my case I have two tables per section). Thanks.
>
>
>
> On 4/26/10 4:37 PM, "Shahzad Bhatti" <sb...@peak6.com> wrote:
>
> I am trying to implement groups of collapsible table by using Rollup and TablePane. At high level, I have a ScrollPane, which in turn has BoxPane. I store the id of BoxPane in my application. Then at runtime, I load the wtkx file containing Rollup and TablePane for each section and then add them to BoxPane. However, it's now showing the contents of the Rollup and tables and I only see thin bar and everything  mangled together. I tried calling validate on top level BoxPane, but it didn't help. Any idea what could be causing it? Thanks.
>
> ______________________________________________
>
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email
>



Re: Adding containers at runtime.

Posted by Greg Brown <gk...@mac.com>.
Are you loading the content every time the rollup is expanded, or just the first time?

On Apr 26, 2010, at 8:27 PM, Shahzad Bhatti wrote:

> I found that I was reusing WTKSerializer for all sections so changing it reload for every section fixed it. Though, I noticed severe slowness in this approach. So, I am wondering if there is a better way to show tables by sections (Actually, in my case I have two tables per section). Thanks.
> 
> 
> 
> On 4/26/10 4:37 PM, "Shahzad Bhatti" <sb...@peak6.com> wrote:
> 
> I am trying to implement groups of collapsible table by using Rollup and TablePane. At high level, I have a ScrollPane, which in turn has BoxPane. I store the id of BoxPane in my application. Then at runtime, I load the wtkx file containing Rollup and TablePane for each section and then add them to BoxPane. However, it's now showing the contents of the Rollup and tables and I only see thin bar and everything  mangled together. I tried calling validate on top level BoxPane, but it didn't help. Any idea what could be causing it? Thanks.
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email
> 


Re: Adding containers at runtime.

Posted by Shahzad Bhatti <sb...@peak6.com>.
I found that I was reusing WTKSerializer for all sections so changing it reload for every section fixed it. Though, I noticed severe slowness in this approach. So, I am wondering if there is a better way to show tables by sections (Actually, in my case I have two tables per section). Thanks.



On 4/26/10 4:37 PM, "Shahzad Bhatti" <sb...@peak6.com> wrote:

I am trying to implement groups of collapsible table by using Rollup and TablePane. At high level, I have a ScrollPane, which in turn has BoxPane. I store the id of BoxPane in my application. Then at runtime, I load the wtkx file containing Rollup and TablePane for each section and then add them to BoxPane. However, it's now showing the contents of the Rollup and tables and I only see thin bar and everything  mangled together. I tried calling validate on top level BoxPane, but it didn't help. Any idea what could be causing it? Thanks.

______________________________________________

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


Adding containers at runtime.

Posted by Shahzad Bhatti <sb...@peak6.com>.
I am trying to implement groups of collapsible table by using Rollup and TablePane. At high level, I have a ScrollPane, which in turn has BoxPane. I store the id of BoxPane in my application. Then at runtime, I load the wtkx file containing Rollup and TablePane for each section and then add them to BoxPane. However, it's now showing the contents of the Rollup and tables and I only see thin bar and everything  mangled together. I tried calling validate on top level BoxPane, but it didn't help. Any idea what could be causing it? Thanks.

______________________________________________

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

Re: Load url from applet

Posted by Greg Brown <gk...@mac.com>.
The application name is just the name of the applet hosting the application. However, you don't need that to call eval() - you just need the application instance.

On Apr 26, 2010, at 12:02 PM, Jérôme Serré wrote:

> Thank you,
> I will use BrowserApplicationContext.eval(), but I don't know how to get the
> name of Application. 
> Is it the name of the page or do I create loading and how ?
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 26 avril 2010 16:12
> À : user@pivot.apache.org
> Objet : Re: Load url from applet
> 
> One approach is to use java.awt.Desktop#browse(). This works well because it
> works for both desktop and browser application contexts. However, it will
> generally open the page in a new window, which may not be what you want.
> 
> You can also use BrowserApplicationContext.eval(), which can be used to
> execute arbitrary JavaScript in the page. However, this only works when
> running in the browser.
> 
> On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:
> 
>> Hello,
>> 
>> Is it possible to load a page in the browser from an applet pivot ?
>> something like:
>> getAppletContext (). showDocument (new URL ());
>> 
>> Thanks
>> 
>> 
>> 
>> 
>> 
>> __
>> 
>> Cordialement
>> 
>> Jérôme Serré
>> 
>> 
>> 
>> 
> 


RE: Load url from applet

Posted by Jérôme Serré <je...@gmail.com>.
Thank you,
I will use BrowserApplicationContext.eval(), but I don't know how to get the
name of Application. 
Is it the name of the page or do I create loading and how ?

-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : lundi 26 avril 2010 16:12
À : user@pivot.apache.org
Objet : Re: Load url from applet

One approach is to use java.awt.Desktop#browse(). This works well because it
works for both desktop and browser application contexts. However, it will
generally open the page in a new window, which may not be what you want.

You can also use BrowserApplicationContext.eval(), which can be used to
execute arbitrary JavaScript in the page. However, this only works when
running in the browser.

On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:

> Hello,
> 
> Is it possible to load a page in the browser from an applet pivot ?
> something like:
> getAppletContext (). showDocument (new URL ());
> 
> Thanks
> 
> 
> 
> 
> 
> __
> 
> Cordialement
> 
> Jérôme Serré
> 
> 
> 
> 


Re: Load url from applet

Posted by Greg Brown <gk...@mac.com>.
One approach is to use java.awt.Desktop#browse(). This works well because it works for both desktop and browser application contexts. However, it will generally open the page in a new window, which may not be what you want.

You can also use BrowserApplicationContext.eval(), which can be used to execute arbitrary JavaScript in the page. However, this only works when running in the browser.

On Apr 26, 2010, at 10:06 AM, Jérôme Serré wrote:

> Hello,
> 
> Is it possible to load a page in the browser from an applet pivot ?
> something like:
> getAppletContext (). showDocument (new URL ());
> 
> Thanks
> 
> 
> 
> 
> 
> __
> 
> Cordialement
> 
> Jérôme Serré
> 
> 
> 
>