I still do something wrong with Scrollpane and zoom capability

Hi all!
I thought I was successful in creating a working ScrollPane with centered zoom capability, but now I noticed that it doesn't work like it should, if the content node's PrefSize is larger then the scrollpane's size.
The probleme is: if the contentNode is smaller then everything works how it should. The scrollbars update accordingly to the scale transformation. The scale transformation is applied to a node X and this node is a child of a flowPane node. The flowpane node ist the actual contentNode for the scrollpane.
The node X has a changeListener for node.boundsInParent property and updates the flowpane's prefSize.
Like I mentioned, everything works fine if the node and with that the flowpane's initial prefSize is at most same size like the scrollpane's.
The probleme is that if the scaling is smaller than the scrollpane's size, the scrollbars don't update anymore, they keep the state for the initial prefSize of the flowpane While debugging I noticed that the actual size of the flowpane doesn't change if the changeListener sets the new prefSize to a down scaled size, smaller than the initial size (scalefactor = 1), but the prefSize of the flowpane changes if the scaled size is bigger then the initial size. And I think this behaviour of the flowpane ist stange (actually it is the same for stackpane and maybe for the other panes too).
I couldn't find a way for the case that the initial contentNode is bigger than the scrollpane size.
I didn't expect that implementing a scroll pane with zoom capability would be such a probleme. I really need a solution for this probleme.
EDIT: Ok after a lot of testing I noticed, that StackPane and FlowPane behave like I had described it above, but Pane itself does behave like it should, at least how I would expect it. Now the probleme is, even if the Pane reduces its size and the scrollpane adaptes to it accordingly, the scale transformation is always centered and therefore the node with the transformation will be outside the Pane.
It's like I never find a complete solution for my probleme. Everything I do has one fault.
Thanks in advange.
Edited by: user965407 on 25.12.2011 04:28

ScrollPane documentation (http://docs.oracle.com/javafx/2.0/api/javafx/scene/control/ScrollPane.html) states:
"If an application wants the scrolling to be based on the visual bounds of the node (for scaled content etc.), they need to wrap the scroll node in a Group."
Not sure if that is what is causing your issues or not, but something to consider anyway.
Also, you may want to try running and reviewing this example code (https://gist.github.com/1442298) for a centered node in a scrollpane with various effects and transformations (such as scaling) applied.

Similar Messages

  • Safari tries repeatedly to open a page. The page partially opens but then Safari reports that there's something wrong with page and I get an error message. This is happening at too many web sites for one site to be having issues.

    Safari tries repeatedly to open a page. The page partially opens but then Safari reports that there's something wrong with page and I get an error message. This is happening at too many web sites for one site to be having issues.

    I have a similar problem, Safari cannot load a complet page. It stalls e.g. ["38 of 42"]. sometimes it will complete loading after a long wait. just as often it will never complete the page,
    The same thing happens in chrome and firefox but safari on my iPad works just fine.
    I have the latest version of everything
    I assume there is a system problem but cleaning up permissions does not help

  • Is there something wrong with Quicktime and TIFFs?

    I've been trying to see with Firefox the TIFF images of patents at the USPTO site and I can't. The browser advises me to install the missing plug-in although Quicktime is already installed. I wonder if it's a Quicktime problem or a Firefox one. I have a reason to believe there's something wrong with Quicktime though. Read on to see why.
    On my system the *TIFF Image Test* (from mozdev.org) fails although I have the latest Quicktime plug-in. This happens regardless of the browser I use, all latest editions: Firefox 3.6, Internet Explorer 8 (both 32-bit and 64-bit versions) and Chrome 4. All seem to fail to recognize the presence of the installed Quicktime although my Windows OS is set to open TIF/TIFF files with Quicktime/PictureViewer.
    Running about:plugins on my Firefox does show the Quicktime plug-in for a variety of files but NOT for opening embedded TIF/TIFFs. Also, when I open *Tools -> Options -> Applications* I see there is no registered handler for TIF/TIFFs. They don't appear on the known Content Types.
    Is there something wrong with the installation of Quicktime? I can see USPTO TIFF images only with Safari which appears to have an integrated TIFF viewer. I haven't tried to install alternatiff or any other alternative TIFF handler.

    DocBAZ,
    I tried to visit the "test site" above. I'm not really sure it's an embedded image on a HTML page because I get a Firefox download window and a suggestion to open it with PictureViewer, which is the expected behavior for downloadable images. The mozdev.org test page on the other hand had an embedded image that needed the plugin, which is what is bugging me.
    If you want a real complex test page with both an embedded TIFF and a downloadable one check AlternaTIFF here: http://www.alternatiff.com/testpage.html
    Indeed the changes I made were in the QuickTime preferences, not PictureViewer which has no settings to change. And yes, Windows 7 has a unique place to deal with file types and MIME settings.
    You will find some interesting suggestions over the problem at SuperUser.
    http://superuser.com/questions/107142/uspto-site-asks-for-quicktime-plug-in-whic h-i-already-have-installed-why

  • Is there something wrong with ipod and Windows XP? ipod not found at all?

    search for ipod in microsoft help and support....
    here's a bit here's what microsotft says:
    To resolve this problem, delete the UpperFilters registry value and the LowerFilters registry value. These values may cause access problems. To do this, follow these steps:
    1. Click Start, click Run, type regedit , and then click OK.
    2. Locate and then click the UpperFilters registry value. This value is located in the following registry subkey:
    HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E980-E325 11CE-BFC1-08002BE10318}
    3. On the Edit menu, click Delete, and then click OK.
    4. Locate and then click the LowerFilters registry value. This value is located in the following registry subkey:
    HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\Class\4D36E967-E325-11CE-BFC1-08002BE10 318}
    5. On the Edit menu, click Delete, and then click OK.
    6. Exit Registry Editor.
    7. Restart the computer.
    my computer would crash, sometimes it'd just sync a couple random songs, sometimes i'd get error -50, somtimes a different message that said the disk could not be read or written to.....
    it worked perfectly for me!make sure to follow the directions. it's easy and resolves many Windows XP problems related to ipods. for more info try microsoft help and support and just serch for ipod. it list a bit more info there. it doesn't say anything about reinstalling the apple software, but just to be thorough i unistalled itunes and quicktime before anything just to start with a clean slate, then reinstalled them from my ipod disk after the restart. then i downloaded all the updates from apple. my ipod has never worked better. good luck. theres no link to the page just search for ipod in windows help and support for exact text...

    i am not a computer wiz...like our boys at apple i am asing a question and saying what i've tried, i dont understand why it works but, sweet, it worked for me and there must be a reason. it solved every problem i've posted in
    ,i would like to i would ike to know why i susspect uncompatible programs, from our faves, thats why i think tie discripition is humble, do you have to have multiple, random problems for this Microsoft fix to meet your ipod (formally) my ipod workked for a long time, amidst udates, and experimentation, i became a box topper for my unused tech...cords,cell phones, even a gameboy slept next to my 5th g there is not try theres only do, so someone do something and adrees my question, i'ts very detailed and if will help you i'll say i use the fast usb required, i deleated (claeared it all out before i even attempted to mess with the registry , i'd like mac user opinons, but what i'm really looking for is Windows XP users, Apple might fix this problem but i got a 30 gig the newest "obsolete" ipod there are many problems on pc that mac users may not have expieriencind, (because of different software?), so don't be quick to judge, i read a trusted support, i had nothing to lose, so i tried this registry edit and it was like a miracle fix...."

  • I synced. All my music disappeared. Now it will only sync my apps and not my music. Is something wrong with the port on my ipod, the USB cord, or Itunes?On Itunes it says I still have all my music. :(

    I synced my ipod to my computer and all my music disappeared. I tryed resyncing it and it would only sync my apps and not my music. I cant add music to my ipod. I something wrong with the USB port in the IPOD, the USB Cord, or ITUNES itself. Itunes still shows that all my music is there on my ipod. Itunes is recognizing that my ipod is connected, but it doesnt recognize that theres no music on my ipod anymore. Im so sad. Someone please help me. I miss my music.

    The music sync is one way - computer to ipod.  The only exception is itunes purchases.
    The ipod is not a storage/backup device.  It simply mirrors the selected content of your computer.
    As the music came from your computer in the first place, it should still be there and in your backup copy of your computer.

  • I have a Mid 2009 Macbook Pro 13 with no restore disk; it has OS 10.8.4 I believe there is something wrong with the OS due to I can not install flash player to view Youtube videos and the when we plug in a Bose headset the sound out will work sometimes

    I bough a used Macbook Pro mid 2009 that came with OS 10.8.9 it didn't have a backup restore disk with S/N W8******66D
    When trying to view some youtube videos; a window would pop up saying "it needs adobe flash player is required for video play back get the latest flash player" but after downloading the file and during installation would have errors and will not installed.....tried to reboot and install again.....but still the same.
    The othe thing I had noticed is when using a good Bose headset with mic the sound output would noticed the headset and then switch from headset to Internal speekers and headset.....thinking that there might be something wrong with the plug in port of the computer or the headset.....the headset works with no issues on my iPad so there must be something wrong with the computer.....tried to move the plugin around the port but no change....while the headset is plug in can hear a short clicking noise and the sound would get lost and back again......but with nothing plugin to the port there is no issue with the sound or mic.
    Thanks for your feed back......it looks like I have two different issues one is a software issue and the outher is a hardware issue
    <Edited By Host>

    The "restore disk" is built into the Mac. See About Recovery.
    Need more specifics about what error messages you got while installing Adobe Flash.
    However, you can almost avoid Flash altogether by setting YouTube to play the HTML5 version instead.
    Click the Try something new! link at the bottom of the YouTube page.
    I don't know about the sound issue. Might be hardware as you think. Try other headphones to check.

  • My ipod is cracked and it chipped away a little more last night and that's when my wifi stopped working. My wifi works on every other device in my house except for my ipod. Is there something wrong with my ipod?

    My ipod is cracked and it chipped away a little more last night and that's when my wifi stopped working. My wifi works on every other device in my house except for my ipod. Is there something wrong with my ipod?

    Does the iOS device connect to other networks?
    Does the iOS device see the network?
    Any error messages?
    Try right next to the router
    Do other devices now connect?
    Did the iOS device connect before?
    Try the following to rule out a software problem:                 
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    .- Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network       
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem and it does not connect to any networks make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar
    Could it be this?
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    One user reported that placing the iPod in the freezer fixed the problem. A trick that works frequently with iPhones:
    Settings > AirPlane Mode ON, Do Not Disturb ON
    Power down and wait 5-10 minutes
    Power up
    Settings > AirPlane Mode OFF, Do Not Disturb OFF
    If not successful, an appointment at the Genius Bar of an Apple store is usually in order.
    Apple Retail Store - Genius Bar

  • Just wondered if anyone else is experiencing the following problem and knows a solution. I know a few friends who are also having the issue so its obviously something wrong with IOS7.   Basically I have an iphone 4 and upgraded to v7 and most recently v7.

    Just wondered if anyone else is experiencing the following problem and knows a solution. I know a few friends who are also having the issue so its obviously something wrong with IOS7.
    Basically I have an iphone 4 and upgraded to v7 and most recently v7.0.2. When I am on calls the phone started to beep and vibrate and sometimes change the call to speaker. It seems to be that the screen is sometimes active whilst on calls and so my ear is actually pressing the buttons and hitting numbers or changing it to speaker phone. It has also cancelled a call a few times.
    This is extremely annoying and makes every call a worry.
    Any ideas of how to solve this problem?

    I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.

  • My wifi suddenly wont work on my i4s. i already reset network, forget network, restart, and put it in the refrigerator (coz some people said maybe theres something wrong with the heat of wifi inside ). what should i do?

    my wifi suddenly wont work on my i4s. i already reset network, forget network, restart, and put it in the refrigerator (coz some people said maybe theres something wrong with the heat of wifi inside ). what should i do?
    but sometimes, it can read,but wont connect.
    sometimes it even wont read  the wifi .
    sometimes, when it can connect, the password already correct, but it didnt want to connect.
    it suddenly happened, without i changed the seeetinggs or else.
    i read every solutiuon on google., etc2, and tried the way, but it still wont work.
    anyone can help ? pleasee ;(

    This is a totally absurd suggestion, except that it worked for me with my iPad.  Forget the network, then when asked for the password, enter a wrong one.  Try again and enter the correct password.  Good luck.

  • My phone wont let me download anything even free stuff or update.it keep saying something wrong with my billing info so i fix it but still cant download.I signed out sign back in still nothing please help i'm getting angry

    My phone wont let me download anything even free stuff or update.it keep saying something wrong with my billing info so i fix it but still cant download.I signed out sign back in still nothing please help i'm getting angry

    If it says your billing info is wrong that means that your credit card issuer is refusing to approve your account. You will have to solve the problem with your bank or credit card company.

  • There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator.

    There is something wrong with the volumes buttons in my macbook pro, every time i pressed the one who raises the volume, it leads me to the screen where (i do not no what its called) the background is black with the date and time and a calculator. However, when i lower it, my safari tab goes out of the screen. What do you guys think i should do? I'm getting very nervous.

    hey HAbrakian!
    You may want to try using the information in this article to adjust the behavior of your function keys to see if that resolves the behavior:
    Mac OS X: How to change the behavior of function keys
    http://support.apple.com/kb/ht3399
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • There is always a blue screen appears after the Apple logo during the booting process. And then everything is back to normal. What is this thing? Is there something wrong with my screen or something?

    There is always a blue screen appears after the Apple logo during the booting process. And then everything is back to normal. What is this thing? Is there something wrong with my screen or something?

    Nah - that's just the normal boot process.
    Clinton

  • I just purchased Final Cut Pro X and I want to burn a dvd but the tabs do not see the option of SHARE. Is there something wrong with my Final Cut Pro X?

    I just purchased Final Cut Pro X and I want to burn a dvd but the tabs do not see the option of SHARE. Is there something wrong with my Final Cut Pro X?

    It's also under the File menu.

  • My iPhone 5 screen is black and will not come back on. The phone still works when paired with my vehicles Bluetooth what's wrong with it, and can I fix it?

    My iPhone 5 screen is black and will not come back on. The phone still works when paired with my vehicles Bluetooth what's wrong with it, and can I fix it?

    I have a similar problem.  I restored my iPhone 5 to the latest available OS.  After completing the process the phone never restarted.  The phone was fully charged when I restored it but now refuses to charge past the red battery icon.  I have been able to get the phone in UFD mode several times and have been able to load the new OS on the phone.  The Apple logo does come on and the software fully loads.  iTunes tells me the phone will restart but never does.  I left it to charge all night but it never appeared to load the battery.  This morning I went to the Grand Central Terminal apple store for help.  A woman at the store plugged the phone in but it never charged.  She absolutely refused to believe that I got my phone in UFD mode and loaded any software on.  I don't think it is a battery issue.  The only solution I was given was to buy a new phone.  Repairing it was out of the question.  At this point the phone is completely useless.  Thanks in advance for the help.

  • Just got an Ipad and am working on setting it up.  the one issue I am having with it is my screen will not rotate no matter what I do to the settings, I can't figure out if the settings are wrong or if there really is something wrong with my Ipad.

    just got an Ipad and am working on setting it up.  the one issue I am having with it is my screen will not rotate no matter what I do to the settings, I can't figure out if I have a setting wrong or if there really is something wrong with my Ipad.  any help would be greatly appreciated.

    Double click the home button (square)  and all the things you did are there.keep sliding the bar that will come up on the bottom to the left till it cant go anymore there should be a icon looking like this.press that and it should work
    Good luck hope it works.

Maybe you are looking for