How can a transparent stage have round corners and drop shadow?

Hi,
This is actually 2 questions:
1- How can a transparent stage have background corners?
I've tried doing this:
.rootPane
-fx-border-radius: 4 4 4 4;
-fx-background-radius: 4 4 4 4;
-fx-border-color: gray;
-fx-border-style: solid;
-fx-border-width: 1;
-fx-background-image: url("resource/clean_textile.png");
And make the root of the scene have the ".rootPane" style class.
But it sometimes shows some visual artifacts on the corners. Am I doing it wrong? is this a bug?
2 - How can a transparent stage show the windows 7 drop shadow effect of windows? Is it possible?

How can a transparent stage have background corners?Yes, this is a possible.
There are a few of tricks and you need all of them:
1. StageStyle must be transparent:
new Stage(StageStyle.TRANSPARENT);2. Scene fill must also be transparent:
new Scene(root, Color.TRANSPARENT);3. Color the background:
-fx-background-color: derive(cadetblue, -20%); 4. You need to apply the dropshadow effect to the background region.
-fx-effect: dropshadow(three-pass-box, derive(cadetblue, -20%), 10, 0, 4, 4); 5. You need to inset the background in the region which has the dropshadow so that the shadow will be visible within the Stage and not clipped out of the stage bounds.
-fx-background-insets: 12; 6. You need to apply a radius to the background to round it's corners.
-fx-background-radius: 6;Here is a sample in this gist revision =>
https://gist.github.com/1887631/155d5e052b6ec7d0eaa6f825713f98f8e542152e
How can a transparent stage show the windows 7 drop shadow effect of windows? Is it possible?You can kind of approximate it using the above techniques, but I don't think you will be able to get an exact match without something like: http://javafx-jira.kenai.com/browse/RT-18936 "Enable aero-style glass transparencies" (and probably additional JavaFX platform support as well) being implemented.

Similar Messages

  • How to move javafx stage by mouseevent drag and drop

    Hi there,
    Do you know how to move stage by mouse event drag and drop event.
    My Idea is to create a stage without title header but the user can move it by click the body of the stage and hold it and release it into some where new place by mouse event.
    Any body....?
    Thanks before

    I solved the porblem by using this point code:
    onMousePressed: function(e) {
    X = e.screenX - stage.x;
    Y = e.screenY - stage.y;
    onMouseDragged: function(e) {
    stage.x = e.screenX - X;
    stage.y = e.screenY - Y;
    The code can be implemented on every node.
    Edited by: 840072 on Mar 15, 2011 8:34 PM

  • How can i get the address with drag and drop from address book into pages?

    I want to creat a letter withe the new pages. Normaly it was possible to put the adress from the adressbook with drag and drop into the letter. So it was possible to create one letter with many different adresses. But now I didn't find this function any more. How to do ist now?
    Withe best regards and I'm sorry for may bad english
    Klaus

    Sounds like you "upgraded" to Pages 5.
    Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5, after Exporting your files to Pages '09, and rate/review it in the App Store, then get back to work.
    Peter

  • Rounded corners and dropshadows in CSS

    Hi all,
    Hopefully I am not repeating a similar question. I am trying to redesign my site (with not much luck) in CSS. I want some text/navigation boxes that have rounded corners and drop shadows.  Using CSS do I still need to create the images in an image editor, slice the images and place the appropriate sections of the image in divs to get this effect (much like using tables)?
    Thanks in advance
    Chris

    afr43 wrote:
    Using CSS do I still need to create the images in an image editor, slice the images and place the appropriate sections of the image in divs to get this effect (much like using tables)?
    Thanks in advance
    Chris
    Like Nancy mentioned, the border-radius properties are not supported in older browsers, particularly IE6, which some of us still worry about. I'm not sure about the support in IE7, but I still design with IE6 in mind. In fact, I have never upgraded my IE browser since version 6, so I keep it on my computer for testing purposes.
    In deciding whether to use new css features is deciding whether you are willing to leave IE6 behind. I emailed Simon Collison about this topic a couple of weeks ago. He wrote two very good books about CSS, Beginning CSS and CSS Mastery. The latter book was co-written with Andy Budd.
    Here's what Simon said:
    "There are so many conflicting views that you really need to think about your target audiences and decide based on that. Will you upset just two or three percent of people, or twenty/thirty percent by not serving for IE6?
    "We use stats to discover the portion of users using IE6 and make a unique decision for each project.
    "In all honesty, I think it is too early to abandon IE6. We work for clients in the real world, with lots of users locked into using IE6 thanks to over-zealous, outdated IT teams/experts who won't let them upgrade or use Firefox etc."
    When I mentioned to Simon that some of the css features he used in his book were not supported in IE6, he responded:
    "In a book like CSS Mastery, you have to forget older browsers and look at the future, and cool, exciting techniques. If we wrote that book so everything worked in IE6, it'd be a dull book, and would not have advanced CSS usage."
    Most of us are itching to use the latest features of CSS but we need to design for users and consider what their experience will be. So, it comes down to this: It's your decision whether you will use CSS that is not supported by some of the older browsers. If you have a fairly sophisticated market that probably upgrades their browsers to the latest versions, then you might choose to go with the latest features.
    My decision is to still style for IE6 (I think it's safe to say that most designers have left IE5 far behind in the dust). These new CSS3 features will look absolutely hideous in IE6.
    There is a technique Simon uses in one of his books that he calls "progressive enhancement." The technique will enable new css features, like rounded corners, to only work in modern browsers and in old browsers, like IE6, visitors will see square corners.
    I think the best technique that most designers still use is to create rounded corner images in your css. Here's an example of a web site showcased in css zen garden that uses rounded corners with a drop-shadow:
    http://www.csszengarden.com/?cssfile=208/208.css
    If you right-click on the rounded corners and look at the background images, here's what you see:
    For the header: http://www.csszengarden.com/208/top.jpg
    Main content: http://www.csszengarden.com/208/right_bottom.gif
    Side bar: http://www.csszengarden.com/208/left_bottom.gif
    CSS Zen Garder invites designers to download the css file from these sites so you can learn from it.
    By the way, the second edition of CSS Mastery: Advanced Web Standards Solutions is due out in a couple of weeks.

  • Round corners and transparent background

    Hello everyone
    I have just started to use my new Photoshop CS5 and came across a problem. How do I make a marking with round corners and a want to have the background transparent to use on the web. We can't use the old way because it is grey in the menu. I hope you understand what I meen. Please help me with a easy way thank you.
    Hopefully waiting for help.
    Lotta

    First Alt double click the "Backgound" layer in the layers panel to rename it. (A layer called Backgound will not support transparency.)
    Then draw a Rounded Rectangle Path around your object with the Shape tool.
    (Use the Paths option in the Options bar.)
    You can also adjust the radius there.
    Right-click outside the path and choose Make Selection.
    Invert the selection – Ctrl+Shift+I – and press Delete.
    Go to File > Save for Web and choose PNG-24 as a format and save.

  • HT3951 I purchased a movie on the AppleTV 2 but it is not showing up in iTunes on my desktop computer. How can I sync? (have lastest version of iTunes and ATV2 software)

    I purchased a movie on the AppleTV 2 but it is not showing up in iTunes on my desktop computer. How can I sync? (have lastest version of iTunes and ATV2 software)

    Of course it always works, what are you talking about.
    I appreciate that re-downloading is only available in the US and then only with certain content. However content that cannot be re-downloaded is not offered for purchase on the Apple TV.

  • When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Websites remembering you and automatically log you in is stored in a cookie.
    *Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    *Tools > Options > Privacy > Cookies: Exceptions
    In case you are using "Clear history when Firefox closes":
    *do not clear Cookies
    *do not clear Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins.

  • My husband and I share a new PC.  We have different music tastes and each have an iphone.  How can we both use our one computer and one itunes program with separate music libraries and separate iphones?

    My husband and I share a new PC.  We have different music tastes and each have an iphone.  How can we both use our one computer and one itunes program with separate music libraries and separate iphones?

    Each device only syncs waht you select.
    Select only what you want for each phone.

  • How can I make my account in syria and i have not acredt card

    how can I make my account in syria and i have not acredt card

    Sorry.  Don't believe that is possible.

  • How can we choose to have different apps, different playlists, different contacts, etc., on each device., while using one itunes to sync more than 1 iphone

    How can we choose to have different apps, different playlists, different contacts, etc., on each device., while using one itunes to sync more than 1 iphone

    Use Multiple Devices with One Computer
    How to use multiple iPods, iPads, or iPhones with one computer

  • I have 2 iphones, one for personal and one for business.  I need my phones not to sync otherwise they will both ring all the time.  How can I log out of my icloud and unsync my phones?

    I have 2 iphones, one for personal and one for business.  I need my phones not to sync otherwise they will both ring all the time.  How can I log out of my icloud and unsync my phones?

    Syncing your phones to the same iCloud account won't cause them to both ring all the time, it only puts the same contacts, calendars, and other synced data on the phone.  The phones will only ring with someone calls the number associated with the phone.
    If you want to stop using iCloud on one or both of the phones, go to Settings>iCloud, tap Delete Account, then choose Keep On My iPhone when prompted.  This will disconnect them from iCloud and keep a copy of the synced data on the phone.

  • My ipad has gone in lost mode by mistake and now i have it and i enter the password and i cant enter my ipad how can i enter or restart the ipad and start back over new

    my ipad has gone in lost mode by mistake and now i have it and i enter the password and i cant enter my ipad how can i enter or restart the ipad and start back over new

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • HT4759 How can i delete an old iCloud account and start using my own using my Apple ID? If I don't have the old password??

    How can i delete an old iCloud account and start using my own using my Apple ID? If I don't have the old password??

    If your device is signed into an old iCloud ID that is an earlier version of the ID you want to sign in with, do the following:
    If you are using iMessage and FaceTime, make sure you are signed into these services with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iDevice and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then save any photo stream photos that you wish to keep to your camera roll (unless you are using iCloud Photo Library).  When finished go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

  • I have 2 iphones and a macbook on one mobile me account.  How can I keep mail in the macbook and one iphone private from the other iphone?

    I have an iPhone 3G, an iPhone 3GS, and a MacBook on one macmail and mobile me account.  How can I keep mail on the MacBook and iPhone 3 private from the iPhone 3GS?

    Pretty much. I don't understand why you need to worry about MobileMe, though. I'd guess the vast majority of us with iDevices don't have MobileMe accounts at all. That's pretty much why it failed.

  • I have an ipod nano 4th generation.  I let my grandson, who has a shuffle, connect his shuffle to my computer and now my itunes recognizes his shuffle and not my nano.  How can I get rid of his shuffle and re-add my nano

    have an ipod nano 4th generation.  I let my grandson, who has a shuffle, connect his shuffle to my computer and now my itunes recognizes his shuffle and not my nano.  How can I get rid of his shuffle and re-add my nano?

    Hi lundjj,
    Thanks for visiting Apple Support Communities.
    You may find the troubleshooting steps in this article helpful if your iPod nano does not appear in iTunes:
    iPod not appearing in iTunes
    http://support.apple.com/kb/ts3716
    This information can also help if you are using multiple devices with a computer:
    iPod for Windows: Connecting multiple iPod devices to iTunes
    http://support.apple.com/kb/ht3622
    Although FireWire and USB connections will allow multiple iPod devices to be connected to the computer at the same time, iTunes for Windows works best with only one iPod connected at a time. If you plan to connect multiple iPod devices to the same computer, eject any iPod devices that you are not using from iTunes.
    All the best,
    Jeremy

Maybe you are looking for

  • Is there any benefit to 64-bit version when I only have 4GB of RAM?

    My laptop only has 4GB of RAM so I am wondering if there is any benefit to installing 64-bit version? Besides I have an AMD Athlon II P340 Dual-Core 64-bit processor which isn't very powerful so I am not even in the best spot to take advantage of 64-

  • Accidentally disconnected ipod, now itunes won;t open

    i accidentally disconnected my ipod, and had to force quit itunes (i have Mac Book pro, running a Mac OS). No, itunes won't open when i click it in the bar, and when i try to open it with the finder, it just says "an unxpected error occurred (error c

  • A bug in video capture?

    I have an old Sony DCR-TRV70 DV camcorder that I want to use to download Mini DV tape content into Premiere Pro CS5.5. Using a firewire cable connection I get "Capture Device Offline" in Premiere's Capture screen, even though the device is recognized

  • Addition of dynamic selection fields on FBL3N

    Hi all, I want to add LIFNR(vendor accnt) and NAME1(vendor name) on the 'dynamic selections' screen of transaction FBL3N. I need to get these fields from LFA1 but LFA1 is not present in the Logical database of this program. Please help me and tell me

  • Run a script on file open?

    I realize there is a way to run scripts when AI launches, but is there a way to run a script when AI opens a file?