With Java8, how can I make my tooltips behave as they did with Java7?

Since some of my customers may want to run Java8, I decided to try my application with Java8. There were quite a few problems most of which were resolved when I decided to do a revamp in anticipation having to have the system run on Android and ios platforms.
I now have everything working except Tooltips.
With Java7, Tooltips were not styled and the default was satisfactory. On Java8, the Tooltips had a black background with white lettering with too small a font size. Also, since I was defining a background in .root, there was an addition rectangle to the right and below the tooltip. After much trial and error, I was able to get a satisfactory Tooltip in Java8 although I cannot see how to implement the page corner.  To remove the background rectangle (which also appeared on my ChoiceBoxes, I had to style .root.popup). Below is the relative section of my css file.
However, when I run this under Java7, I get a Tootip with a transparent background and black lettering.
Is there anyway I can get the same tooltip styling to work with both Java versions?
Thanks for the help.
Alex
    Document   : e3css
    Created on : Jul 25, 2012, 12:12:40 PM
    Author     : Admin
    Description:
        Purpose of the stylesheet follows.
.root {
    -fx-base: rgb(50,250,50) ;
    -fx-background-color: linear-gradient(to bottom, rgb(0,227,0), rgb(50,160,50));
    -fx-focus-color: green ;
    -fx-accent: green ;
    -fx-border-color: black ; 
    -fx-border-width: 2 ;
    -fx-border-style: solid ;
    -fx-border-radius: 10,10,10,10 ;
    -fx-background-radius: 10,10,10,10 ;
.root.popup {
   -fx-background-color: transparent ;
   -fx-border-color: transparent ;
.tooltip {
    -fx-background-color: gold ;
    -fx-font-family: Verdana,Arial,Helvetica,sans-serif;
    -fx-font-size: 12px;
    -fx-font-weight: bold;
    -fx-fill: white;
    -fx-background-radius: 10,10,10,10 ;
    -fx-border-color: black ; 
    -fx-border-width: 2 ;
    -fx-border-style: solid ;
    -fx-border-radius: 10,10,10,10 ;

See:
  styles - How can I keep the JavaFX 7 skin with JavaFX 8? - Stack Overflow
Which I replicate here:
Simply put:
setUserAgentStylesheet(STYLESHEET_CASPIAN);
...as the first line of your program (in the start() method), or run it with the JVM flag -Djavafx.userAgentStylesheetUrl=caspian.
Note the above method isn't present in JavaFX 2.x, so if you want to do this in code that compiles and runs on both Java 7 and 8, unfortunately the only way around it is via reflection.
The above demonstrates how to keep the entire look and feel of caspian (from Java 7) for Java 8.
If you want the default JavaFX 8 style (modena) for everything but tooltips, you can probably just copy and paste the tooltip styling css from caspian.css and put it in your application stylesheet (though I have not tried that so I'm not 100% sure it will work correctly for you).  You can find modena.css and caspian.css in the JavaFX sources: java - Where to get the JavaFX sources? - Stack Overflow.  For example caspian.css is here and it's tooltip styling code is copy and pasted below:
.tooltip {
  -fx-skin: "com.sun.javafx.scene.control.skin.TooltipSkin";
  -fx-background-color:
  linear-gradient(#cec340, #a59c31),
  linear-gradient(#fefefc, #e6dd71),
  linear-gradient(#fef592, #e5d848);
  -fx-background-insets: 0,1,2;
  -fx-background-radius: 0 0 13 0;
  -fx-padding: 0.333333em 0.666667em 0.333333em 0.666667em; /* 4 8 4 8 */
  -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 8, 0.0 , 0 , 0 );
.page-corner {
  -fx-padding: 4.5 4.5 4.5 4.5;
  -fx-background-color: linear-gradient( from 0% 0% to 50% 50%, #fcf7b6, #a59c31);
  -fx-shape: "M0,0H9L0,9Z";
  -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 4 , 0.0 , 0 , 0 );

Similar Messages

  • How can i make a picture from a video file with final cut pro x?

    how can i make a picture from a video file with final cut pro x?

    Go to the "share" menu, select "save current frame"

  • HT201343 How can I make my 2013 Mac Pro been compatible with airplay & mirroring display

    How can I make my 2013 Mac Pro been compatible with airplay & mirroring display ?
    Thanks for any help !

    2013 Mac Pro would be compatible
    http://support.apple.com/kb/ht5404

  • In snow leopard, 2 fingers to the left on the mouse went back to the previous page. In Lion, it opens the dashboard. How can i make firefox go back to previous page with two fingers left on the mouse??

    In snow leopard, 2 fingers to the left on the mouse went back to the previous page. In Lion, it opens the dashboard. How can i make firefox go back to previous page with two fingers left on the mouse??

    Hi,
    I don't know of a preference, but have you used ⌘-T in iCal?
    Best wishes
    John M

  • HT1218 How can I make my first generation AirPort Express work with Mountain Lion? I have a 13" MacBook Pro (non-retina).

    How can I make my first generation AirPort Express work with Mountain Lion? I have a 13" MacBook Pro (non-retina).

    Hi guys, recently had the same issue. You require an older version of Airport Utility to configure the older Airport Express. It can be found here.
    http://www.google.com/url?sa=t&rct=j&q=airport%20utility%205.6%20for%20lion&sour ce=web&cd=1&ved=0CFMQFjAA&url=http%3A%2F%2Fsupport.apple.com%2Fkb%2FDL1482&ei=Ip MBUPLwLoq42wW4puXMBA&usg=AFQjCNGOFUPMM0ZjsKeyj5CcL2oe9Eaf7A

  • How can I make my Apple tv remote stop interacting with my MacBook and my iMac? Everytime I press the reote, the sound will go up or down on my computers or they will wake up.

    How can I make my Apple tv remote stop interacting with my MacBook and my iMac? Everytime I press the reote, the sound will go up or down on my computers or they will wake up.

    Welcome to the Apple community.
    If you don't want to use a remote with your computer the easiest thing to do is just to turn the IR off. (System Preferences/Security/General)
    If you still want to use your computer remote then you must pair your computers remote with the computer AND the Apple TV remote with the Apple TV.
    To pair a remote with a device hold down the menu and FF buttons together for six seconds or until you see a chain icon on screen (best take the computer into another room, or turn it off, when you do this)

  • How can I make a PDF file from each folders with layers, where each page is a each folder?

    How can I make a PDF file from each folders with layers, where each page is a each folder?

    I found an answer to my own question. A work around of sorts.
    Download Photoshop Elements 6 for Macintosh. With PSE6 I made a slide show with 550 images 1920x1200, without thumbs. I ran into one problem making the slide show. My images contained 4 images which had not ben created by Photoshop and could not be included in the slide show. Opening the images in Photoshop CS4 and re-saving them still did not make then acceptable. Not a big deal. I probably could have fixed the four images by stripping all EXIF data before opening them in Photoshop. BTW, PSE6 made the slide show in demo mode.
    I hope the bug in Photoshop CS4 will be fixed in Photoshop CS5.

  • How can I make the voice very loud when navigating with my google gps app?

    How can I make the navigation voice on my google gps app VERY loud?

    I did a search for the Citibank virtual credit card and other similar words and could find nothing.

  • MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar "behave"?

    MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar usable? The problem began after I updated to Maverick.

    babowa, it seems like it is using Fuse & NTFS, so I don't think it's the classic WD + 10.9 mess, but extra WD tools & drivers can still break things MtTran.
    MrTran, if you must use unsupported disk formats on your Mac you must also consider actually paying the developers that made the trial software.
    It's probably a good idea to follow the developers removal instructions, reboot & then install one tool at a time.
    MacFuse, FuseOSX, NTFS-3G are all likley to confict if you run older versions so you need to be sure you are using the latest version. I can't remeber which one depends on the other, so you will need to read the manuals.
    When the disk is readable copy the data to another disk. You could probably do this from a Linux distro or Windows if OS X won't do it.
    If you insist on only using the trial versions you will need to reinstall Mac OS, copy data off this disk & reformat it.
    Is there any good reason for not using the Mac HFS extended format?

  • How can i make changes from the user in TabBar with more button persistent?  I´m using the Storyboard.

    I have build an App with more than 5 Tabs, the user can change the order of the items, but this is not persitent.
    How can i fix this on iOS 7 and i´m using the Storyboard.

    Can I do it afterwards ?
    Yes. In addition to what Bee Jay said, here are some other tips.
    First record a pattern that's a few bars long, and don't tweak any knobs while you're doing this. Set a Cycle Range, because we want to play this pattern over and over again. Press A to make Automation visible (although there isn't any yet).
    Find the channel strip for this track, either in the Inspector or in the Mixer window. Just above the meter, look for the button that says "Off." Hold down this button and a menu will appear. Select "Touch." Press Play. As the pattern plays the first time, pick a knob in the ABL2 window, and mess with that knob. At the end of the pattern, let go of the knob, and then watch what the knob does as the pattern plays again. Then as the pattern plays some more, mess with another knob. You'll notice that curves are being drawn in the Arrange window as you mess with the knobs.
    This should help get you started.

  • How can I make a simple 1 channel I/O with RS232?

    Hy all,
    I just want make a simple 1/0 output over RS232. How can I programme it in LabView? Noemaly we send datas over RS232, but I want just a High or a Low on the TxD (or may on DSR or CTS).
    Thanks
    Petric

    You are lucky, here is a 6.0 version ... I hope it works
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    DTR control 2.vi ‏10 KB

  • How can I make my 4.2.1 ipod compatible with my system and itunes

    I have an older ipod that I like and use (4.2.1)   A newer version of itunes installed itself into my computer (11.1.4) and now when I plug in my ipod to sync and open itunes I get a pop up box stating that "The file itunes itl. can not be read because it was created by a newer version of itunes". Now I can not sync, add pictures or music to my ipod. How can I correct this situation so I can once again use itunes as my main library? I have tried everything...please help

    Try the following user tip:
    Empty/corrupt iTunes library after upgrade/crash

  • How can embed fonts into a PDF? Additionally, how can I make so that the PDF then opens with the embedded font?

    I need to embed a standard font (such as Times New Roman) and make it so that the document opens with this font presented. I see information on embedding fonts, but nothing related to the second part of my question. Thanks.

    The second part is automatic. If you manage to embed a font (for example with Preflight in Acrobat Pro), then a PDF viewer should use that. In some cases a locally installed font of the SAME NAME might take preference, which is only a difficulty if a private edited font is used.

  • How can I edit a website that someone else did with iWeb?

    A friend of mine she has a website that her ex-husband did with iWeb. Now she wants me to edit it. How can I do this in iWeb?

    The file needed is titled domain.sites and would be located in the Users/Home/Library/Application Support/iWeb folder on the ex-husband's computer.  If that file can be obtained you can edit and continue to manage the site. 
    Otherwise you'll have to start over from scratch. Chapter 2.3 on the iWeb FAQ.org site has tips on using some of the existing files, image, audio, video, etc., from the published site in the creation of the new site.
    OT

  • How can I make waveform graph and/or excel file with two different dynamic DBL values?

    As the question describes, I have two dbl sources from a load cell and linear actuator (from firgelli). I want to make a load/displacement curve from the force readings from the load cell and the displacement readings from the linear actuator. The load cell outputs an analog signal that can be acquired by a DAQ and the actuator comes in with a board and VI program to control the speed and measure the displacement of the actuator to a sample rate of my choosing. Is there a way that I can make a VI where it continues to collect data and construct the graph I'm looking for?
    Solved!
    Go to Solution.

    A couple points about your application:
    1.  Synchronization.  Since you're ultimate goal is a stress/strain curve, it is vital that your force and displacement data be synchronized appropriately.  If your sampling is beyond a few times a second, this is not really possible without some form of hardware synchronization via either a trigger and/or sample clock.  Two NI DAQ boards can be synchronized this way easily, but it seems you're using 3rd party hardware for one of these processes.  Would need to know more about that board to know what options you have.  You could specify what your resolution is in distance, and how fast the article will be moving, to get an idea of how fast to acquire, and how well you'll need to synchronize the data.  Another option, since it appears each data stream will be sampled on a hardware-timed sample clock, they will be offset in time, but not skewed during the acquisition.  You may be able to identify a feature in the data set common to each and use that to remove the timing offset after the process is completed.
    2.  Display.  To display data during the acquisition process, I usually recommend at least one display that plots vs. time.  Much easier to spot irregularities with the acquisition process that way.  However, if you'd like to also plot force vs. displacement, you can use an XY Graph to plot parametrically. For Example, in your case you would use the Displacement data as the X coordinates, and the Force data as the Y coordinates.
    3.  Saving data to file.  I would recommend using the Save to Spreadsheet File.vi (File IO pallette) to save your data.  If you use a comma as the delimiter, and save the file with a *.csv extension, you will have a file that is easily read into excel.  The standard tab-delimited spreadsheet file is also fine, it will just require an extra step to read it into excel to specify to excel what the delimiter is.
    4.  Batch vs. Real-Time Recording (Data File).  If your process is short (< 30 sec) you may be better off acquiring the data, Storing it locally to the VI (Array - usually maintained in a shift register), and then writing the file with a header (acquisition parameters, test article information, data column headers) and the data all at once in batch mode to the file after the process is finished.  If, however, it is longer than that you would be better off starting a data file with a header and appending the data to the file as you go, so that if something happens during your test, you at least have data up to that point.
    Hope this Helps,
    Kurt

Maybe you are looking for

  • Doubt in fbl1n transaction

    hi i have a doubt.... in fbl1n transaction, there are open items and cleared items. in it the cleared items  for certain document types such as invoice etc is not present in the open item table (bsik) however the cleared items for document types such

  • My mac keeps freezing and showing the color wheel how can that be fixed

    my mac is soooo slow.  It is very frustrating.  Has been noticeable worse since downloading Lion.  Any suggestions

  • SQL server query output script

    Hi, I have a script to give blocking on the sql server. But i want a script to fetch the output of my server blockings and send me a mail. Please give me some scripts to do this operation. Regards, Vinodh Selvaraj

  • Error 0xc0000005 when trying to start itunes

    Hi all, Whenever I try to start Itunes I get this error thrown at me saying an unknown software exeption 0xc0000005 has occured at an unknown location (0x00000000) See here: http://img231.imageshack.us/img231/4979/naamloosgb0.jpg Searching on the net

  • HT4736 can't make a copy of photo

    Recently (I think) unable to copy a photo in photos file.