How to get the measure of area in HTML by Java

Hi all,
I know in JavaScript,
clientheight and clientlength can get the measure of area of HTML element, but how can I implement this in Java?
I understand I may need to have a much complete browser component first (for weak HTML rersolving in JDK), but I would like to know how HTML rendering works in JEditorPane and JTextPane, maybe that can help me solve the problem.
Appreciate for any suggestions and references.
Best regards,
KaiLiang

Thanks lots!!
So, the View class in JDK does not deal with the width and length information, does it?
If I want to solve my problem, I have to customize View class to make it can deal with width and length information.
Is it possible to get width and lenth of elements when JEditorPane render the HTML?

Similar Messages

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to get the current path of my application in java ?

    how to get the current path of my application in java ?
    thanks

    To get the path where your application has been installed you have to do the following:
    have a class called "what_ever" in the folder.
    then you do a litte:
    String path=
    what_ever.class.getRessource("what_ever.class").toString()
    That get you a string like:
    file:/C:/Program Files/Cool_program/what_ever.class
    Then you process the result a little to remove anything you don't want:
    path=path.substring(path.indexOf('/')+1),path.lastIndexOf('/'))
    //Might be a little error here but you should find out //quickly if it's the case
    And here you go, you have a nice
    C:/Program Files/Cool_program
    which is the path to your application.
    Hooray

  • How to get the source code of an HTML page in Text file Through J2EE

    How to get the source code of an HTML page in Text file Through J2EE?

    Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
    - Saish

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How to get the measure total at row level for another measure calculation in DAX?

    Hi There,
    Using DAX, I am trying to get an expression for a calculated measure as follow:
    So basically, I would like to get the AMeasure total highlighted in yellow in the A2Measure calculation:
    Smeasure -(Ameasure total * WMeasure) where Ameasure total is the one highlighted. 
    I think my question would be how to get the total of a measure in order to used in the calculation of another measure.
    Thanks and best regards,
    Joss

    Hi Joss83,
    If you're trying to get the result for [AMeasure] at the total level (i.e. 5.09 in your example) you can do this by creating a version of this measures that is evaluated after ignoring the filters (indirectly or explicitly) placed on
    the 'Customer' and 'Player' columns. You may also need to ignore the filters place on some other tables or columns that must be ignored in order for the correct total to be returned.
    Without knowing much more about your data model, I can only take a vague guess as to what this calculation would look like in your scenario:
    AMeasureTotal:=
    CALCULATE(
    [AMeasure],
    ALL(Customer[Customer]),
    ALL(Player[Player])
    You can read more about the 'ALL' DAX function here:
    http://technet.microsoft.com/en-us/library/ee634802.aspx
    Hope this helps,
    Michael

  • How to get the upload file from a html form ?

    I have a <input type=file ...> control in my form, and the user use that
              control to submit a file
              to my web server. The porblem is the getParameter() function of
              HttpServletRequest only return the
              filename. Does anyone know how to get the file body ?
              Frances
              

    http://www.servlets.com/jsp/examples/ch04/index.html#ex04_17
              Frances Fan <[email protected]> wrote:
              > I have a <input type=file ...> control in my form, and the user use that
              > control to submit a file
              > to my web server. The porblem is the getParameter() function of
              > HttpServletRequest only return the
              > filename. Does anyone know how to get the file body ?
              > Frances
              Dimitri
              

  • How to get the measurement data from IMU using SBRIO through SPI?

    Hi All,
    I’am trying to use the SPI communication protocol to realize the bridge between my Vectornav VN100 IMU chip and the LABView through the SBRIO 9602. I amended the SPI sample code from NI website based on my own device and configuration. It compiled and ran well. The problem is the IMU we are using need a 16 bytes command and it will give back a response containing the measurement data. But it seems that with the code I have, I can only send an at most 32 bits command once. Hope anyone who has experience in IMU implementation on LABView could give me some help! Thanks a lot!
    Nick

    Kyle,
    Thank you very much!
    I attached the amended program and the Manual Sheet of the IMU I am using.
    Since I only need to one port, I just amended the configuration for port 1 and adjusted the code for my device. 
    I think the problem exist in the data sending mechanism, you can check the requirement out in P12 and P13 of the manual sheet.
    Best Regards!
    Nick
    Attachments:
    Vectornav VN100.pdf ‏1774 KB
    spi_dual_port_example.zip ‏755 KB

  • How to get the Objects which are used in the webi Report.

    Hi Expert,
    I am trying to get the list of  WebI reports and Objects which are present in the report at  BO 4.0.
    I can able to get details  for only the list of reports and universes.
    Could  any one help me to get those details.
    Regards,
    Murali S

    With 4.0, there is no longer a way to do this using just the .NET SDK because the ReportEngine SDK no longer exists for .NET.  Instead, you'll have to look at using the RESTful Web Services SDK for Webi which runs in the Web Application Container Server on your report server (NOT on the web server!)
    RESTful web services are platform-independent and don't require the installation of any SDK files.  Everything is done through standard HTTP Get, Put, and Post commands and the results are returned in either XML or JSON format.  You don't mention which service pack of 4.0 you're on, but the RESTful web services have evolved over the course of the 4.0 service packs, so more recent is definitely better.
    You can find the documentation for this in the "Development Information" section at help.sap.com/bobip40.  There is also a "space" on SCN for this at http://scn.sap.com/community/restful-sdk and there are some links on this page for various resources and sample code.
    -Dell

  • How to get the output of a C prgram to Java to the parent Java program

    Hi,
    Suppose there is a Java Program which calls inside it the C program.The C program outputs as below
    printf("%c%c",c1,c2);
    Now I have to take this output as an input of the Java Program for further processing.How can I do this?
    Tapas

    By reading from the output stream of the C program.
    (if you're not already reading the output stream of the program anyway, you should be - http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#2 )
    The format is a char, a space, a char, so just call read() three times and ignore the second value.

  • How to get the list of all running process in java

    hi all,
    i want to get the list of all running processes on my system. please let me know if it is possible to do with JAVA. which class i should use?
    waiting for reply
    bye

    Wrong forum. Just a hint.

  • How to get the color value matching with HTML?

    Hello,
    I'd like to have the color value based on the HTML pattern using JS like InDesign file is having the value c=80,M=20,Y=40,K=20 and getting the HTML pattern as #29a37a during HTML export.
    Please advise to get the same type of value for all the colors in InDesign without doing HTML export using JS.
    Thanks,
    Praveen

    @Gejaraja – read the following to get an idea:
    Harbs
    Hexadecimal Swatches in InDesign
    http://in-tools.com/article/scripts-blog/hexadecimal-swatches-in-indesign/
    Uwe

  • How to get the Network Users Are Available Dot to Show up Automatically On Mac OS X Login Screen

    i am wondering how you make it so that the little tiny green dot with network users are avalble appere on start up automaticly with out having to do a bunch of crap
    dont know if this matters but i am using an emac (Not Sure What Modle) With mac OS X Server 10.5 and 1 GB Ram and Grand Total of 100GB of HD Space so please Help me i really could use this my clients always come and ask me how they know when the can login our that there account wont let them login so this will he a bunch with trouble shooting
    Message was edited by: Karlplanken

    defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo DSStatus
    Or, use managed preferences in Workgroup Manager,

  • How to get the filters of Webi document/Report using Java code in XI SDK.

    Hi All,
       I have a requirement where i have to extrcat filters from the Webi Document.using java SDK.
    I am trying to find the class called "filterable"but not able to use in my java code and will get always
    "java.lang.ClassCastException  com.businessobjects.wp.om.OMDocument cannot be cast to com.businessobjects.rebean.wi.Filterable"
    I am using the below java code like
    ReportElement re=document.getStructure()
    FilterContainer flt=((Filterable) re).getFilter()
    I am stuck and need this in uregent.
    Please help.

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to get the client's IP address from within Java Studio Creator JSP/Java

    Hi there.
    I just started using the Java Studio Creator 2 and now I need to get hold of the client IP address - this should be part of the request, but I cannot fint the right way to get hold of that information. I want to be able to access this information from within the Java-code in a JSP/JSPF-page.
    Is there a new way of doing:
    request.getRemoteAddr();
    This is the way I remember it from the JSP/Servlet-days...
    Sincerely,
    - Oystein Saebo -

    javax.servlet.http.HttpServletRequest req = (javax.servlet.http.HttpServletRequest) getExternalContext().getRequest();
    req.getRemoteAddr();

Maybe you are looking for