Set the style to null does not reset the attributes of police - Bug or feature?

I call setStyle ("police - fx - weight:" BOLD "") with a label - the label text is in bold.
Then I call setStyle (null) with the same label - now awaits the etiquette police returned to the definition of the CSS.

But: the label does not indicate a normal font now - it's always "BOLD".
I have to explicitly call setStyle ("police - fx - weight: normal") in order to bring it back to the normal font.

Is this a bug or a feature?
If it is a bug, so I'll post a message-Jira, but I'm still not 100% sure...

My FX version is 2.2.

Thanks + regards!
Björn



Code examples:
package ztest;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.SceneBuilder;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class Test_62_FontStyle 
    extends Application
{
    public static void main(String[] args)
    {
        launch(args);
    }

    boolean m_bold = false;
    VBox m_vb = new VBox();
    Label m_la = new Label("Some text to be styled.");
    Button m_bu = new Button("Change");
    
    @Override
    public void start(Stage primaryStage)
    {
        final Scene scene = SceneBuilder.create()
             .root
             (
                  m_vb
             )
             .build();
        
        m_vb.getChildren().add(m_la);
        m_vb.getChildren().add(m_bu);
        
        m_bu.addEventHandler(ActionEvent.ACTION,new EventHandler<ActionEvent>()
        {
            @Override
            public void handle(ActionEvent paramT)
            {
                m_bold = !m_bold;
                if (m_bold == true)
                    m_la.setStyle("-fx-font-weight: bold");
                else
                    m_la.setStyle(null); // does not reset font!
//                    m_la.setStyle("-fx-font-weight: normal"); // this works fine...
            }
        });
        
        primaryStage.setScene(scene);
        primaryStage.show();
    }
    
}

This is a known bug: setStyle (null) and setStyle("") does not cancel a previous call setStyle()

https://JavaFX-JIRA.Kenai.com/browse/RT-25002

Tags: Java

Similar Questions

  • get a dotted line around .swf files in my flash site now. This is new from Firefox 3. With the help of 4 on a MacBookPro. tried the fix "style no outline. does not work. any help?

    Question
    get a dotted line around .swf files in my flash site now. This is new from Firefox 3. With the help of 4 on a MacBookPro. tried the fix "style no outline. does not work. any help?

    Ah, quite understand now that I added to my doc html

    < style type = "text/css" >
    {body
    background-color: #FFF;
    }
    "'object {outline: none ;}"} '

    < / style >

  • I just upgraded to 10 Windows and now I can't get into Photoshop Elements.  I get the error 150:30.  Set to zero, as suggests, does not, of course.

    I just upgraded to 10 Windows and now I can't get into Photoshop Elements.  I get the error 150:30.  Set to zero, as suggests, does not, of course.

    Thanks - I thought that this could be the best answer!  I just hope that, in general, PSE 8 works with W-10!

  • How to hide a field based on the value of a field of a different subform - controls null does not work!

    I use Javascript to define actions. I need to hide a text field, if the value of a field in another subsidiary form is zero.

    -J' tried to check the value in the other field NULL - does not work

    -J' tried affecting a variable str2 where I know that the value in the other field is available, then checking this variable when I initialize the text field - does not work

    What Miss me?

    Hello.

    Try this in the form of native void, referring to the text field (X).

    If (this.rawValue = 1)

    {

    X.Presence = "visible";

    }

    ElseIf (this.rawValue = null)

    {

    X.Presence = 'hidden ';

    }

  • Percentage of system restore does not reset to zero

    I just built a PC W-7 with a SSD system drive and a hard drive for data.  At the end I was tired and selected the wrong drive (the hard drive) in 'System Protection '.  When I noticed my error, I set the SSD system ("restore system settings AND previous versions of files") then returned to the hard drive and set it to OFF ("turn off system protection").  However, I was surprised to discover that the cursor would not be travelling to 0% and stopped at 1%.  Is it possible to force it to 0%?

    Hello

    I tried to repro the issue and found that on each machine, once a system drive has been defined for the restoration of the system, the percentage of system restore minimum (use of the disc) does not reset to zero, even after the removal of all old restore points.

    The reason that I found is that once a system restore is enabled on a system drive, the system volume information folder create some system files that are hidden, which takes a little bit of space in the record, leading to 1% of the disk space.  These files can only be changed or deleted after formatting the disk or change the partition of the system drive to a normal drive.

    My research tells me that there is no way in which we could reset the slide to zero percent, minimum 1%.

  • Stop button does not reset LabView?

    Hello

    I did this VI (attached to this message), but whenever I have to use "continuous run", it seems that this gives the wrong result in the façade. However, it gives correct results when I add a random check on the block diagram and delete it immediately (technically speaking, nothing has changed at the blockdiagram) and after that, press 'run continuously.

    If the button "Cancel execution", which I use to stop the system does not reset my system? How to reset the system until I use it?

    In addition, below I watch 4 similar parts, if I use 25 of these parts in the same file, does it take much calculation effort or is it no big deal for LabView (on a basic computer?)

    Thanks in advance!

    Just do a simple state machine

  • One of my style of &lt; hr &gt; does not work in firefox?

    One of my style of < hr > does not work in firefox? However, it works in safari and chrome, so that I have a different style of < hr > who does not work on firefox.

    < hr style = "color: # 2793-3;" background: #898888; Width: 100%; height: 1px; ">

    HR {height: 1px; border: none; color: # 2793 3; background-color: #000;}

    }

    (the above rule doesn't work, but this one is not any ideas why?)

    < hr style = "color: # 2793-3;" background: #898888; Width: 100%; height: 1px; ">

    Thank you!

    Try

    HR {border: Blue thin insert ;}}

  • How the plant does not reset the option works? -iPad

    THEN I did a factory reset (delete all content and settings) and I was wondering, iCloud records on the device or it does not. How to factory reset thing work anyway?

    The ' erase all content and settings ' will remove your content from the iPad (all the apps you have downloaded, music, movies, photos, etc.) and put all settings to their default values.

    But if you have settings > iCloud > find my iPad set 'on' on the iPad, then he will not that iCloud account, you will need to enter this account and password to reactivate the iPad (find my iPhone Activation Lock - Apple Support)

  • NULL does not move with the tracking data

    I created a track in Mocha AE and copied to the Clipboard.
    Then, I created a Null value in AE and pasted the follow-up data on it.

    However, Null value does not move.
    Any ideas?

    PS I have watch it during the follow-up process, and grooving of X, I created did move/track.

    you have a composition of 54 Minutes here. you are going to restore all 54 minutes with the 54 minutes of elements trained using data from mocha in sequels? I guess that the answer is no. first thing you have to do is on the duration of the shot you want to make your composition. so only you take to mocha and follow your footage.

    so in your example, I guess you should take about 30 seconds, or maybe more? Set the workspace accordingly:

    then cut the timespan to duration:

    then you should have this:

    Ahhh MUCH better. only the length you need. now use the rail in Mocha Ae option. in case of mocha, you will again see the duration of your huge video file:

    to keep things organized you can zoom timeline in the / points so that you can see just the graven images and will not get confused by 53.5 minutes of video you don't need. Press here:

    now, you will see this - just your images carved

    track data, export and when you paste data - make sure that you are on the first image.

    Good luck!

  • The view of password reset does not reset my password

    FireFox stopped accepting my master password. I tried the reset my password to view, but it will not reset my password.

    If using the chrome url (chrome://pippki/content/resetpassword.xul) doesn't work, remove the key3db and signons.sqlite files in the Firefox profile folder.

    You lose all passwords if you use chrome URI or remove signons.sqlite and key3db to reset the master password.

    You set a new master password.

  • My macbook pro retina boots to black screen. It does not reset the PRAM.

    My MacBook Pro (15 "Early 2013) retina will have a black screen randomly. It won't restart and reset PRAM does not alter. To do this, the startup sound, but that's all. In addition, hang on to an external monitor does not display. Is there something else to try? It's a new OS (El Capitan).

    Some things to consider: the battery can be 10%, 50%, 100% is not bad, the computer starts after being off for a long time (2-3 hours).

    you have GPU failure

  • W530 does not reset the widows 8

    Okies, I've never had a problem until recently. Windows 8 came with this machine, and I've had problems of performance for a month now. I just soldered on until yesterday when I continued to get different blue screens and need to reboot... now it won't restart, and so I did the press ENTER to reach the area of the HDD... selected the option of quick reset troubleshooting, has no, so I went back and selected the full reset and it gets to about 65% and stops wrote there is a mistake and requiring a reboot... it happened two time... now when it restarts, it tries to do a reset again... without asking him.

    Can someone give me a help here? Is this normal? Normally I physically break a computer and never get to the point where it is necessary to reset... so I'm really at a loss here.

    It of a W530 and has 16 GB of RAM. Everything I run/ran on it photoshop and Lightroom, Firefox, Audacity, Roxio, Avast Protection against virus, online backup service and a program called Star stacker.

    What happened on my computer if I remember correctly, it is that backup files to win 8 were never installed in the correct area. So when he's going to do a wipe and reinstall... he wiped... but not a reinstall. The fix was to return and have installed a new hard drive.

    ALSO if you have fingerprint reader and especially the color calibration tool installed. Make a note on the repair to confirm that those who work corectly before sending it back. If it is under warranty, they will replace all that appears worn or damaged. When the mine back, cover the keyboard has been replaced due to minor damage.

    The calibrator replacement that came on the new cover of keyboard needs information from the screen, which has not been properly attributed in the repair center, so my Stallion does not work either. In the end, after two trips to the repair center, I got a new screen, hard drive, keyboard, reader of fingerprints and monitor color... and thirteen new gray hairs. :-D

  • Add the waveform does not reset

    Here is the explanation of high level.  I want that samples of 100 Hz, groups of 10.  I like to check to the discontinuities and then take the last data point in each group of ten.  Then take this last datapoint so I 1sample/s if all goes well.  Add to the top of my 1 s/s at a "rate of scanning in seconds" (generally 15 sec) and if there is no anomaly data, take the last data point and write it to the file. If there is an anomaly, I want the typical scans over an additional column of the event recorded in the 100 s/s complete.

    Specifically, I use the subset of waveform get successfully, I think, but when I Append Waveform, the timestamp is stripped. I was about to try to get XY waveform, but I thought this announcement on the forums might make me come more quickly than the obstinate by it.  So how can I easily draw the last data point in these subgroups with success?

    I'll take other ideas, too.  I seem to get popped up on little things like that.  Also, you'll forgive the mess. It's a work in progress.  Thermal cycling rig 02/08/13 v2.vi is the code base and TDMStoExcel and RunMacro live can be deleted if you try to run it. they work

    Thanks in advance

    the loop is just to remove the ten sets of ten, resulting in a bit rate a second base.  This way I can run a 'scan in seconds rate' for the while loop with the ability to capture events at 100 Hz.  I solved the problem of the table do not reset using the auto index function.  I had Dale this initially because, when I develop the process of data for all channels, I didn't know how it would affect waveform bays.  I didn't manipulate 3d tables if I could help him.  not my forte.  Then, I'll try the subarray of waveform get nine full channels and see if it works. After that, the receipt of the data.  I need to write to the file for nine channels and hopefully not wait to write until the dump event data.  I want to tick away at the speed of scanning and then create an additional column only if there is an event.  I'm trying to capture functions to void / screws.   the first Subvi process data will do much limits responsible Boolean logic check of the control of movement.

    The example you gave is a great idea for the logic, I would like to implement.  Thanks for the suggestion!

    Tom

  • color of the table does not reset

    My table (TABLE of SUM AVG) is supposed to show entries below zero in red. He has a little problem. The first time that it works, but the second time that the color of the text will not return to black when I run again.

    He remembers the entries that were red on front. Based on my wiring below, the second time I run it, it must set the background color to the light yellow and black text, then make loops for.

    BTW, I also used a sequence flat to force this order, but that did not help.

    Hi murchak,

    What can be seen in your picture you

    -only value a "yellow light" cell background: ActiveCell = (2, 2)

    -and then you assign the first 3 lines "light green" background

    -then you set some cells, according to their value to red. (Btw. There is a special ' ")<0" function="" in="" the="" comparison="">

    There is no place where set you a black background for all cells.

    Maybe you should try ActiveCell (-2; -2) instead?

  • Set up freshly - WIFI system does not

    Hey there,

    After some virus problems, I set my system, formatting the hard drive and reinstall Windows. I also downloaded the update of the Lenovo system, all installed updates and downloaded the center of Solution ThinkVantage. Now the PC is working again BUT the WiFi adapter does not work. It seems to be non-existent, if I press F9 it says I'm supposed to press the switch of hardware. I have a ThinkPad Edge 15, there no such a change at all.

    In the hardware Manager I find a network driver device, so I guess that's it. However, no driver seems to work. I downloaded the dirver (s) of WiFi on the Lenovo site and install, nothing happens. What can I do?

    Here is my card:

    -Thinkpad Edge 15

    -Windows 7 Home Premium (OEM)

    -the driver I installed that did not work: Intel Wireless LAN (bg, abg, abgn) for Windows 7 (32 bit, 64 bit), XP - ThinkPad

    Thank you in advance for help you! I am fairly certain that the works of material, before I set uo the WiFi system was not at all a problem.

    Best wishes

    Tobias


Maybe you are looking for

  • NB200 - 12N Windows XP installation

    Hello The 12N model supplied with Windows 7 and I want to install Windows XP for various reasons. When I boot from the CD and go through the steps of installing, I get the error below. Note that I can't install Windos 7 no hardware with the same prob

  • FireWire 400, FireWire 800 and Thunderbolt

    My digi 002 rack is an audio interface he has a female FireWire 400 (6-pin) connection on the back, the card I just bought is female (9pin) FireWire 800 to love at first sight. A cable FireWire which has 6-pin male to male 9 pin, will that link the t

  • Shortcut of control ring

    Hi all Is it possible to assign shortcut keysfor each of the elements in a control of the ring?  Control of the ring that IThere are currently 40 positions.  My intention is to have it as follows: [1] Item1 [2] Item2 [3] Item3, etc... So, once the co

  • Err0r: 0xc0000005

    Name of the failing application: L2.exe, version: 0.0.0.0, time stamp: 0x4c736b12Name of the failed module: TfWah.dll, version: 4.10.12.31, time stamp: 0x4d1d06fdException code: 0xc0000005Offset: 0x0002b4faID of the process failed: 0 x 1074Start time

  • Flash Player not working not not on a 64-bit internet explore

    I can't see the web vedios flashplyer is not downloading in windows 7, 64-bit vertion