How to get the FileSystemTree coordinates selected item?

Hi can we idea me in how to get the coordinates of the itwn selected in a FileSystemsTree?

THX

g

You should do something like this:

var itemRenderer:DisplayObject = fileSystemTree.itemToItemRenderer (fileSystemTree.selectedItem) as DisplayObject;
Contact information: Point = itemRenderer.parent.localToGlobal (new Point (itemRenderer.x, itemRenderer.y)) var;

contact information is now an object point representing the coordinates of your itemRenderer in the global coordinate system.

Tags: Flex

Similar Questions

  • How to get the global coordinates of the mouse of a scene?

    Hi guys,.

    I want to connect a node to the global coordinates of the mouse position. I tried several things, but not more than work as expected:

    1. APPROACH 1: setting a property onMouseMoved to the scene:

    ----
    scene.onMouseMovedProperty () .set (new EventHandler < MouseEvent > () {}
    @Override
    public void handle(MouseEvent me) {}
    stepDropper.setTranslateX (me.getSceneX () + 20);
    stepDropper.setTranslateY (me.getSceneY () + 20);
    }
    });
    ---

    This seems to work very well, but when the mouse is on a control node things are stripped: the node stops moving (I guess it's because control node that consumes the event)



    2. APPROACH 2: Adding a glass on top of the stage to listen because there onMouseMovedProperty() - this should prevent controls consume the event
    The problem is that when I add a knot of Rectangle glassPane on top of the stage, each node below becomes inactive (do not respond to events). As I know the blockMouse property that used to be in JavaFX 1.3 went because each default node spread events. Why the senior (rectangle) node glassPane blocks for the underlying nodes mouse events?

    Hello
    controls using mouse events, as they spread the scene. You must register an event-filter event filters are called during the capture/tunneling, which precedes the propagation phase, so filters get the events before that any manager of may consume.

    Just replace
    scene.onMouseMovedProperty () .set (new EventHandler() {}

    by
    scene.addEventFilter (MouseEvent.MOUSE_MOVED, new EventHandler() {}

    Pavel

  • How I see the amount of selected items in the Finder?

    On my old MacPro when I selected a bunch of items in the Finder, it looks like "12 items selected' or whatever, but this new iMac does not - have I lost my money?" because it's about a function vital to me...

    Choose Show status bar in the Finder's view menu.

    (144783)

  • How to get the print work selection

    I am unable to get select it feel working on Firefox 11.o. I can't click on select printing but nothing prints. Apart from 11.0 to downgrade uninstall, there are patches? I use a mac os x version 10.7.3. Any help would be greatly appreciated.

    This morning, I downloaded the new version and it works now! Yes!
    Thank you for this issue!

  • How to get the selected DataGrid item?

    Hello

    I have a datagrid

    < mx:DataGrid = "10" XY = dataProvider "36" = "{acEmaillist}" width = "319" >
    < mx:columns >
    < mx:DataGridColumn headerText = "Full name" dataField = "cn" width = "150" / >
    < mx:DataGridColumn headerText = "Email" dataField = "mail" width = "150" / >
    < / mx:columns >
    < / mx:DataGrid >

    I want to select a name, click it, get the selected name and save it in a string variable. Please let me know how to get the selected name when I click it. Thank you very much.

    M

    This code can help.


    http://www.Adobe.com/2006/mxml"width ="100% ">

    Import mx.controls.DataGrid;
    Import mx.events.ListEvent;

    [Bindable]
    private var nameStr:String;

    public void getName(event:ListEvent):void {}
    var dg:DataGrid = DataGrid (event.target);
    nameStr = dg.selectedItem.cn;
    }
    ]]>



    Bob Smith
    [email protected]


    Ted Alan
    [email protected]


    Fred Tobs
    [email protected]








  • How to get the element selected listfield and goto next page?

    Assalaamualikum

    I try parsing the XML from a url and show in listfield.

    problem:

    How to get the selected item and passing the variable and than goto next page?

    my code:

    package parsepack;

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Vector;

    Import javax.microedition.io.Connector;
    Import javax.microedition.io.StreamConnection;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ListField;
    Import net.rim.device.api.ui.component.ListFieldCallback;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.xml.parsers.DocumentBuilder;
    Import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

    to import org.W3C.DOM.document;
    Import org.w3c.dom.Node;
    Import org.w3c.dom.NodeList;

    extends xmlparsing public class UiApplication implements ListFieldCallback, FieldChangeListener
    {

    Public Shared Sub main (String [] args)
    {
    xmlparsing app = new xmlparsing();
    app.enterEventDispatcher ();
    }

    public long mycolor;
    Connection _connectionthread;
    private static ListField _list;
    private static Vector listElements is new Vector();.
    public display display = new MainScreen();
    MainManager VerticalFieldManager;
    VerticalFieldManager subManager;

    public xmlparsing()
    {
    Super();
    pushScreen (screen);

    final Bitmap Imagearriereplan = Bitmap.getBitmapResource ("blackbackground.png");

    mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR)
    {

    public void paint (Graphics graphics)
    {
    graphics.drawBitmap (0, 0, Display.getWidth (), Display.getHeight (), Imagearriereplan, 0, 0);

    Super.Paint (Graphics);
    }

    };

    subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = Display.getWidth ();
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }
    };

    Screen.Add (mainManager);

    _list = new ListField()

    {

    public void paint (Graphics graphics)

    {
    graphics.setColor ((int) mycolor);
    Super.Paint (Graphics);

    }

    };
    myColor = 0x00FFFFFF;
    _list. Invalidate();
    _list.setEmptyString ("* only supplies not available *", DrawStyle.HCENTER "");
    _list.setRowHeight (50);
    _list.setCallback (this);
    mainManager.add (subManager);
    listElements.removeAllElements ();
    _connectionthread = New Connection();
    _connectionthread. Start();
    }

    protected boolean navigationClick (int status, int time)
    {
    Try
    {
    Here, go to another screen if you need.

    }
    catch (System.Exception e)
    {
    System.out.println ("Exception:-: navigationClick()" + try ());
    }
    Returns true;
    }

    private class login extends thread
    {
    Public connection()
    {
    Super();
    }

    public void run() {}
    Doc document;
    StreamConnection conn = null;
    InputStream is = null;
    try {}

    Conn = Connector.open (StreamConnection) ("http://ec2-54-248-241-248.ap-northeast-1.compute.amazonaws.com/koperasi-akr-trial/cgi-bin/gw-pinjama...

    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
    docBuilderFactory.setIgnoringElementContentWhitespace (true);
    docBuilderFactory.setCoalescing (true);
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    is = conn.openInputStream ();
    doc = docBuilder.parse (is);
    doc.getDocumentElement () .normalize ();
    List of NodeList = doc.getElementsByTagName ("ID");
    for (int i = 0; i)< list.getlength();="" i++)="">
    Node node = list.item (i) .getFirstChild ();
    listElements.addElement (textNode.getNodeValue ());
    }
    } catch (Exception e) {}
    System.out.println (try ());
    } {Finally
    If (is! = null) {}
    try {is.close ();
    } catch (IOException ignored) {}
    } If (conn! = null) {}
    Try {conn.close () ;}
    catch (IOException ignored) {}
    }} UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _list. SetSize (listElements.Size ());
    subManager.add (_list);
    Screen.Invalidate ();
    }
    });
    }

    }

    ' public void drawListRow (list ListField, Graphics g, int index, int y, int w)
    {
    Your string = (String) listElements.elementAt (index);
    int yPos = 0 + y;
    g.drawLine (0, yPos, w, yPos);
    g.drawText (, 5, 15 + y, 0, w);
    }

    public {get {Object (ListField list, int index)
    {
    Return listElements.elementAt (index);
    }
    public int indexOfList (String prefix, ListField list, int, string)
    {
    Return listElements.indexOf (prefix, string);
    }
    public int getPreferredWidth (ListField list)
    {
    Return Display.getWidth ();
    }
    public final void insert (String toInsert, int index) {}
    listElements.addElement (toInsert);
    }

    ' Public Sub fieldChanged (field field, int context) {}

    }
    }

    Thank you.

    I told you that replace the navigationclick() method where initialize you your listfield

    as I think that changing your code and then answer me

    _list = new ListField()
    {
    protected boolean navigationClick(int status, int time)
    {
      Dialog.inform("hi");
      return true;
    }
    
    public void paint(Graphics graphics)
    {
    graphics.setColor((int) mycolor);
    super.paint(graphics);
    }
    };
    
  • How to get the value of the list item

    Hi all
    How to get the value of the list item?

    I have a problem with the list item object
    in Oracle Forms.
    How can I retrieve the selected item from
    a list?
    I have not found any function as ' list. GET_
    SELECTED_ITEM()'...



    Thank you
    Bala

    Hello

    You get the value as any other element of forms:

    :value := :block.list_tem ;
    

    François

  • How to get the sub cluster item caption?

    Hi all

    I have a big cluster, which contains several groups of void. They are all type def.  My queation is,

    How to get the sub cluster item caption?

    Thank you.

    Anne

    In this nugget , you will find many images that illustrate how to get to items within a cluster. The ideas are the same, you will search for the legend.

    Have fun!

    Ben

  • How to get the selected row in a programmatic table of the ADF (table generated from a bean)

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    How to get the selected line in a programmatic (using a SortableModel custom not a display object) ADF table (generated from a bean)?


    We are trying to get the selected row in a bean of a programmatic ADF table to retrieve data based on the selected line.


    Any idea?

    Well, you can use selectionListener to set the selected line to a variable of bean (but this bean must be in extended view or some superiors)

    Something like this: http://www.awasthiashish.com/2015/07/get-selected-row-singlemultiple-from.html

    Dario

  • How to get the coordinates of "pathPoints" of a textFrameItem?

    Hi all

    Yes, I know that textFrameItems have pathPoints but...

    How can I get the x coordinates of the corners of a textFrameItem of rotation.

    I know I can get the angle of rotation of asin (myTextFrameItem.matrix.mValueA) etc.

    My guess would be that one should be able to use the mValueTX and mValueTY to help, but these values are very confusing and change dramatically on the application even a small rotation.

    If anyone has some preference mathematically based ideas and not API base, please let me know.

    It's very late by me now and I think I must be missing what is obvious, I think that such a function must have been made.

    Thank you

    Trevor

    PS Would be also appreciated a solution to the problem even in InDesign

    _2015-06-23_02-05-49.png

    Hi all

    I didn't try the method DOM I knew the mathematical method.

    I don't give great results if a shear has been applied, but that doesn't bother me that I do not apply the shears

    I received contact details-box-find http://stackoverflow.com/questions/9971230/calculate-rotated-rectangle-size-from-known-bou a useful formula

    y = (1 / (Math.cos (a) * Math.cos (a) - Math.sin (a) * Math.sin (a))) * (-w * Math.sin (a) + h * Math.cos (a));

    where y is the height of the inner when box no rotation is applied on it and a is the angle of rotation and w is the width.

    I had found for me a different formula but got stuck when moving to the rotation out of the 90 degree range, that is to say 1 degree or 91 degrees.

    The same problem occurred with this method to fix a fact of what follows.

    a RAD = ((360 + degs (a)) 90%);

    I did the temporary to degrees conversion as I remember problems with Mod enforcement by a fraction, I think that Ariel was a thread on this in the indesign forum.

    Here are the results of the script

    // draw a text box and rotate it before running the script
    // By Trevor www.creative-scripts.com (sorry still not too much there)
    // https://forums.adobe.com/message/7678561#7678561
    // With a little bit of help from http://stackoverflow.com/questions/9971230/calculate-rotated-rectangle-size-from-known-bounding-box-coordinates
    function main () {
    
    var doc = app.documents.length && app.activeDocument,
        itext = doc && doc.textFrames[0];
    if (!itext) {
        alert ("Sorry mate,\nI need a document with a textFrameItem on it or there's not much for me to do");
        return "twit";
    }
    var gb = itext.geometricBounds,
        imatrix = itext.matrix,
        p1X, p1Y, p2X, p2Y, p3X, p3Y, p4X, p4Y,
        a, h, w, x, y, hyp, op, adj,
        noColor = new NoColor(),
        rgbColor = new RGBColor(),
        newShape = doc.pathItems.add(),
        rect;
    ;
    
    // Do the maths
    
    a = Math.atan2 (imatrix.mValueB, imatrix.mValueA); // get the angle of the textFrameItem
    a = rads ((360 + degs(a)) % 90); // make sure it's positive otherwise the result will get messed up
    w = gb[2] - gb[0]; // Width of outer enclosing box
    h = gb[1] - gb[3]; // Height of outer enclosing box
    /* x = (1/(Math.cos(a) * Math.cos(a) - Math.sin(a) * Math.sin(a))) * (w * Math.cos(a) - h * Math.sin(a)); // Width of inner enclosed box, this is not needed for this script */
    y = (1/(Math.cos(a) * Math.cos(a)- Math.sin(a) * Math.sin(a))) * (- w * Math.sin(a) + h * Math.cos(a)); // Height of inner enclosed box
    op = Math.sin(a) * y; // this is the x coordinate offset
    adj = Math.cos(a) * y; // this is the y coordinate offset
    
    // calculate the points of the inner enclosed box
    p1X = gb[0] + op; // left bottom
    p1Y = gb[3];
    p2X = gb[0]; // left top
    p2Y = gb[3] + adj;
    p3X = gb[2] - op; // right top
    p3Y = gb[1];
    p4X = gb[2]; // right bottom
    p4Y = gb[1] - adj;
    
    // Draw outer box
    rgbColor.blue = 255;
    rect = doc.pathItems.rectangle(gb[1], gb[0], gb[2]-gb[0], Math.abs(gb[3]-gb[1]) );
    rect.fillColor = noColor;
    rect.strokeColor = rgbColor;
    
    // Draw inner box
    newShape.setEntirePath([[p1X, p1Y], [p2X, p2Y], [p3X, p3Y], [p4X, p4Y], [p1X, p1Y]]);
    rgbColor.red = 255;
    newShape.strokeColor = rgbColor;
    newShape.fillColor = noColor;
    
    // Helper functions
    function rads (x) {return x * (Math.PI / 180);}
    function degs (x) {return x * (180 / (Math.PI));}
    
    }
    main()
    

    Hi Uwe,

    It was late, but I don't know how I missed the path object. Age!

    A good thing I didn't post on the InDesign forum, at least here, I can wait less snickering for a such silent over look that I went back to the InDesign forum

    Either way thanks to you two, best regards,.

    Trevor

  • How to get the details of the item purchased in R12

    Hello everyone, use Oracle Application R12.
    I need the following information for all purchased object,
    How to get the nom_element, $vendor_name, ordered_quantity, rec eived_quantity item_id,
    returned_quantity.
    Thank you.

    Kind regards
    Gurujothi.

    Hi Gurujothi,

    PL.try following SQL. It will give you all the details of the purchase.

    SELECT PO_NO, B.LINE_NUM, C.SHIPMENT_NUM, A.SEGMENT1
    C.QUANTITY, C.QUANTITY_ACCEPTED, C.QUANTITY_BILLED, C.QUANTITY_CANCELLED, C.QUANTITY_RECEIVED, C.QUANTITY_REJECTED, D.QUANTITY QUANTITY_RETURNED,
    B.ITEM_ID, E.DESCRIPTION, F.VENDOR_NAME
    OF PO_HEADERS_ALL A, PO_LINES_ALL B, PO_LINE_LOCATIONS_ALL C, RCV_TRANSACTIONS D, MTL_SYSTEM_ITEMS_B E, PO_VENDORS F
    WHERE A.ORG_ID = & OU_NAME
    A.PO_HEADER_ID = & PO_HEADER_ID
    AND B.PO_HEADER_ID = A.PO_HEADER_ID
    AND C.PO_LINE_ID = B.PO_LINE_ID
    AND D.PO_LINE_LOCATION_ID (+) = C.LINE_LOCATION_ID
    AND D.TRANSACTION_TYPE (+) = "RETURN TO THE PROVIDER.
    AND E.INVENTORY_ITEM_ID = B.ITEM_ID
    AND E.ORGANIZATION_ID = C.SHIP_TO_ORGANIZATION_ID
    AND F.VENDOR_ID = A.VENDOR_ID

    concerning
    Sanjay

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • How to get the coordinates and the size of the swf to scale components

    I use the Web (I put it to the size of the entire screen) to frame a swfloader that loads a swf file with the width and height set to 100%. This swf has a movieclip. How can I get the exact coordinates of his position and its size after the scaling in Flex?

    In Flash CS4, the movielip a x = 40, y = 700. In Flex, the swf file is set to 100% scale, but when I get the x value of this movieclip, it is always 40. I try to get the scale of the x axis ratio using scaleX of swf. But his 1, pretty weird.

    How can I get the correct coordinates of the movieclip?

    The coordinates are usually compared to something.  X is relative to the parent.

    LocalToGlobal and globalToLocal convert coordinated areas.

    You can go to transform.pixelBounds and

    transform.concatenatedMatrix.

  • How to get the value of a selected character unicode?

    Hi all

    How to get the value of a selected character unicode?

    The content property of a 'Character' InDesign object is a simple Unicode string. For access to the various characters is a basic javascript operation, and a google gives this as a good first result: http://www.w3schools.com/jsref/jsref_charCodeAt.asp

    Therefore, the value of a selected character unicode is

    App.Selection [0]. Characters [0].contents.charCodeAt (0)

  • How to get the items on a loop at the same time during the execution of the loop for

    Hello

    I am a student. I would like to know how to get the outside loop counter values For in parallel so that the loop runs rather than obtaining the value finally outside the loop for future prospects for the answers.

    Thank you

    Frederick

    You already said yes, and you have said some of the different ways (registrants, locals, reference, queue, etc.). Since the information was provided to your request, the thread can be considered closed? If you want details about how to implement something, you must provide the details on what you are doing.

Maybe you are looking for