How get column index and row index in gridpane of javafx

how get column index and row index in gridpane of javafx. see the code below
Text text1 = new Text("Text 1");
Text text2 = new Text("Text 2");
StackPane root = new StackPane();
GridPane gridPane = new GridPane();
gridPane.add(text1, 0, 0);
gridPane.add(text2, 1, 0);
When Mouse Entered On text1 i want to get the column index and row index of GridPane
text1.setOnMouseEntered(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent e) {
                //want to get column index =0 and row index=0
Please let me know.

Hi,
If I remember well:
[code]
text1.setOnMouseEntered(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent e) {
                //want to get column index =0 and row index=0
                System.out.println("Column: " + GridPane.getColumnIndex(text1));
[/code]
-- daniel

Similar Messages

  • Interactive Report Column Headings and Row Height

    I am using the div style="width:350px;" method to control the width of columns in various interactive reports. That works fine except for the following:
    1. When creating filters, the <div...> stuff shows up along with the actual column heading, thus confusing some end users
    2. Even when I uncheck the "Use same text for single row view" checkbox and then provide a simple single row view label, the <div> stuff still shows up on the single row view
    Does anyone have a better solution?
    Also, does anyone know of a way to limit the row height within an interactive report row? I have some columns of data that contain a large amount of HTML data and I'd like to be able to limit the number of rows that show on the report.
    Is Oracle planning to provide some better control over the Interactive Report columns in another version? The Interactive Report is such a huge improvement in usability in APEX - it would be great to take it to another level by providing some better control over column width and row height.
    Edited by: DaleB on Jun 18, 2009 8:54 AM
    Edited by: DaleB on Jun 18, 2009 8:54 AM

    Dale,
    Unfortunately we don't have much we can use to do what you would like. I would have said it's impossible until version 4 but you could actually do something similar to what Roel has done. His trick is in the edit button. He changed the edit button to use an "onload" call to a JavaScript process. You could do the same but call a process that goes across the rows and styles each column. Now because you don't have a way to identify the column (can't use the order because the end user could change it) you'll have to write the code to look at the top row first and then style the appropriate column. As far as I can tell, this would be quite difficult and inefficient. Having said that if you need it that bad and would like some help with it, put up an example application on apex.oracle.com and provide the workspace/username/password and I'll take a look.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How 2 create coloumns and rows in smartforms using template????

    How to create coloumns and rows in smartforms using template????...
    Kindly explain in details.......
    Regards,
    Faiz
    Moderator message: please search for available information.
    Edited by: Thomas Zloch on Mar 5, 2012

    Hi JV,
    Yes you can create rows dynamically in a table in IF. You can follow the instruction in [this link|Re: Dynamic Table -  same data repeating in all rows] to create the dynamic table.
    Also refer to these links:
    [Data in dynamic table not pass to webdynpro java|https://forums.sdn.sap.com/click.jspa?searchID=16436680&messageID=5638776]
    [DYNAMIC TABLE IN WEBDYNPRO INTERACTIVE FORM|https://forums.sdn.sap.com/click.jspa?searchID=16436680&messageID=5775811]
    Hope this helps!!
    Regards,
    Arafat

  • How get transparent index for indexed image?

    Hello,
    In my fileformat plugin on writing I can't get transparent
    color for indexed image. For RGB
    image I got transparent data from alfa channel in data of FormatRecord.
    The FormatRecord structure has value
    transparentIndex (for GIF), but it always =0
    (even, if in the image transparent index=12, for example).
    How can I get transparent index? Or, if it possible, how get transparent
    data for indexed image in alfa channel?

    Hello,
    In my fileformat plugin on writing I can't get transparent
    color for indexed image. For RGB
    image I got transparent data from alfa channel in data of FormatRecord.
    The FormatRecord structure has value
    transparentIndex (for GIF), but it always =0
    (even, if in the image transparent index=12, for example).
    How can I get transparent index? Or, if it possible, how get transparent
    data for indexed image in alfa channel?

  • Columns, cells and row headings

    My printer continues to print column headings, cells and row headings even though none of these boxes are checked under the Appleworks (6.2.9) pull down menu

    Welcome to Apple Discussions
    When an application stops working as it should, it's likely due to corrupt preferences. You can follow the steps in this user tip or use the reset function of Dale Gillard's Sidekick.

  • File dialog box: how get  full path and filename

    Hello All
    i have a problem to save the full path and filename with file dialog box.
    I want to save full path and filename in the database for creating a link to a file.
    I use a file-dialogbox to choose a file.
    I see in the textfiled something like this
    \FULLPATH\filename.ppt
    but when i save the textvalue in the database or look at the seesionvalue I see
    this:
    F2087258868/filename.ppt
    but I need the full path to create a link. How I can get?
    I use version 2.2.1..
    Thanks
    Putcho

    Hi Putcho,
    You can create some javascript that puts it into a hidden item.
    In HTML Form Element Attributes: onChange="$x('P15_X').value=$x('P15_FILE').value;" Then create another process that stores the value of the hidden item in your own table...
    I quickly made an example with a normal text item, so you see it copies itself to the other box: http://apex.shellprompt.net/pls/apex/f?p=286:15
    Hope that helps,
    Dimitri
    http://dgielis.blogspot.com

  • How get URL variable and show picture?

    I have a url, for example:
    www.MyWebsite.com/Flash.html?Pic1=1.jpg&Pic2=2.jpg&Pic3=3.jpg
    Flash.html has a Flash swf file in it.
    In my FLA file I want to dynamically show (in 3 movie clips,
    mc1, mc2 & mc3) the 3 pictures from the 3 URL arguments.
    How do I do this?
    Thanks!

    To clarify some requirements: I can only use a URL, a HTML
    file and SWF (no scripts). AS is ok. Cant use code to create EMBED
    params etc...
    Also, this has to work in MX.
    Any ideas? Thanks.

  • How get recently created and updated events from google calendar using pl/s

    Hello
    I am able to get Google calendar events using pl/sql..I am receiving huge xml code(if there are more events),want only update and recently created events instead of getting repeated events.please help me in this regard.
    Thanks
    Edited by: user12180635 on Mar 2, 2012 1:49 AM

    This is the forum SQL Developer (Not for general SQL/PLSQL questions).
    Your question would probably be better in a Google forum since the answer is probably somewhere in google's API. Or if you want to extract items from your file, try the SQL and PL/SQL forum here, or possibly one of the XML development forums.

  • WPF: How to make the Column and Row separator more wide and different color in datagrid?

    Our application uses WPF.
    One of request is make the DataGrid column separator and row separator more wide and use different color and remove original black separator of rows and columns.
    Which template we need to modify to make it? Thx!
    JaneC

    Hi Magnus,
    Thanks for replying our question and provide your suggestions!
    Now we know modify both HorizontalGridLinesBrush and VerticalGridLinesBrush we can change the DataGrid cell separator color.
    Following your suggested, we modify the DataGridCell as following:
    <Style x:Key="Body_Content_DataGrid_Centering"
    TargetType="{x:Type DataGridCell}">
    <Setter Property="Padding" Value="2,0" />
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DataGridCell}">
    <Border BorderThickness="2" BorderBrush="{StaticResource PageBorderBackground}" Margin="-1">
    <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
    <ContentPresenter VerticalAlignment="Center"/>
    </Grid>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <Style x:Key="DataGridStyle1" TargetType="{x:Type DataGrid}">
    <Setter Property="HorizontalGridLinesBrush" Value="{x:Null}"/>
    <Setter Property="VerticalGridLinesBrush" Value="{x:Null}"/>
    </Style
    JaneC

  • How can I make the rolumn and row headers appear on the printed sheet?

    I am working in Numbers'09. I want to print out my chart with the column letters and row numbers showing.
    How can I make the rolumn and row headers appear on the printed sheet?

    g,
    Those annotations are called "Labels", and they are only visible during editing when a cell selection is made within the table. If you need to have the labels on your final output, you can create labels in Text Boxes and position them adjacent to the table.
    Jerry

  • DISPLAY COLUMN NO'S AND ROW NO'S IN SMARTFORMS

    HI ALL,
    I M HAVING REQUIRMENT TO DISPLAY COLUMN NUMBERS AND ROW NO'S IN SMARTFORM
    I'M NEW TO THIS PLS SUGGEST ME.
    THANK YOU ALL IN ADVANCE.
    Moderator message: please search for information and try yourself before asking, do not post in all upper case.
    Edited by: Thomas Zloch on Nov 19, 2011 10:31 PM

    That's good news! You've found another way for the same result. It depends on what is needed. SumIf is more for adding the the totals of a numeric column based on the values of another column. For example, What is the total of column B responses that have "yes"?
    Regards,

  • How can i edit perticular row in dynamically created table

    Hi to All,
    Here my requirement is create table dynamically from existing XML and first column with radio buttons,column data and row wise data there on XML but i'm able to create table and displaying data then whenever i click on first column radio button that row editable and remaining rows in disable mode then i edit that row and click on save button that particular row data will be inserted to XML.Please tell me how can i achieve this requirement.
    Thanks and Regards,
    surya.

    Hi surya
    - Use RadioButtonGroupByIndex for the first column.
    - Disable automatic change of table's lead selection: selectionChangeBehaviour = manual, selectionMode = none.
    - In onSelect event handler of the RadioButtonGroupByIndex set new table's lead selection from the code to the row where the button is clicked.
    - Add calculated read-only attribute isRowEditable (boolean) to the table's node. Getter shall be like this:
    return (element.index() == element.node().getLeadSelection());
    - Bind the cell editors' enabled property to isRowEditable attribute.
    BR, Siarhei
    PS: this is my message #666 - do not trust it
    Edited by: Siarhei Pisarenka on Feb 23, 2010 2:29 PM

  • How to get the column index inside a dataTable

    Hello,
    before I get staked, there are multiple threads handling familiar topics to the one I'm questioning about but none gives an anwer. If there is one, I'm propably to less skilled to see it.
    So here is my Problem: I've build a web-interface to a time-recording system. The hours worked on a certain project are displayed in a dataTable component which is generated out of a mySQL Query. Each entry (column/row) contains a inputText component to display and edit the specific value.
    Editing one of these inputText elements now fires a valueChangeEvent which reads the new value and stores it in the database. For that cause I need to know the row- and column-index of the inputText component that fired the event.
    Using the getClientId method from the valueChangeEvent I get some Information which makes it possible to calculate the row/column index. A typical clientID looks like "form_table:mainTable:0:_id14". "form_table" is the ID of the form the dataTable is in. "mainTable" is the id of the dataTable component. "0" is the row the component is in. And finally "_id14" stands for the id randomly given to the inputText component by JSF.
    My Problem is now, that though I can calculate the column out of the[i] "_id14", this calculation is hardcoded. So everytime I add a component in before the dataTable, the calculation needs to be adjusted in the code.
    The Questions:
    - How to force a sensefull id indicating a column-index for the inputText components inside the columns of a dataTable?
    - Nicer since no workaround: How to get the column-index inside the dataTable on a natural way? (e.g. out of the valueChangeEvent the specific inputText component fires)
    After some investigation here on the board and on the net I know multiple ways to get the row index, (Things like component-binding and so on) but I can't find a answer on how to get the column-index.
    Thanks to all answers and/or links to things my eyes missed while searching for one.

    ...then index 0 becomes index 1 and my program doesn't work properlyThe program works properly, just not as you expect it to.
    As you've noticed the table gives you the flexibility to move columns around. So if you move column 0 to column 1, why would you expect to still use 0 as the index? The table manages the reordering of columns for you to make sure the data being displayed in each table column comes from the correct column in the data model.
    You can manage this yourself using one of the following methods (I forget which one):
    table.convertColumnIndexToModel(int viewColumnIndex)
    table.convertColumnIndexToView(int modelColumnIndex)
    Or, you can get data from the data model directly:
    table.getModel().getValueAt(row, 0);

  • How to get the index of a h:column element?

    Hi!
    I'd like to know how to get the index of a <h:column> element.
    Here is the code of what I'm trying to do:
    <h:column>
         <a:commandLink
              value="#{familyAction.familyDocsByPrj}"
              action="#{homeAction.search(ROW_INDEX)}"
              reRender="rightAppPanel" />
    </h:column>When clicking a row, I'd like to make a "search" depending on the selected row.
    Does anybode know how to do that?
    Thanks a lot :)

    Thanks a lot for all your answers! :)
    I finally got to do something with my little knowledge =P
    I created a new class containing all the data needed for the dataTable (including a "String id").
    And that's what I get:
    <h:column>
         <a:commandLink
              value="#{familyAction.familyDocsByPrj.name}"
              action="#{homeAction.search(familyAction.familydocsByPrj.id)}"
              reRender="rightAppPanel" />
    </h:column>

Maybe you are looking for