How do I listen for change in the global position of a Node

Hi there,
I want to create a Wire/Connection node between two scene nodes. I want this Wire node to be updated when one of the nodes is moving. In the common scenario I would listen for change events in the target nodes position and update the Wire :
targetNode1.translateXProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue value, Number oldValue, Number newValue) {             
wire.setStartX(targetNode1.getTranslateX());
wire.setStartX(targetNode1.getTranslateY());
wire.setEndX(targetNode2.getTranslateX());
wire.setEndY(targetNode2.getTranslateY());
The problem is that the target nodes are children of another container nodes(that are actually moving). So listening for change events in the translate properties of the target nodes does not work(their parent nodes are actually moving)
Is there way to listent for change in the global position of the target nodes relative to the Scene?

It sounds very similar to a problem I posted about earlier...
How to implement a UI similar to a UML Diagram with connections?
I ended up making my own special bounds property, that updates when the parent's special bounds property changes.
I also had to listen to the parentProperty change event to add/remove my listener on the parent node.
All in all, a pain in the butt. There should be an easier way.
The shortcoming of the solution is that all the nodes in the hierarchy must have my special bounds property implemented (ie. they're all classes under my codebase such that I can implement it), which for the moment is true... I'd like a cleaner solution however.

Similar Messages

  • How do I listen for changes in a container's components?

    I have a JScrollPane that contains a JTextPane. I want any Container that can possibly contain my JScrollPane to be able to listen for changes in the JTextPane's Document.
    For example, at the moment I'm using a JTabbedPane to hold a number of my JScrollPanes and I want to alter the tab title when any associated JScrollPane-JTextPane-Document is updated.
    Any suggestions on how best to handle this?

    I would use a controller object that manages all your gui components (tabs, scrolls, documents, text panes). Your controller object can register as a listener to the appropriate component, and when it changes, update the title of a tab (or do whatever else) as appropriate.
    Never put business logic like this stuff inside the actual gui components. Create, layout, etc. all the gui components (and related components like Document) from another controller like object instead. It makes handling the various listener stuff like this much easier. Read up on MVC (model view controller) stuff for more info.
    As for the actual mechanics, you could get the document that is used in the JTextPane and register as a DocumentListener. As a document listener, you get notified of all changes that are made to that document.

  • Listening for Changes to JTextArea

    I am writing a program that listens for changes to the contents of a JTextArea to obtain input for its execution. But I have implemented DocumentListener, PropertyChangeListener to listen for changes to the JTextArea for deriving input without success. Please could anyone advice on what to do.
    My code is below.
       myListener implements DocumentListener{
       JTextArea txt = new JTextArea();
       txt.getDocument().addDocumentListener(this);
       public void changedUpdate(DocumentEvent e){}
       public void removeUpdate(DocumentEvent e){} 
       public void insertUpdate(DocumentEvent e){
        try{
         //my code for obtaining input from txt is here
         int start = e.getOffset();
         Document doc = e.getDocument();
        }catch(BadLocationException ble){
    }

    Here's a link to the Swing tutorial on "How to Write a Document Listener":
    http://java.sun.com/docs/books/tutorial/uiswing/events/documentlistener.html

  • I ordered Illustrator for another user.  I received an invitation that was accepted, logged in and tried to change the account to the name and email of the person it was ordered for.  How can I get this changed and the invitation sent to the right person?

    I ordered Illustrator via creative cloud for another user.  I received an invitation that was accepted  and tried to change the account to the name and email of the person it was ordered for.  How can I get this changed and the invitation sent to the right person? 

    Cloud as a Gift https://forums.adobe.com/thread/1665610

  • Any way to listen for changes in Spark TextArea?

    Hello,
    What is the best way to listen for changes in a Spark TextArea? My scenario is simple: I need to know when some text is added or deleted (with from/to index).
    Regards,
    Dinko

    s:TextArea does have a chang event - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/TextAr ea.html.

  • How can i do for change my ipod touch 4g screen and how mutch it will cost?

    My screen is Craked how can i do for change it and how mutch it will cost ?
    Is it better buy a new ipod ?

    Check out-of-warranty service options in link below. It would be cheaper to repair.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Hi, i was wondering how to share movies for example, to the mac desktop from the macbook pro?

    Hi, i was wondering how to share movies for example, to the mac desktop from the macbook pro?

    Share them how?  View them?  Copy them?
    What kind of movies?  DVDs?  iTunes? Other MPEG, AVI files, etc...

  • Lock Role for Changes till the transport is released

    Issue : since roles are managed by multiple security administrators, changes are moving against the sequence.
    We have multiple security administrators, is there a way to lock a role for changes until the task/ req is released.
    Example Scenario :
    Security admin 1 : if there is a change request to add SU01 to the role: Z_TESTROLE, Security admin adds it and creates a Change request but does not release it.
    Security Admin 2 : the security admin 2 will get a Change req for the same role Z_TESTROLE to add a tcode PFCG to it. Security admin 2 does his job and moves his transport now even though the first transport does not move the change made by the first security admin moves with the transport for the second admin.
    We have multiple security administrators, is there a way to lock a role for changes until the task/ req is released.

    Hi all,
    Thanks for your responses.we follow a change procedure but I guess its just needs to be refined. Everybody figured out that this is a coordination issue but I was asked to research on any technical ability to handle this.
    Here is a brief overview of our process :
    1) BPO approves the change
    2) Role owner support manager approves the change
    then the Change request comes to 3)Security Manager for her approval.
    I feel from Sox prespective the 3rd approval in not manadatory.
    I'm I correct ??? where can I find Sox guide for SAP ?
    Recap of the incident:
    1)A change ticket is created for the t-code creation and a task is created for the role in which this report is to be added.
    State I role Z_TESTROLE  is with ZMMR0025
    After adding the new report ZMMR0055 the old report ZMMR0025 is removed.
    State II
    The role Z_TESTROLE has tcode ZMMR0055
    now this is tested in development system by the requestor.
    Before this goes into PRD via QA a newsflash is sent to all the endusers (so that they know which t-code to use)
    Meanwhile if another security administrator works (suppose adds a new tcode or changes an authorization)  on this while the role is in state II changes made by Admin 1 are transported along with the second change.
    State II + new changes = State III
    When the role reaches PRD in state III result is the end user losses access to the required functionality ZMMR0025 before ZMMR0055 is made available.
    I hope I’m clear , please let me know if I need to be more specific on any part.
    I appreciate your help.
    regards,
    Salman.

  • SWF panel listener for changed selection

    In short, my question is as follows. Is it possible to create a listener which
    detects when the current selection in the Flash authoring tool has changed,
    and informs my SWF panel? This does not have to be a listener per se,
    it can be some hand-crafted process which consumes some reasonable amount of processor time.
    I describe my question more precisely below.
    Suppose that I want to create an SWF extension panel for Flash (in Flash or Flex),
    and I would like the panel to display a property of the object currently selected on scene
    in the Flash IDE -- like the instance name of the object (if it exists).
    I can use JSFL to detect the instance name of the selected object, and pass the string to the
    SWF panel using call(), for instance. The problem is that I don't know how
    to detect that the user has selected the object, or that the selection has changed.
    Ideally, I would like to add an event listener that listens for such an action in the flash authoring tool.
    However, using JSFL, this does not seem to be possible (I can only listen to events such as frame changed
    or layer changed, but not selection changed).
    I tried the following solutions:
    1. Periodically check in JSFL whether the current selection has changed.
    The problem is that in JSFL, there is no sleep function, or anything alike. The javascript
    methods setInterval and setTimeout do not work in JSFL. Therefore, in order to periodically check for changes,
    one must actively loop. This is extremely resource-consuming -- in fact, it hangs the flash IDE.
    2. The periodic check can be triggered by the SWF panel itself. In actionscript, I can use setInterval to periodically
    invoke the selection update function via JSFL. I have set the interval to 400 milliseconds, which gives a reasonably quick
    reaction to changes. However, the functionality I want to implement is in fact more complicated than just retrieving the
    instance name of the selected object. As a consequence, performing this operation every 400 milliseconds still consumes
    too much processor time (the flash IDE consumes 30% of my processor time, even if the user doesn't do anything).
    Therefore, I still would like to find a solution which does not use the processor when the user does not do anything in the Flash IDE.

    I'm trying to do the same thing. Did you find a solution?

  • Listen for change in JTextField

    I would like to write an event listener to listen for any changes made to a JTextField. Normally I would think that keyListeners would do the trick except that the contents of this field can be altered by the application itself, and I would like to trap those changes too.
    Does anyone know of an event listener that listens for any changes made in the text of a JTextField, regardless of how those changes are made?

    use DocumentListener
    for more info see http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#doclisteners

  • Uploading .ldt file for changes on the

    Hello all,
    I'm trying to make a change in a Time Sheet, the change I'm trying to make is really simple at the moment (making a field bigger).
    But there where already changes made in the sheet and they need to be kept in tact (added a lov).
    I'm using the next paper as reference.
    Oracle Time and Labor - Configuring The Oracle Time and Labor Timecard User Interface - White Paper
    Normally U need to get the Original template from the location: $HXC_TOP/patch/115/import/US,
    When there are already changes made u need to get the latest version of the template(?)
    The file I needed for time sheet was hxczzhxclayt0019.ldt
    When I upload the original template the LOV who was made in a earlier time did not work.
    This confirmed that tanking the original template was not the way to go.
    I think I need to have the template witch has all the earlier made changes.
    While U upload the .ldt file with FNDLOAD downloading the template is not working for me.
    Even a full download without any parameters does not get the effect I like to see.
    "FNDLOAD apps/pass@DBname O Y DOWNLOAD $HXC_TOP/patch/115/import/hxclaytlayoutsld.lct"
    Does anyone have any advise / idea's on how I can solve this, except building the file from the ground?
    Greetings niels
    Edited by: user12842768 on 10-jun-2011 7:29

    Adding the error message:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select project_number projectnumber, project_name, project_id projectid, start_date, completion_date, carrying_out_organization_id, period
    from xx_pa_online_projects_v where period = trunc(FND_DATE.CANONICAL_TO_DATE(:1))) QRSLT ORDER BY projectnumber
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2680)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1683)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
         at oa_html._OA._jspService(_OA.java:84)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1

  • How to get rights for customization of the SRM

    Dear All,
    I am trying to make some customization on the SRM system (HU5 SAP SRM 7.0) available on ESWORKPLACE.
    Unfortunately I have no rights for changes, only for displaying SPRO settings.
    For example I am not able to make any changes under the "Define Process Levels" for Business Process Configuration (Workflow.)
    I am getting follwing message:
    "only authorizes you to display data.   Display locked data? "
    The exact path to the customizing is following:
    SAP Supplier Relationship Management->
    SRM Server->
    Cross-Application Basic Settings->
    Business Workflow->
    Process-Controlled Workflow->
    Business Process Configuration->
    Define Process Levels.
    Can you please advice, how can I get required rights for customizing SRM system ?
    Thank you very much,
    Regards,
    Michal

    Hi,
    You can't change anything on HU5 system, this system is from SAP for Enterprise Service demo/exploration. You can only view data, can't change/customize it.
    To do any change use your local IDES/development system.
    Regards,
    Gourav

  • How can mc_instance listen for MouseEvent?

    hello;
    my_mc_instance.addEventListener( MouseEvent.MOUSE_DOWN ,
    a_function ) ;
    I do not understand why my_mc_instance even knows what a
    mouseevent is; for instance, I have to know what a "knock on the
    door" is before I can listen for it;
    movieclips DO NOT inherit from: Mouse or MouseEvent or even
    Event;
    movieclips inherit from:
    MovieClip --> Sprite --> DisplayObjectContainer -->
    InteractiveObject --> DisplayObject --> EventDispatcher
    --> Object
    so how do they even know what a MouseEvent is?
    it would seem to me that trying to add a mouseevent listener
    to my_mc_instance would never fire since movieclips do not inherit
    any mouse-related stuff;
    furthermore, according to MovieClip.as, MovieClip class
    already has methods that are apparently firing for the mouseevents:
    ActionScript Code:
    function onMouseDown():Void;
    function onMouseMove():Void;
    function onMouseUp():Void;
    function onPress():Void;
    function onRelease():Void;
    function onReleaseOutside():Void;
    function onRollOut():Void;
    function onRollOver():Void; ...
    which makes me wonder why it is even necessary to add
    mouse-related listeners to an mc;
    any thoughts?
    thanks
    dsdsdsdsd

    Hey,
    The reason movie clips dispatch mouse events is because movie
    clips inherit from InteractiveObject. All InteractiveObjects
    dispatch mouse events, so naturally, movie clips dispatch mouse
    events.
    For an object to be able to dispatch events, it doesn't have
    to inherit from the specific event class (MouseEvent class), just
    another class that dispatches those events (InteractiveObject).
    The script you included contains methods from AS2. You can't
    use them in AS3, so the only way to trigger anything with the mouse
    is to add event listeners.

  • How Can I Sync Multiple Changes at the same time?

    Is there a way to configure iTunes so that I can make changes in multiple sections, and only sync or apply them when I've made all of them?
    For example: I want to changes setting in Music, Apps, and Books. Today, it seems like I have to go to change settings,hit apply, and wait for the iTunes to sync for each one. What I want to do it make changes in all of them, then hit apply/sync and wait for the iTunes to sync all my changes in one swoop.
    The seems very intuitive and saves the user a lot of time. Can iTunes be configured to due this?

    The OP's question asked - in iTunes for Windows, if it was possible to "configure iTunes" (not the iPod) and then "Sync those changes to the iPod in one step"
    Is there a way to configure iTunes so that I can make changes in multiple sections, and only sync or apply them when I've made all of them?
    For the media, one can;
    untick songs in the Library in order for them to be removed at the next Sync (and obviously the reverse to put them back on),
    the same procedure for books,
    create and modify Playlists,
    remove or add photos to the chosen Photos folder (in Windows of course, not in iTunes) which then get removed or added at the next Sync,
    and then connect the iPod. One can prevent an iPod from Syncing at initial connection time, so that further changes to things such as which Apps to Sync (which does need to iPod to be connected), choices of Selected Playlists only, etc. (ditto) can be made by choosing the appropriate pane. As yet, whenever I've done this, I have never had to Sync one change before switching to a different pane. The first change causes the Apply and Revert buttons to appear. I ignore them and continue to make further changes on the other panes. Then I select Apply. The Apply/Revert buttons are removed and replaced by a Sync button. So, although there is the Apply, then Sync to be done, it can hardly be described as a burden.
    Are you saying Chris, that you have to apply one change at a time, followed by a sync before making any other change?

  • How to track personal details changes in the report without using triggers on the database tables

    Hi There,
    I'm having a requirement to track the oracle HRMS Personal details changes in the report not using the triggers.
    ex: if some changes the address of the person, then that changed values should be populated in the report.
    Please find below query:
    If any of the following columns data is updated, the new value should be populated in the report.
    SELECT PAPF.PERSON_ID                                                       PAPF_PERSON_ID
    ,      PAPF.EMPLOYEE_NUMBER                                               EMPLOYEE_NUMBER        
    ,      PAPF.FIRST_NAME                                                            FIRST_NAME   
    ,      PAPF.LAST_NAME                                                            LAST_NAME
    ,      TO_CHAR(PAPF.DATE_OF_BIRTH ,'DD-MON-YYYY')     DATE_OF_BIRTH
    ,      ADDR.ADDRESS_LINE1                                                   ADDRESS_1
    ,      ADDR.ADDRESS_LINE2                                                   ADDRESS_2
    ,      ADDR.ADDRESS_LINE3                                                   ADDRESS_3
    ,      ADDR.TOWN_OR_CITY                                                    TOWN
    ,      ADDR.REGION_1                                                              COUNTY
    ,      ADDR.POSTAL_CODE                                                     POST_CODE
    ,      ADDR.COUNTRY                                                              COUNTRY
    ,      PAY.PAYROLL_NAME                                                     PAYROLL_NAME
    ,      PLN_TYP.NAME                                                              PLAN_TYP
    ,      PLN.NAME                                                                     PRODUCT_NAME
    ,      BOF.NAME                                                                     COVERAGE
    FROM   PER_ALL_PEOPLE_F                                                PAPF
    ,      PER_ALL_ASSIGNMENTS_F                                          PAF
    ,      PER_ADDRESSES                                                        ADDR
    ,      PAY_PAYROLLS_F                                                       PAY
    ,      BEN_PRTT_ENRT_RSLT_F                                                 PEN
    ,      BEN_PL_TYP_F                                                         PLN_TYP
    ,      BEN_PL_F                                                             PLN
    ,      BEN_OIPL_F                                                           BOIPF
    ,      BEN_OPT_F                                                            BOF
    WHERE 1                                     = 1
    AND PAPF.PERSON_ID                          = PAF.PERSON_ID
    AND TRUNC(SYSDATE)                          BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE
    AND TRUNC(SYSDATE)                          BETWEEN PAF.EFFECTIVE_START_DATE AND PAF.EFFECTIVE_END_DATE
    AND PAPF.PERSON_ID                          = ADDR.PERSON_ID
    AND ADDR.PRIMARY_FLAG                       = 'Y'
    AND ADDR.DATE_TO                            IS NULL
    AND PAF.PAYROLL_ID                          = PAY.PAYROLL_ID(+)
    AND PEN.PERSON_ID                           = PAPF.PERSON_ID
    AND PEN.BUSINESS_GROUP_ID                   = PAPF.BUSINESS_GROUP_ID
    AND TRUNC(SYSDATE)                          BETWEEN TRUNC(PEN.EFFECTIVE_START_DATE) AND TRUNC(PEN.EFFECTIVE_END_DATE)
    AND PEN.PRTT_ENRT_RSLT_STAT_CD              IS NULL
    AND PEN.SSPNDD_FLAG                         = 'N'
    AND ( PEN.ENRT_CVG_THRU_DT                  >= TRUNC(SYSDATE)
    OR    PEN.ENRT_OVRIDN_FLAG                  = 'Y')
    AND EXISTS(SELECT PIL.PER_IN_LER_ID
               FROM   BEN_PER_IN_LER PIL
               WHERE  PIL.PER_IN_LER_ID         = PEN.PER_IN_LER_ID
               AND    PIL.BUSINESS_GROUP_ID     = PEN.BUSINESS_GROUP_ID
               AND    PIL.PER_IN_LER_STAT_CD    NOT IN ('VOIDD','BCKDT'))
    AND PEN.PL_TYP_ID                           = PLN_TYP.PL_TYP_ID  
    AND TRUNC(SYSDATE)                          BETWEEN PLN_TYP.EFFECTIVE_START_DATE AND PLN_TYP.EFFECTIVE_END_DATE  
    AND PLN_TYP.PL_TYP_ID                       = PLN.PL_TYP_ID 
    AND TRUNC(SYSDATE)                          BETWEEN PLN.EFFECTIVE_START_DATE AND PLN.EFFECTIVE_END_DATE
    AND PLN.PL_ID                               = PEN.PL_ID
    AND PEN.OIPL_ID                             = BOIPF.OIPL_ID(+)
    AND TRUNC(SYSDATE)                          BETWEEN NVL(BOIPF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOIPF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
    AND BOIPF.OPT_ID                            = BOF.OPT_ID(+)
    AND TRUNC(SYSDATE)                          BETWEEN NVL(BOF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
    AND (:P_SYSDATE)                            BETWEEN TRUNC(PEN.ENRT_CVG_STRT_DT) AND TRUNC(PEN.ENRT_CVG_THRU_DT)
    AND (CASE WHEN :P_PAYROLL_ID IS NULL THEN 'Y' ELSE NVL((SELECT 'Y' FROM DUAL WHERE PAY.PAYROLL_ID  = :P_PAYROLL_ID), 'N') END) = 'Y'
    AND PAPF.LAST_UPDATE_DATE                   = (:P_SYSDATE) ;
    --AND PAPF.LAST_UPDATE_DATE                   BETWEEN to_date(:P_SYSDATE) and (to_date(:p_sysdate) + INTERVAL '31' Day);
    --AND (:P_SYSDATE)                           = PAPF.LAST_UPDATE_DATE ;
    Thanks

    check this -
    Re: Best Event-Based notifications for Sox Complience?

Maybe you are looking for

  • Unable to assign from std::make_pair if type is not movable

    I'm attempting to compile the following code with the -std=c++11 flag: #include <utility> struct Y     Y();     Y(const Y&); int main(void) {     Y y;     std::pair<int, Y> p = std::make_pair(0, y);     return 0; This works fine when compiled with: C

  • Portal Integration with SCM component

    Hi, Can we integrate EP7.0 with SCM 5.0 . In portal system adminstartion I can see only SAP_R3,SAP_CRM,SAP_BW. I can not see other compoenets like SAP_SCM , etc.. since there is no system like SAP_SCM how to integrate . Is it possible? Please suggest

  • Handling resource properties

    Hello, I would like to develop an application for article management like it is in SDN->Articles. Therefore I would like to use the KMC-API by adding some properties to the resource and store and retrieve them in my application. Could someone tell me

  • Using PSE7 serial number for PSE11?

    Hi, I have a serial number for PSE7, which I have de-activated on my old computer, since I want to install PSE on my new computer. However I get the message that my "serial number is invalid for this product". Is this because I can't use a PSE7 seria

  • Key not valid for use in specific state". Number o...

    Skype died and cannot reinstall. error message key not valid for use in specific state". Number of error is 1603. I have seen the solutions posted on this and other sites, but they are rather daunting for a non tec person. Will Skyp/Windows be provid