Getting the size of resizable nodes

Hi,
how can I determine the width and the height of a resizable node (e.g. a Textfield or some other control), to use that in a custom layout or a custom control, that the resizable node is part of. It seems that the resizable node's width and height are computed later as everything I try returns width and height 0.
Cheers
Thomas

Hi,
thanks for your answer. That was my impression too, that a resizable node doesn't know its size until it is sized by it's container, which makes sense to a certain degree as "resizable" means that one has not to care about sizing as the parent container or layout does. Anyway in a context where you want to size or layout something depending on the size of an other node you have to know that other node's size and/or position during the layout/sizing process and not after it. Preliminary or invisibly rendering would be a workaround, yes, but isn't there a more elegant way for doing something like this? What is the best practice to do something like this, how is it done in the layout classes of JavaFX?
Unfortunately the layouts in JavaFX are not open sourced yet (looking at them might be a good source) and the documentation on custom controls in general and sizing, positioning and dynamically laying out nodes in JavaFX 2.0 that can be found on the web so far is not very comprehensive.
Cheers
Thomas

Similar Messages

  • How do I get the size of a variable on runtime while...

    Hi,
    I want to get the size of a variable which is storing an xml input from db.
    I want to get the size of this variables on several intervals like displaying a message when the variable holds the data = one megabyte and then so on .
    is it even possible to get the size in runtime?
    guidance is greatly appreciated.
    thanks

    So you are looking for the total size of all the objects which go together to make the DOM implementation of your XML. Even if you could find that in any particular case, it would only be a rough guide. I suspect that if you have a few large text nodes in your XML, the DOM will be smaller than if you had many small text nodes, because it would require fewer supporting objects.
    If you are interested in a rule of thumb, Michael Kay (who wrote the Saxon XSLT transformer product) suggests that 10 megabytes of XML is about the largest practical file size at the present time. I have however seen claims of people transforming files as large as 30 megabytes.
    However, since you are sending the result to a browser, I don't see how you can handle that much data anyway. First of all it is going to take minutes to load into the DOM, while the user waits, and secondly you are going to have to summarize it heavily to be of any use to the user, which suggests that you should store it in some other format that is easier to summarize.

  • Webkit - Get the size of the html content

    I want to resize the window of my Webkit app so that it snugly fits the content that it is displaying. I know how to resize a window - but I don't know how to get the size of the content I am trying to display. Clearly, webkit knows the size of the content because it can centre the content on the screen and display scrollbars if necessary. How can I get this information?
    I am using Objective-C to write my app.

    The page hasn't finished loading so the preferred size isn't known yet. Check out this thread:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=333171

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

  • How can I get the size of a file with apple script

    I try to get the size of a file within an apple script. But I did not find information how to do this.

    There are two ways. I think Apple is moving toward using System Events, which is listed first.tell application "Finder"
    set myFile to selection as alias
    --this just gets a file for me to work with
    --coercing it into an alias is required for the other functions
    end tell
    tell application "System Events"
    get size of myFile
    end tell
    set myInfo to (info for myFile)
    get size of myInfo

  • Getting the XPath from a Node

    Hey Folks, have a scenario where i need to link my data, i.e one node points to another node, e.g
    <data>
    <liability id="1">
    <value> 10000 </value>
    </liability>
    <asset id = "2">
    <value> 20000 </value>
    </asset>
    </data>
    so take the case above, i have a house which is an asset and i have a mortgage(liability) on that house, now i want to show that in my asset that there is a liability on this asset, so i need to come up with a way to link my asset to a liability, now easiest way in my thinking is just point to the XPath of the liability!! Now problem is this, at the data level that im working at, i know what data node im working on but i dont know its absolute path, in my case the above XML is just a snippet of what im dealing with, there is more hierarchical levels in my document!! Maybe im blind but i couldnt see from the API how to get the XPath of a node?? is there existing API which does this or will i have to go ahead and write something to come up with the XPath!! or does anyone have any other suggestions as to how i would do my link??
    The way i see my XML when finished is something like this
    <data>
    <liability id="1">
    <value> 10000 </value>
    </liability>
    <asset id = "2">
    <value> 20000 </value>
    <liability> /data/liability[@id='1'] </liability>
    </asset>
    </data>
    any thoughts are welcome,
    cheers,
    LL

    A better design would be to make your "id" attribute the key... looking back at your post, it seems that you have done that already. So your XML should just look something like this:<data>
    <liability id="1">
    <value> 10000 </value>
    </liability>
    <asset id = "2" liabilityid="1">
    <value> 20000 </value>
    </asset>
    </data>Then when your code needs to match the liability to the asset, you can easily build the XPath to find it. (Of course if there can be more than one liability per asset, you shouldn't use a liabilityid attribute as I did in the example.)
    PC&#178;

  • Getting the size from a model

    Hello
    How can I get the size of a model (from a *.w3d-file). The
    model does not contain the properties width, height or length, so I
    guess that I have to measure the distance between the models
    vertices.
    But I can't seem to think of a good way to do it in. I guess
    a loop of some kind? But it would seem rather unomptimized to
    actually loop through each and every vertex point in the model I
    wan't measured.
    Any suggestions?

    The closest thing to model's dimensional properties is the
    model's boundingSphere property. It gives a radius of an imaginary
    sphere that contains all the vertices of the model; the sphere's
    diameter is the distance between the two farthest-apart vertices.
    However it includes the model's children in the sphere. Set
    yourModel.debug = TRUE to see it.
    You could loop through each model, add a mesh deform
    modifier, go through each mesh[ ].vertexlist, keep track of each
    max and min x, y, and z value, the calculate w, l, h from that. It
    would take a little time... you probably wouldn't want to do it
    every frame. But you could do it on a keypress or something.

  • By mistake, I shrink the size of a particular page, which firefox then remembers. How do I get the size back to normal?

    When moving around on websites, somehow I manage to shrink the size of what is shown on the screen. I have not figured out how to get the size back to 'normal'. However, Firefox remembers this so when I reenter this particular size, it will still be in the smaller format. Very frustrating and as this has happened for at least two of my most watched sites, I am more and more using competing formats, e.g. Explorer.
    I have alsl asked more experienced users of Internet to try to solve this but they are as lost as I am.
    Looking forward to getting your advice.
    Best regards,
    Lars Henriksson

    You can hit CTRL++ to zoom. Or install these add-ons:
    https://addons.mozilla.org/en-US/firefox/addon/theme-font-size-changer/
    https://addons.mozilla.org/en-US/firefox/addon/zoom-page/

  • How to get the size of the cuurrent illustration

    Sorry, I made a mistake before this one. The questios is this: can anybody tell me how can I get the size of the current illustration, (as oposed to the page size) in points. Something like 120 points wide and 87 points High?. What function do I need to call?

    From AI Function reference (included with CS2 SDK):
    AIDocumentSetup setup;
    error = sDocument->GetDocumentSetup(&setup);
    if (error) goto processError;
    writeDocumentSetup( &setup );
    The AIDocumentSetup record returns the following information:
    typedef struct {
    AIReal width, height;
    AIBoolean showPlacedImages;
    short pageView;
    AIReal outputResolution;
    AIBoolean splitLongPaths;
    AIBoolean useDefaultScreen;
    AIBoolean compatibleGradients;
    AIBoolean printTiles;
    AIBoolean tileFullPages;
    } AIDocumentSetup;

  • How to get the size of driver[C: or D:]

    Hi Friends,
    I have a query regarding to java..
    I want to get the name of all the drives that r connected to the System including network drives...
    and how to get the size of any system drive[For example C: or D: Drive].
    I want the output to be displayed like in the following format
    Device type size free Usage_Space
    for ex.
    C: NTFS 37.5Gb 30.5gb 7gb
    Output like as linux command df -h
    Edited by: KituPrash on Mar 4, 2009 3:29 AM

    Does this help for starters?
    File[] roots= File.listRoots();
    for (int i= 0; i< roots.length; i++)
         System.out.println(roots[i]+": "+roots.getTotalSpace());kind regards,
    Jos                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get the size of physical memory by using system call ?

    how to get the size of physical memory by using system call ?What system call can be used for me to get the size of physical memor? thanks.

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • How to get the size of JSP html output?

    Hi,
    Is there a JSP method to get the size of JSP HTML output.
    e.g. I would like to print the size of the JSP e.g.
    Size of this page is <%=pageContext.getPageSize()%> Kb ???
    Any ideas? Thanks.
    George
    Edited by: googchro on Jan 5, 2010 4:45 PM

    Would you like to print "the size of this page is..." before or after you calculate the size of the page.
    Because adding that bit of text to the page will make the page bigger...
    Doing it in java, the best approach would probably to have a filter counting the number of bytes that gets sent to the writer/output stream.
    A client side tool measuring the amount of bytes received would probably be easier though.
    You can always look at the Content-length header sent with a response. Though you normally don't have access to that on the java/jsp side, as it is sent by the container.
    cheers,
    evnafets

  • How to get the size of partition?

    The following SQL will get the rows of the fact table & aggregation. But how to get the size (MB) of the partition. select * from $system.discover_partition_stat That should be doable, because in BIDS, we can see the size of a partition, but from which
    view we can do that?

    This is the best bet you have SELECT * FROM SystemRestrictSchema($system.discover_partition_stat ,DATABASE_NAME = 'Adventure Works DW' ,CUBE_NAME = 'Adventure Works' ,MEASURE_GROUP_NAME = 'Internet Sales' ,PARTITION_NAME = 'Internet_Sales_2003') Refer
    this article: http://geekswithblogs.net/darrengosbell/archive/2008/12/02/ssas-are-my-aggregations-processed.aspxvinu

  • How to get the size of the webpage?

    I am designing a program to
    analyse the webpage content.
    wondering how to get the size of
    the webpage including its image's
    size and etc. Thanks in advance.

    As i know , the getContentLength just return
    then number of characters of its HTML code.
    By knowing the length of the HTML code, is
    not possible for me to calculate its download
    time... i wonder is there any way to get the
    total size of the page including its image size,
    applet size, and etc... Thanks : )

  • How to get the size of a hard disk?

    Hi,
    As above, how to get the size of a hard disk by using Java.
    Thanks you!
    Alex

    I would be interested in the answer of this question, too.
    In core Java there is no way to find it out in a platform independent manner because of the hardware abstraction of the VM. So my only idea is to write a native library for doing this and colling it via JNI

Maybe you are looking for

  • Pc or Mac for Uni please help!

    I start uni soon my old toshiba is soon dead. I need a computer. I would love a macbook or macbookpro. The uni has some softwares - open uni - which are pc only. They recommend Pc. Now with a mac would I be ok? Like i know you can out windows on it ,

  • ASP insert record receive mail alert

    Hi, I have an insert record in my ASP page to my db Access, that's works fine. I want to know if it is possible to send at the same time a mail to me that tell me there is a new record? Can I put two form actions in the same form? <form action="<%=MM

  • Resetting the restrictions passcode

    Is there any way to reset the restrictions passcode without resetting the entire device?

  • ITunes preferences not saved after logging out.

    iTunes preferences not saved when logging out. Using iTunes11.0.4.4  Preferences are not saved when logging back in. Is this a bug or is there a file or registry key I need to fix? Thanks

  • Query a single SDO_ORDINATE

    Hi all, I need help trying to query a table for one SDO_ORDINATE set of coordinates. I have used the below query which gives me all the SDO_ORDINATES... select * from table(select a.coverage.sdo_ordinates from inspection_zone a where ID = 421198460)