Display contents of a loop  in SCENE

Hi all,
Can i display the contents of a for loop one after another in a "Scene".
The code below displays the contents of "for" loop in OUTPUT window as well as in the "SCENE". But the problem is that the contents of "for" loop are displayed in the scene graph only after the for loop exits.
how can i rectify this code to generate the output similar to the OUTPUT window in SCENE graph.?
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.text.Text;
import ranno.*;
import javafx.scene.control.Button;
import javafx.scene.Group;
import generateResult.*;
var number: Integer[];
var msg : String ;
var a : String[];
var locX: Integer;
var locY: Integer;
def canvas = Group { };
var display : Button =Button {
translateX: 100
translateY: 100
width : 100
height : 30
text : "Click"
var text : Text
action:function(){
delete canvas.content;
for(i in [0..1])
java.lang.Thread.sleep(1000);
number=i;
println(number[i]);
a=Integer.toString(number[i]);
locX=20;
locY=20;
msg = "{a}";
text = Text{
x: locX
y: locY+20*i
content : msg
insert text into canvas.content;
Stage
title: "Numbers"
var array : String[];
var i : Integer;
scene : Scene
width: 400
height: 200
content :
[display,canvas]
If you haven't understood my question,please execute this code and compare the output in the OUTPUT window with the SCENE output.
I want the output in SCENE to be similar to the output in OUTPUT window.
Please help me in modifying my code .

Since you haven't used the CODE button, the source code is messed up (star means bold here).
But the short answer is: don't use a loop with sleep()!
JavaFX provides Timelines and Transitions to animate things and add stuff progressively to the scenegraph.

Similar Messages

  • Display contents of a loop  with time gaps in between

    Hi,
    I have a peculiar problem.
    Consider a "for" loop
    for ( i in 1..10)
    In the above loop i want to display each value of "i" after a certain time span ( say, 1 sec).
    In java, i could have used a "delay" function,but i do not know as how to achieve the same in javafx.
    Please help me.
    Thanks in advance.

    Something like that probably:
    def seq:Integer[] = [1..10];
    var bound:Integer = 0;
    def anim:PauseTransition = PauseTransition {
      duration: 1s
      repeatCount: sizeof seq
      action: function():Void {
        var m:String = "";
        for (i in [0..bound]) {
          m = "{m} {seq}";
    msg = m.trim();
    bound++;
    anim.play();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Issue displaying content on iframes.

    Hello everyone,
    I am trying to display a few pages on an iframe for a few seconds each on a loop. 
    I have been able to display content on the iframe when I do it by adding this line.
    frame1.Attributes["src"] = "http://intranet.contoso.com/sites/Report";
    Unfortunately it does not work when I try to put it in a loop:
    do
    frame1.Attributes["src"] = "http://intranet.contoso.com/sites/Report";
    Thread.Sleep(5000);
    frame1.Attributes["src"] = "http://intranet.contoso.com/sites/dashboard";
    Thread.Sleep(5000);
    } while (true);
    Is there something I am missing?
    Thanks so much for your help.
    There is always something above the sky

    Please post ASP.NET related questions in the ASP.NET forums:
    http://forums.asp.net

  • Display Content is Not working in BI 7.4

    Hi All,
    In BW 7.4, I am trying to display content via Mange Infoprovider. Till 7.3 the data used to show in the BW system itself.
    Where as in 7.4 BW system display data redirecting to below URL and it’s calling a webdynpro APP called “rsdmdm_md_maintenance_app” as below URL
    http://host:port/sap/bc/webdynpro/sap/rsdmdm_md_maintenance_app?IOBJNM=ZDV_EMPID&sap-language=EN.
    Bu this URL giving 500 Internet server error.
    Can any one help with what I am missing here? In 7.4 is it possible to display content in BW system itself?
    Thanks in advance.
    Venky

    Hi,
    Please review following SAP Note. The new behavior (WebDynpro based Master Data maintenance) is now standard since SAP BW 7.4 SP05. Old SAPGui based screen is not possible anymore.
    The notes describes the SICF services you need to activate to make it work.
    My understanding is that old SAPGui based screen could not handle certain newer data types. As per SAP the new feature has some good benefits such as copy/paster multiple lines from spreadsheet.
    1997402 - Master data maintenance is not possible in old GUI based
    one
    1969105 - Master data maintenance for InfoObjects does not
    start
    517484
    - Inactive services in the Internet Communication Framework
    1969092 - Exception when launching master data maintenance for some
    InfoObjects; additional option for navigating to application log
    Hope this helps.
    btw: I only found out this week hard way as we just did SAP BW 7.4 upgrade. :-)
    Thank you with kind regards,
    Satya,
    Resolution
    It’s not possible to switch to old GUI Based Master data maintenance. Incase
    if new master data maintenance is not working please check:
    Check if services as described in note 517484 is active
    In transaction SICF activate services starting with RSDMDM*
    Check if note 1969092 is implemented already.
    See Also
    Additionally the new UI has some advantages like editing values directly
    within the tables, so it’s not required to edit the values one by one,  or the
    option to copy and paste values from a spreadsheet directly in to table.

  • How do I get to display content from an Azure DB , in a SharePoint external list?

    I have an SQL Azure DB, and I am trying to display contents in an external list in SharePoint Online. I have created the external list from the Azure table with BCS and Secure Store as described in the post below...
    http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/make-an-external-list-from-a-sql-azure-table-with-business-connectivity-services-and-secure-store-HA102933008.aspx
    I am now able to view the column headers for the table, however I don't see any data being displayed. There is a bunch of data in the table, but I can't see anything in SharePoint aside from the column headers.

    Hi Spawn,
    Have you successfully retrieved the database table data in SharePoint Designer 2013?
    There may be some incorrect configurations, I would recommend you create a simple DB table and go through the steps again per your referenced link and below article, see if there is any misconfiguration causing this.
    http://jamesdiblasi.wordpress.com/2014/01/19/sharepoint-online-external-azure-database-as-a-list/
    And also we have a dedicated forum below for Office365 SharePoint Online, you can post there for a better assistance with more experts regarding SharePoint Online issue.
    http://community.office365.com/en-us/f/154.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • My iPad is connected to wifi  but unable to display  contents from iPad to TV via ATV

    A.MY iPad is connected to Wi.Fi but unable to display contents from my iPad to TV via my ATV

    Look at the Apple TV manual
    http://support.apple.com/manuals/#appletv
     Cheers, Tom

  • I'm Stuck at: Safari can't display content on this page.???

    I'm still somewhat new to Apple so bear with me here.
    As I use Safari I attempt to listen to a Radio Player online I'm greeted with this message:
    Safari can't display content on this page.
    Some content on this page requires an Internet plug-in that Safari doesn’t support. The application “Windows Media Player” may be able to display this content. Would you like to try?
    I try that also but to no avail.
    Thanks ahead of time

    There is no windows media player support for the Intel Macs. MS has dropped support for Windows Media on the Mac platform.
    Filp4Mac should have an Intel compatible plugin soon - I have no idea if it will solve this problem, though.

  • Flash Player won't display content in IE

    The Flash 9 player on a system in our organization will not
    display content. Instead the flash window disappears and is
    replaced with a double quote symbol ("). Removal of the flash
    player, rebooting, then reinstalling gives the same result. It does
    this with multiple users (different logons) on this same system.
    System is XP Pro SP2 with IE6. I've also tried resetting the
    Security and Advanced options in IE back to defaults with the same
    result. I cannot find anything online about this problem. It was
    happening on another system here in the office but that system was
    wiped and reimaged due to other problems going on.
    Any ideas would be appreciated.
    Thanks,
    Mike

    read my thread "how I got flash9 to work and can view you
    tube"

  • WebHelp not displaying content in left nav pane

    Any suggestions for why WebHelp is not displaying contents in
    the left navigation pane? When Help is called, it displays the
    frame (including buttons such as glossary, search, contents, etc)
    and the work area, but does not show the TOC in the left navigation
    pane.
    I have also tried generating FlashHelp, with the same
    results. This time, only the work area displays. Any suggestions to
    fix this?
    This is a new project, where RoboHelp is being deployed for
    the first time. Any suggestions for making this a simpler
    transition would be much appreciated. I have used RoboHelp for many
    years with a different company and do not recall ever running into
    this many problems.
    Help!

    Sorry, I haven't used the CSH method which, by the way, was
    designed to show only the topic at first, I think.
    I give my developers a list of path/filenames for topics, and
    they use this form:
    .../helpdirectory/myproject.htm#targettopic.htm
    There are some shortcomings to this method, which leaves the
    window open and, when you call another topic, another new window
    opens. In other words, you have to close the help window manually
    to avoid windowmania.
    A solution is a little js that checks to see if a window is
    already open, closes it and opens a new one. (If no help window is
    open, it's a harmless js error.) It's fast enough that you wouldn't
    notice.
    The downside here is losing the browser history. Forward and
    back buttons work only so long as the help window stays open.
    In my opinion, this is not a major concern, since many Web
    based applications these days tell users not to use the back
    button. Production users won't mind so much.
    For ordinary people doing e-shopping and online banking, the
    browser back button is anathema.
    The bottom line is, if you have a decent set of navigating
    options built into the design -- TOCs, left or right rail lists,
    useful links at top and/or bottom of the topic page, the back
    button can become superfluous.
    Browe sequences work fine from any point in the lineup (I
    know, it's not the same as browser history -- unless you give them
    a really useful set of sequences).
    The forever-loading left pane is gone in RH 7.
    Hope this is useful.
    Harvey

  • Display Content Groups using  JSP

    I have created an ATG content group with the
    rulesets=<ruleset>\n <accepts>\n <rule op\=and tag\="Show">\n <rule op\=and tag\="Content">\n <rule op\=any tag\="ContentSources">\n </rule>\n <rule op\=and tag\="ContentConditions">\n <rule op\=eq>\n <valueof target\="id">\n <valueof constant\="rootProd">\n </rule>\n </rule>\n </rule>\n </rule>\n </accepts>\n</ruleset>
    But i don't know how to use it/ display the product in the JSP.
    I also created a targeter and was able to display the product using TargetingFirst droplet.
    Please share your views on how to display contents of Content Group in JSP.

    Put it in an applet.
    http://java.sun.com/docs/books/tutorial/applet/index.html

  • Display Content Workflow reject notification inside webcenter spaces

    dear all
    i want to ask if there is anyway to display content workflow rejected notification inside webcenter spaces
    regards

    dear all
    i want to ask if there is anyway to display content workflow rejected notification inside webcenter spaces
    regards

  • Display content items into custom remote portlets

    Hi, I need to dinamically display content server items in a custom portlet, using the EDK, but I did not find any way to get this result. Is it poossible to get an object (in my case a published content item) within an ObjectManager and display it's content (in our case a simple HTML content).
    I need to do this because whe have to format the home page of the portal in order to display the first half in three columns and the second half in two columns and we are trying to do this implementing a custom portlet (in the content canvas area) containing a three columns table displaying each a different content item.
    Thank you.

    There are basically two ways that I have done to open the content item editor.1) From a content presentation template you would call a JavaScript function like:
    <script>
    function edit_article$$TOKEN$$() {
    var width = 700;
    var height = 527;
    var left;
    var top;
    left = window.screenLeft + 10;
    top = window.screenTop - 30;
    if ( (left + width/2) > screen.availWidth ||
    (top + width/2) > screen.availHeight ) {
    left = 0;
    top = 0;
    var params = "height=" + height + ",width=" + width + ",left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top + "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1";
    window.open("<pcs:value expr='pcs_location'></pcs:value>/published_tools/content_item.jsp?ciid=<pcs:value expr='pcs_id'></pcs:value>&title=ContentItemEditArticleTitle", '', params);
    </script>
    2) The other way is using the content Item API. You get the editor url from the content item, which you already have. Now what you are doing below is almost correct. The importance of the pt:objectid is crucial. Take a look at the web docs on Plumtree ([url[/url]http://www.plumtree.com/edoc/Enterprise_Web_Development_Documentation.htm) under portlets/adaptive portlets/transformer tags/links. So the reason yours is not working is that you are missing some ptargs. The pt:objectid needs to be the objected of the "Content Administrator" portlet. This is for 2 reasons. One is so that you get the correct PTargs and the second is that it will use the basic auth information stored in its web service. So if your objectid of the portlet was 201 then it would look like this:
    lblHref.Text = "<pt:gatewayLink xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'pt:ObjectID='201' pt:href=\""+ url + "\" target='TinyURL' onclick=window.top.open('','TinyURL'," + WindowOpenParams + ");>"+myContentItem.Name + "</pt:gatewayLink>";
    Andrew Morris | bdg | [email protected]| www.bdg-online.com
    Like blogs? Check out bdg's Plumtree blog at http://bdg-plumtree.blogspot.com.

  • How do I get airplay to display content from my MacBook Pro?

    How do I get airplay to display content from my MacBook Pro?

    Turn on Airplay is display settings.
    Select Airplay mirroring to Apple TV.
    I Will assume you have already connected the Apple TV to your wifi and computer in the settings on the Apple TV.
    that should do it.... Unless you need more information.

  • TEXT AREA - Not able to display contents more than length 4000

    We use textarea item to display contents of xml .
    But if the content is of size more than 4000 , we are not able to display it in text area.
    Any suggession / workaround for this .. please help.

    A simple workaround is to write a function returning this text and use "PL/SQL Function Body" as a "source type" for this textarea. This way you edit text up to 32kB (limit of HTML input item)

  • Displaying Content in Flex - Best Practice

    I'm curious as to people's thoughts for the best methods to
    display content in Flex. In particular, I'm creating a UI and want
    one of the first panels that is displayed to the user to display
    some simple instructions on how to use the UI. Should I import HTML
    from an external file? Should I embed XML or HTML in the SWF? Or,
    should I simply code the content into the SWF? I want the content
    to be styled like the rest of my application - fonts, colors, etc.
    Any suggestions would be greatly appreciated.
    Thank you.

    You can embed the content in the swf (unless you want it to
    change).
    Then you can style it using standard css.
    This way the resulting application is modular, and if you
    change the css in the future, changes are reflected in all your
    styled components.
    More here:
    http://livedocs.adobe.com/flex/1/flex_builder_en/wwhelp/wwhimpl/common/html/wwhelp.htm?con text=Using_Flex_Builder&file=brady510.htm

Maybe you are looking for

  • Exchange 2007 - content-language in message header

    Exchange 2007 The Regional Settings on client computer is set to Bulgarian (Formats/Location/non Unicode/System Account) The Regional Settings in Outlook Web Access for user1 is set to Bulgarian. On the exchange server, the language of mailbox of use

  • Where I get info about a very good game rejected in Itunes

    Dear Iphone people, I'm a developer and I need some information that is really unclear , I want to publish this open letter because it is correct that people know that , I don't want to disclose the title of the game because it is polite I want to ju

  • Why is the fan noisy on iMac? And how do I stop the noise?

    Why is the fan noisy on iMac monitor and how do I rectify the problem?

  • Forwarding shopping carts

    Hi experts, I am currently working on SRM 7.0 and had a query wrt forwarding shopping carts (SC) There are a lot of incidents where the support team needs to redirect SCs to the assigned approver because the first approver might be on leave. In such

  • RAW support for Lumix GX1?

    When will Aperture start supporting RAW files from Panasonic Lumix GX1? Do I really have to switch to Lightroom?