Layout bounds vs. painting bounds - how to avoid movement from effects?

I have a component that I apply a dropshadow effect to when it's hovered over. This causes a visual glitch as the addition of the dropshadow increases the bounds of the component and so I see it shift in the layout as it is moused over.
What is the best pattern to avoid this?
Do I need to override getLayoutBounds and do something fancy?
I want a solution that doesn't require code changes if my stylesheet is changed and the size of the dropshadow changes because of that.

setPickOnBounds(false) did fix my mouse event issues.
But I am left with the odd layout behaviour.
I have a structure like this:
AnchorPane->BorderPane->Pane-> (bunch of this same structure starting with AnchorPane can be nested within - user can position them by dragging)
The AnchorPane can be resized by the user - to set the minimum size (using setMinWidth/Height). If the min size is less than preferred size, the layout engine does the right thing and uses the preferred size. I.e. if I drag the nested content to the lower-right past the min size that was set by the user dragging the corner then the whole structure expands to keep the children contained. This works using either Group or Pane as the center component of my BorderPane (the east and west components are filled with VBoxs that have other stuff in them).
However... when I drag to change the min size of one of the nested AnchorPanes, while it draws that AnchorPane at the correct size, the parent is not resized to take the new size in to account -- UNLESS I move the nested structures of the resized AnchorPane - then I see the parent structure resizing as if it is accommodating only the preferred size of the nested parts, not the actual size of the nested parts as painted and dictated by the min size.
It's hard to describe, I hope I'm communicating it...
Basically it seems that Pane uses preferred size and not the actual size of child nodes when computing its preferred size. The min size of child nodes being greater than the preferred size of the child nodes does not affect the layout of the parent Pane.

Similar Messages

  • How to avoid the toggle effect in JButton

    Hi,
    I am displaying the text in JButton and called the properties as follows:
    <jButton>.setText("Welcome");
    <jButton>.setFont(new FOnt("SansSerif"),Font.PLAIN,12);
    <jButton>.setForeground(Color.black);
    <jButton>.setContentAreaFilled(false);
    <jButton>.setBorderPainted(false);
    <jButton>.setFocusPainted(false);
    <jButton>.setOpaque(false);
    <jButton>.setBorder(null);
    But, when i click on the text, there is slight jumping effect(slight toggle effect) in the text. Text goes slightly downwards and come back to its original position.
    Also, i have set the WindowsLookAndFeel.(which is mandotory for us).
    If i remove the WindowsLookAndFeel, it works fine.
    How to avoid this toggle effect.
    Could anyone can help in this regard?
    N.Madhusudhanan

    Your button doesn't look like a button. So does it have to be a button? Why not try using a jLabel with proper event handling?

  • Just bought and installed Elements 12.  How do I move from one photo to another once I'm done editing??

    Just bought and loaded Elements 12... How do I move from one photo to the next, once I'm done editing??  HELP!!

    If they're already open, just double click the one you want in the photo bin at the bottom of the screen.

  • How do I move from one website to another using Safari, while still allowing Pandora to provide music in the background? It seems that when ever I open a new URL, I lose Pandora.

    How do I move from one website to another using Safari, while still allowing Pandora to provide music in the background? It seems that when ever I open a new URL, I lose Pandora.

    Try running Pandora in its own tab and leaving that tab open (Safari 7.1.5, OS 10.9.5).  I don't have Pandora to try this, but it works for me otherwise.
    Good luck
    srb

  • TS1501 How to transfer movies from my Apple Mac to my ipad.?

    How to transfer movies from my Apple Mac to my ipad.?

    Where are these movies? what format do they have?
    You'll need to Import them into iTunes, and sync them through there if they aren't in itunes already.
    Yoiu may need to convert them to a playable format for the iPad. If its a video format itunes support, you ncan make playable versions for iPad from within iPad.
    Alternatively if you find a Video App such as Moli Player you can import them into the App through iTunes File sharing as well without having to change their format. Moli player is capable of playing many types of videos and audio formats.
    iOS: Syncing with iTunes
    http://support.apple.com/kb/ht1386
    iOS: About File Sharing
    http://support.apple.com/kb/ht4094

  • How to transfer movie from laptop to ipad

    how to transfer movie from laptop to ipad??

    Connect the iPad to your computer and select it on the left-hand side of your computer's iTunes, and then use the Movies tab on the right-hand side of iTunes to select and sync your film the iPad's Videos app. If it says that it isn't compatible with the iPad then try doing Advanced > Create iPad Version and then try syncing that version over.

  • How to transfer movies from PC to itunes version 11.0.1.12

    How to transfer movies from PC to itunes version 11.0.1.12

    Same as always.
    Sync them.
    Open itunes, connect iphone, select what you want, sync

  • How to transfer movie from MacBook Pro to iPad ?

    How to transfer movie from MacBook Pro to iPad ?

    For transferring videos you could use 'Video Transfer App'. I'm the developer of this universal application (iPhone/iPad) that let's you transfer videos from your iPad or computer directly to another iPhone or iPad.
    The app is currently in the Top 25 iPad apps in the photography category.
    Here are couple of videos that show how the app works:
    http://www.phototransferapp.com/ipad.html
    I hope you find it useful.

  • How to transfer movies from MacBook Pro to iPad Air

    How to transfer movies from MacBook Pro to iPad Air ?

    Sync movies to iPad
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Sync-An-iPad-With-iTunes-Music-Mov ies-Apps_4.htm

  • How to transfer movie from the apps in iphone to my laptop with window 7 os

    how to transfer movie from the apps in iphone to my laptop with window 7 os ?? Pls helpppp =)

    Movie from what app? If this is a movie that you took, with the video camera of the phone, then see this. iOS: Import personal photos and videos from iOS devices to your computer

  • HT1212 How to transfer movie from iTune to my iPhone 5?

    Hi Community,
    I would like to know how to transfer movie from iTune to iPhone. A step-by-step procedure will be appreciated.
    Thanks and regards,
    Jidanne

    Launch iTunes and connect the iPhone to your computer. Select your device from the left sidebar and nevigate to the Movie tab at the top. In the window that opens check the Sync Movies checkbox and select the movie you want on the iPhone. Click Sync or Apply in the lower right corner of the iTunes window. When the sync if finished the movie will be in the video app.
    Hope that helps.

  • B2B Arch - How the Messages move from the Servlet to IP_IN_QUEUE

    Hi all,
    I am having one basic architectural question.
    We have defined the Host Trading partner with the Delivery channel having the URI for the transport as b2b/transportServlet. While creating the agreement between this host trading partner with the other remote trading partner, we are using the standard Internal delivery channel as B2B Inbound, as we are doing the inbound interface. So, whatever the Inbound messages is coming from the remote trading partner it will enqueued into IP_IN_QUEUE.
    I referred some of the documents, to know the architectural details how the message come into the IP_IN_QUEUE. Those document says that b2b/transportServlet is the entry point for all the Inbound messages. Please correct me if I am wrong. I am more interested to know what are all the intermediate steps involved in the movement fo the message from the b2b/transportServlet to IP_IN_QUEUE. Basically how the message move from b2b/transportServlet to the IP_IN_QUEUE.

    Hi,
    The transportServlet hand over the b2b message via RMI to the B2B Server. The B2B Server then process this message and delivers it to the IP_IN_QUEUE.
    Eng

  • How to watch movie from iTunes on mac

    how to watch movie from iTunes on mac

    Open iTunes, click on "Movies" in the upper left corner (where it probably says "Music" when you open iTunes), and double click the movie you wish to see.

  • How do I move from Photoshop Elements 10 on a PC to Photoshop Elements 13 on Apple iMac?

    How do I move from Photoshop Elements 10 on a PC to Photoshop Elements 13 on Apple iMac?

    See:
    Use Backup, Restore to move catalog | Organizer | Elements 6 or later

  • How do i move from one I tunes store to another country if I have credit remaining

    How do i move from one I tunes store to another country if I have credit remaining

    You can't whilst you have a balance. If you can't spend it then you can try contacting iTunes support and ask them if they can remove the balance so that you can change countries : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

Maybe you are looking for

  • Why does deleting a calendar appointment on an iPhone 5 running iOS 6.0.2 not send a cancellation notice to attendees?

    The company I work for runs Microsoft Exchange 2010 servers on premise. I have an Exchange account configured on my iPhone 5 running iOS 6.0.2. I am finding that if I choose to Delete an event from the Calender app on the iphone, the event is being r

  • Splitting Select Options

    Hi All, I am facing a problem in splitting the Select options for my screen. What I have to do is I am expecting the User to enter around 5000 records in the Select Options. I have to use 2000 records at a time for processing, which means three set o

  • Carriage return (cmd-alt-return) in a event

    Since I switched to Mac OS Lion, carriage returns are no longer functional (cmd-alt-return). Instead of lists, my text is condensed and difficult to read. Is this a bug? Is there a setting that can correct this?

  • Link between BP and CP.

    Hi, I have a user for whom BP number is not displayed in PPOSA_BBP, but it exist. How to link BP and CP in SRM 5.0

  • Drop/delete tablespace

    hi how can i delete table-spaces,but i what to delete those tablespace which are not been used how can i check if tabalespaces is been used and delete it if is not used