Why jump nodes in my group originally from the root of the scene?

My project code is too big to post, so I'll try to explain the problem that I am facing. I'm creating a tool of graphic layout as part of the largest visualization tool which we build.

The problem I have is a group that I've positioned using layoutX, we jump to the origin whenever we do the graphic layout.

Here is the basic flow of the program:

  1. We create a graph of JUNG's Circle (vertices) and Lines (edge)
  2. JUNG layout classes allows us to generate a layout for the chart. The layout generates an x, position y for each vertex in the graph in a particular area. Say a box of 400 by 400.
  3. We use the positions generated to define the properties centerX, centerY of the circles. The lines are tied to the centers of the nodes they're going between, so they update automatically.

All this is done to present the original graphic layout. The user can select nodes and choose them to be prepared in a new way. This creates a sublayout on the Web. When the circles are selected move us to a group position in the exact spot where they were selected. The groups are made adjustable and can be moved across the canvas. Update the lines and circles do not move compared to the benchmark of their parent group. Only their container is moved inside sceneRoot.

The scengraph looks like:

VBox

Group: sceneRoot

Circles and lines that make up the original graph

Group: sublayout

Circles and selected lines

The problem comes when we try to make the layout of the selected nodes. We generate a subgraph of JUNG. Then we make the graphical layout with the subgraph to the circles that it contains new positions. We ask the page layout to generate a layout, the size of the sublayout group. This method works. JUNG generates new values for the positions of the circles. When we created the centers of the circles, the group goes to the top left corner - origin of the sceneRoot. In my view, the Group should not move at all. Is layoutX, there have been established and the circles are positioned relative to origin of sublayout. I can't understand why the group jumps to the origin. It should stay in place.

I thought about it!

The problem was by using a group as the root of the Web. Limits of the group are the sum of the limits of his childhood. This means that the limits of the group will change according to what is in it. When the VBox kicked out, it would move because the new bounding box. The fix was to use a component. A pane is resized according to the rules of pref/min/max and does not fear for the sum of its children. This is one containing more "solid".

Tags: Java

Similar Questions

  • Why does take so long to load from the time wherever I power up until it takes to get to the login screen? help taking too long

    Why does take so long to load from the time wherever I power up until it takes to get to the login screen? help taking too long

    You should take a look at your startup programs and decide what is really necessary and what is nothing more than useless clutter. There is nothing wrong with the startup programs, some may be really useful or even necessary for your personal needs. But keep in mind that many programs build to start when you start the computer and that most of them must not start when the computer starts, all they do is slow down your boot time and clutter of things when you're trying to solve problems, and some are downright harmful!

    I mean, have you really need things like real Planner and Gadwin Print Screen running all the time? These programs will run very well, even if they are not started automatically every time that you start the computer. Go to these programs and change/disable their boot option. Some may be difficult to kill for public assistance services can be useful when you try to control startup programs. Try CodeStuff Starter, it's safe and easy to use, I think you'll like it, download it here:

    http://CodeStuff.tripod.com/products_starter.html>

    Use AutoRuns to check axis start, Richard:

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx>

    Use Cclenar-> tools-> start

    http://www.CCleaner.com/download/builds.aspx>

    I can't tell you what to keep, startup items it is a personal preference, but pretty well all the startup items indicated by CodeStuff Starter are safe to disable, and changes are easy to reverse if you change your mind. Searches for items it shows you and decide whether or not these things are really useful or necessary. Some programs will be started at startup without your knowledge and over time, that list can expand to include useless parasites, part of good computer maintenance includes regular control of these startup items and the removal of the unnecessary.

    Suggest that you first spread malware as the cause of the problem by following these steps:

    I. - delete your temporary files

    Clean the system (compensation to all temp/tmp folders and included all the content offline, the tif browser, delete the cookies of compensation.)

    Do a disk cleanup. Click the Start button. in the search box, type disk cleanupand then in the list of results, click Disk Cleanup. Better and easier to use - ccleaner.

    Download the basic version (slim) via

    http://www.Piriform.com/CCleaner/builds>

    The basic version (slim) does not contain the toolbar disgusted

    DO NOT USE ANY cleaning of the advanced options. DO NOT TOUCH THE REGISTRY OR TOOLS. At least not for now.

    Reset

    II. - have your system scanned as a result of security/antivirus installed.

    III. - download, install, update and run both of these tools to a-squared free scans:

    MalwareBytes anti-malware (MBAM)

    http://www.Malwarebytes.org/products/malwarebytes_free>

    SUPERAntiSpyware (SAS)

    http://SUPERAntiSpyware.com/superantispywarefreevspro.html>

    UTC/GMT is 18:16 on Wednesday, January 18, 2012

  • I am trying to create a slideshow with Adobe Photoshop 12.  After a few episodes to work on it, some of the slide pictures disappear.  Very frustrating.  Why?  I'm to access photos from the catalogue and folders on my computer.  E

    I am trying to create a slideshow with Adobe Photoshop 12.  After a few episodes to work on it, some of the slide pictures disappear.  Very frustrating.  Why?  I'm to access photos from the catalogue and folders on my computer.  Disappearances seem random.

    Elements Photoshop Elements

  • Why I don't get a response from the Dept. serial number already contacted them twice with ZERO response. I have included my product code and proof of my job as requested but nowt back! ??

    Why I don't get a response from the Dept. serial number already contacted them twice with ZERO response. I have included my product code and proof of my job as requested but nowt is back!

    Kingussie81 that I saw the account that you used to post on this public forum and your Creative Suite 5.5 Design Premium education serial number is registered under your account at http://www.adobe.com/.  For more information on how to locate your serial number registered please see quickly find your serial number.

    If you need to download a new copy installation files, they are available to Download CS5.5 products.

  • TypeError: Error #1006 - MovieClip to remove from the scene

    I have a clip that is called to the scene and when the movieclip is finished, it calls a function that removes from the scene. The code works, but I get an error message about 4 seconds after the music ends.

    Here is the error message:

    TypeError: Error #1006: exitWordMicroscopic is not a function.

    to ASvocabulary_microscopic / frame110 () [ASvocabulary_microscopic::frame110:1]

    Here's the code in step:

    Removes the movieclip on the stage and allows the highlight *.

    function exitWordMicroscopic (): void

    {

    bnt_vocab_microscopic.mouseEnabled = true;

    removeChild (word_Microscopic);

    }

    //******************************Stage buttons**************************************

    stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);

    function goButtonsHomeRead_1(event:MouseEvent):void

    {

    Buttons of vocabulary

    If (event.target is bnt_vocab_microscopic)

    {

    bnt_vocab_microscopic.mouseEnabled = false;

    SoundMixer.stopAll ();

    addChild (word_Microscopic);

    word_Microscopic.x = 47;

    word_Microscopic.y = 120;

    }

    }

    Here is the code inside the clip. That's what the error message is referring to:

    Calls to withdraw from the scene function *.

    Object (parent) .exitWordMicroscopic ();

    What I am doing wrong?

    There is a more OOP good way to do this, but for now, you can use...

    Object (parent.parent) .exitWordMicroscopic ();

    function exitWordMicroscopic (): void

    {

    bnt_vocab_microscopic.mouseEnabled = true;

    mc_EmpytMovie_Micro.removeChild (word_Microscopic);

    }

  • memory usage when removed from the scene

    Hello

    I was wondering what solution is best with regard to the use of the memory: to remove the component from the stage or to make null?

    this.removeChild(myComponent);

    or

    this.myComponent = null;

    I know that it depends on if I'm going to use this component in the future, and in my situation, the component will be used rarely.

    Is a component that is removed from the scene, uses a lot of memory?

    A component can use a bit less memory when not on stage.  If you come

    set to null without removing from the scene that it won't change your memory usage to

    all.  The only way to recover the memory is both out of the scene

    and remove all other references to it.

  • Why my open programs don't disappear from the taskbar in windows 7 pro.

    original title: why the my refill of programs open in the taskbar in windows 7 pro.

    Why the my refill of programs open in the taskbar in windows 7 pro.

    Hello

    1 how long have you been faced with this problem?

    2. did you of recent changes to the computer?

    3. it happens with all the program or program in particular?

    I suggest you check in safe mode if the programs disappear from the taskbar?

    Follow this link provided below to start your computer in safe mode.

    http://Windows.Microsoft.com/en-us/Windows7/advanced-startup-options-including-safe-mode

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    I suggest also allows you to check user account again.

    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

  • Why Firefox doesn't save my tabs from the previous session although I chose to do it in the options?

    Firefox does not save my tabs from the previous session, although I have chosen in options, to save my tabs from the previous session.

    Firefox 4 saves the previous session automatically, so it is no longer necessary for the dialog box asking if you want to save the current session.

    Use ' file > exit ' or ' Firefox > output "If you want to restore multiple windows.

    You can use "Firefox > history > restore previous Session ' to get the previous session at any time.

    There is also a button 'Restore previous Session' on the default on: Home home page.

    Another possibility is to use:

    Make sure that you do not remove the navigation, search and download history on Firefox to clear the browsing history when you close Firefox.

  • Why can I not use applications downloaded from the Internet

    I downloaded Open Office and I get an error message that I cannot use the applications downloaded from the Ap Store.

    How can I change this?

    Mary Lou

    CTRL-click it and choose open. Otherwise, open the security & confidentiality of system preferences, click the general tab, unlock the pane and change the setting to a less restrictive.

    (137111)

  • Why Panel does not KeyBar 1.8 from the list toolbar?

    Remove knob remove not toolbar KeyBar 1.8 in Control Panel.

    Hi Frank,

    1. what happens when you try to uninstall the program?

    2. do you get an error message?

    3. are you able to work with the specific program?

    The list of currently installed programs in the Add / Remove Programs lists all compatible Windows programs that have a program Uninstall or feature. Sometimes, a program may not be removed completely, and remains the registry key that is used to display the program in the currently installed programs list. In this case, you may need to manually remove the program in the currently installed programs list in Add / Remove programs.

    You can try the Fixit and if it fails, you can proceed to method 2.

    Method 1:

    You can run the Fixit and follow the steps:

    Reference:

    Solve problems with programs that cannot be installed or uninstalled

    http://support.Microsoft.com/mats/program_install_and_uninstall

    a. click on "accept".
    b. Select 'detect problems and apply the patches for me.
    c. Select "Uninstall."

    d. Select the program from the list and try to uninstall it.

    Now search for the question.

    Method 2:

    How to manually remove programs from the add tool / remove programs

    http://support.Microsoft.com/kb/314481

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    KB322756 http://support.microsoft.com/kb/322756

    Hope this information helps. Response with status so that we can help you.

  • Why used to traction to scan documents from the form loader?

    I have a brother multi function printer/scanner.  I try to scan several documents and can not get the scanner to remove the documents from the charger of the form.  Instead, he wants to scan from the tray.  Any suggestions?

    Hello

    May I have the Acrobat version and OS you are working?

    Please, try the following:

    Open Acrobat.

    Go to file > create > PDF from Scanner > Custom Scan...

    In the custom scan dialog, select TWAIN drivers

    Click on the 'Options' button next to him

    Select the User Interface as Show the Scanner's Native Interface

    Click Ok & Scan

    This will bring the native interface of the Scanner window and select document as a source feeder.

    Thank you

    Abhishek

  • Original from the fake - everything is done on board

    Hello

    I asked at an earlier session, but unfortunately he had no answer.

    It is my next try.

    But before... I have some work.

    I saw an interesting site of 'Range Rover' and wondered if this is possible on board.

    My experience is more After Effects, but I felt comfortable with the tool edge verry.

    I worked on a "Fake_Site", I tried to rebuild everything in Adobe_Edge as a practical test.

    and see what I've done:

    Source language:

    https://victoriabeckham.landrover.com/de

    My fake:

    http://go-motion.NET/range/

    It's a huge timeline - only with stops-labels between the two.

    But as you can see, there is the missing scroll function.

    It is perhaps much more complicated than I can imagine.

    To me, it seems that there is a script that connects the scrolling

    to the timeline.

    But I'm not a coder.

    Question:

    Who knows the script that connects the scroll to the timeline?

    If all goes well there is little outside help and if it's only the answer:

    "Forget it, no luck. «

    Thanks in advance and greetings from the Germany

    Oliver

    Hi Oliver,.

    I reworked a little example. Instead of listening to the built in case of Stage.scroll, I implemented a very cool jQuery plugin: http://brandonaaron.net/code/mousewheel/demos. You can keep the Stage.Overflow property as 'hidden', that this plugin listens to the raw, not a real event of scrolling mousewheel event.

    Example:

    http://www.timjaramillo.com/code/edge/mousewheel_timeline/scroll.html

    Source:

    www.timjaramillo.com/code/Edge/_source/mousewheel_timeline.zip

    Code Stage.compositionReady:

    () yepnope

    {

    Nope:]

    ' jquery.mousewheel.min.js'// path to the .js file to load

    ],

    full: init

    }

    );

    var timelinePos = 0; / / track current mounting position

    var multiplier = 100; / / that multiply by the speed of the mouse to get the value of usable scroll

    var timelineLength = sym.getDuration (); / / total length chronology

    When yepnope has loaded everything run init();

    function init () {}

    $("html,_body").mousewheel (function (event, delta) {}

    scroll up to the negative position of timeline

    If (timelinePos > = 0) {}

    timelinePos += (delta * multiplier);

    SYM. Stop (timelinePos);

    Console.log ("timelinePos =" + timelinePos);

    reset values within the range

    If (timelinePos< 0="">

    timelinePos = 0;

    } ElseIf (timelinePos > timelineLength) {}

    timelinePos = timelineLength;

    }

    }

    Event.preventDefault ();

    });

    }

  • How to effectively remove a SWF loaded from the scene?

    I can't understand a correct coding to remove a SWF loded in the scene.

    Here is my set upwards.

    I have a layout that is segmented in section labeled. In the section titled 'products', I have a scheme consisting of images of products acting as buttons that bring a user in another section labeled "prdctsPopUps."

    In the "prdctsPopUps" section, I placed an instance of LoaderMax placed in a container of mc. Place LoaderMax in a container of mc automatically resolved a problem of clearing loaded SWFs from the stadium when I go back to the section "products".

    I specified the variable in the "products" section with the following set up:

    var sourceVar_ProductsPopUps:String;

    function onClickSumix1PopUp(event:MouseEvent):void {}

    sourceVar_ProductsPopUps = "prdcts_popups/sumix1 - popup_tl.swf ';

    gotoAndPlay ("prdctsPopUps");

    }

    So each button has its own "... swf ' URL and they all open very well and I can go back to the topic 'produced' without any problem.

    However inside the swf (that charge by LoaderMax which is placed in a mc) there are other buttons that lead a user to the section labeled "xyz". That works as well. It opens as he's supposed to be and without any previously loaded "... swf ' on the stage.

    In the section labeled "xyz", there is a limited set of buttons with the heading 'products' that must raise a user to the same game in the labeled 'prdctsPopUps' section and open a correspondent "... swf»

    However only the last opened "... swf" will appear in this section. Actually the only one that has been opened at the origin of the "prdctsPopUps" section, not who was supposed to be opened from the section "xyz".

    I do not understand why it would work a labeled section and not the other. I can't know which section what function/code should be placed.

    Here is the set up through a button in the section "xyz" supposed to bring a user to the same section of "prdctsPopUps" but to load another '... swf»

    var sourceVar_ProductsPopUps_fromXYZ:String;

    function onClick_floralytePopUp_fromXYZ(event:MouseEvent): void {}

    sourceVar_ProductsPopUps_fromXYZ = "prdcts_popups/floralyte - popup_tl.swf";

    gotoAndPlay ("prdctsPopUps");

    }

    Here's the code in place for the LoaderMax of the section "prdctsPopUps":

    var loaderProductPopUps:SWFLoader = new SWFLoader (sourceVar_ProductsPopUps,

    {

    estimatedBytes:5000,

    container: holderMovieClip,.

    onProgress:progressHandler,

    onComplete:completeHandler,

    centerRegistration:true,

    Alpha: 1,

    ScaleMode (ScaleMode): 'none',

    Width: 540,

    height: 730,.

    harvest: true,

    autoPlay:false

    });

    function progressHandler(event:LoaderEvent):void {}

    progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;

    }

    function completeHandler(event:LoaderEvent):void {}

    var loadedImage:ContentDisplay = event.target.content;

    TweenMax.to (progressBarPopUp_mc, 1.5, {alpha: 0, scaleX:0.25, scaleY: 0.25});

    }

    loaderProductPopUps.load ();

    Is there something that must be imported, or specific function must be specified in a specific titled section?

    in fact, I think that you will need to use something like:

    var loaderProductPopUps:SWFLoader;

    If ((loaderProductPopUps) {})

    {if (loaderProductPopUps.Content))}

    loaderProductPopUps.unload ();

    }

    }

    loaderProductPopUps = new SWFLoader (sourceVar_ProductsPopUps, //the value of sourceVar_ProductsPopUps allows to load several SWF files from the page produced.

    {

    estimatedBytes:5000,

    container: holderMov ieClip, / / convinient and easy to manage cases of placing the LoaderMax one mc empty (holderMovieClip)

    If this is not the case, will work as well. Then the container line: holderMovieClip, must be replaced by container: cela,.

    can be any size, cannot be resized as it distorts the content

    Manager onProgress:progress,

    onComplete: complete the Manager.

    centerRegistration: true,

    x:-260, y:-320, //no need for that is if used: centerRegistration:true,.

    Alpha: 1,

    ScaleMode (ScaleMode): 'none',

    scaleX:0, scaleY: 0,

    vAlign: "high."

    Width: 540,

    height: 730, / / scale proportionately but I need to cut the edges

    harvest: true,

    autoPlay:false

    });

    function progressHandler(event:LoaderEvent):void {}

    progressBarPopUp_mc.gradientbarPopUp_mc.scaleX = loaderProductPopUps.progress;

    }

    function completeHandler(event:LoaderEvent):void {}

    var loadedImage:ContentDisplay = event.target.content;

    TweenMax.to (loadedImage, 1.5, {alpha: 1, scaleX:1, scaleY: 1}); only need this line if the corresponding values are changed in Builder SWF loader

    TweenMax.to (progressBarPopUp_mc, 1.5, {alpha: 0, scaleX:0.25, scaleY: 0.25});

    }

    loaderProductPopUps.load ();

  • Why force Adobe installs their new Flash drive when it is originally from the browsers play not video?

    Why force Adobe installs their new Flash drive on billions of computers when it is causing so many browsers only play video?

    I had installed the Flash Player 11.2.202.228 28/03/2012 and it worked very well, unlike some of the previous Flash players in several web browsers, so I chose NOT to install a new actors Flash that came after that, all based on experience.

    But last Friday, 22/06/2012, I received a new message to install Adobe Flash Player that came in my office for the new Flash Player v 11.3.300.262 and I chose NOT to install it for the reason I said above... and the look now at all the problems this new Flash player has caused for so many people.

    Now I see glancing at my Add-ons Manager in my Firefox browser, and in my program Panel of Windows 7 in the control panel that the stupid new Flash Player v 11.3.300.262 has been INSTALLED FORCE behind my back, even if I don't install certainly NOT it and I deleted the installation Panel when he came to my office on Friday.

    And now no videos or content Flash will not play in my Firefox browser! Good job Adobe!

    What is the Adobe problem?... why you require the software on our computers that obviously was not installed by the user, and then screw it to the top of our computers.

    How to explain something like that?

    Now, I have to troubleshoot it and try to install my old Flash Player.

    Why?

    Having click on classic view on the left side of the Control Panel window, which should show all of the icons and allow him to see the Flash Player icon.  The alternative is to type 'flash player' in the control panel search box which should be also.

    Note also that change the auto update to "notify me to install updates" will only delay the process of 30 days.  After 30 days, the update will be installed automatically.  You can completely disable this by changing it to "never check", but I would certainly recommend against that.

  • Why my favorites list has been removed from the iPhone?

    iPhone 6 s + granted several months "Favorites" list of contacts (~ 10-12) placed. Good work, then on the recent trip abroad, I kept cellular function off for several weeks. In return, did "update to the carrier settings" as requested by message (Verizon). The list of 'Favorites' of contacts disappeared. Not sure if it was the case before the 'carrier settings update' or not, I'm not a heavy user of cell phone. The ads remain in the General contacts list. I have not yet authorized the latest IOS update. Before I go through the replacement of the list, I want to know how to prevent its loss again.

    I can't say I've never seen that happen before. However, strange things happen. I usually write off foreigners or cosmic rays. An update of the carrier should not have deleted your Favorites.

    As I do not think that it will be possible to know why it happened in the first place, it probably won't tell you how to do it will never happen. But, as I said, it is certainly not a common problem. If it were me, I would not spend a lot of mental energy to worry about this.

    Good luck.

Maybe you are looking for

  • Refilled ink cartridge will not work

    I had my recharged cartridges and use afew times my 6700 report they are empty and they are not.

  • HP-15-RO14TU-G8D94PA: USB Ports not working not

    Hello I recently bought a laptop HP 15-RO14TU in line with MS DOS. I have Windows 7 Ultimate installed on it, but since installation, the USB Ports do not work, i.e. USB devices are not recognized by the computer. The technician said that he could no

  • The update of my phone!

    Bye Motorola, I'm tired of this shit of lockdown. I take this back Atrix for at & t. Before all you 'brainiacs' start yelling, oh, "another forum started by a person who has not done his research", let me tell you this: I should not have to research,

  • Microsoft Visual C ++ Runtime error - this application library requested execution unusual way. -.

    I installed half life episode 2 1 in the Middle, the following message is displayed on the game screen and game hung when I click on the game stopped following message - microsoft Visual C ++ Library Runtime error - this application has requested the

  • replace the 1rent hard drive test item

    I have a laptop Compaq CQ50-139WM.  Unfortunately, I don't have back up discs.  It wouldn't start so I drive some tests to F11.  "Replace the disk hard 1rent test item" is what happens when you test the disc hard self-test.  And thought? If the hard