A two-way binding does not work

Hello!
Maybe I did something wrong, but the link two-way thic simple code does not work correctly.
package simple;

import javafx.application.Application;
import javafx.scene.GroupBuilder;
import javafx.scene.Scene;
import javafx.scene.SceneBuilder;
import javafx.scene.control.CheckBox;
import javafx.scene.control.CheckBoxBuilder;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

public class BiDiBug extends Application {
  
  CheckBox checkBoxResizable;
 
  public static void main(String[] args) {
    Application.launch(args);
  }
  
  @Override
  public void start(Stage stage) {
  
     stage.setResizable(true);
       
    Scene scene  = SceneBuilder.create()
      .width(200)
      .height(100)
      .fill(Color.TRANSPARENT)
      .root(
        GroupBuilder.create()
             .children(
                checkBoxResizable = CheckBoxBuilder.create()
                  .selected(stage.isResizable())
                  .text("Is Stage resizable")
                  .build()
                
              )
              .build()
          )
       .build();
    
    checkBoxResizable.selectedProperty()
            .bindBidirectional(stage.resizableProperty());
    
    // This code not works too:
    
    //stage.resizableProperty()
    //          .bindBidirectional(checkBoxResizable.selectedProperty());
    
    stage.setScene(scene);
    stage.show();
  }
}
Is it bug or feature?

I do not understand your two-way binding.
You can control the resizing scene using the checkbox.
How are you trying to change the box through the resize property?
You can attach a listener to the box to resize the stage.

import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Group;
import javafx.scene.GroupBuilder;
import javafx.scene.Scene;
import javafx.scene.SceneBuilder;
import javafx.scene.control.CheckBox;
import javafx.scene.control.CheckBoxBuilder;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

public class BiDiBug extends Application {

    CheckBox checkBoxResizable;

    public static void main(String[] args) {
        Application.launch(args);
    }

    @Override
    public void start(final Stage stage) {

        //stage.setResizable(true);

        Group root = new Group();

        Scene scene = SceneBuilder.create()
                .width(200)
                .height(100)
                .fill(Color.TRANSPARENT)
                .root(
                GroupBuilder.create()
                .children(
                checkBoxResizable = CheckBoxBuilder.create()
                .selected(stage.isResizable())
                .text("Is Stage resizable")
                .build())
                .build())
                .build();

        checkBoxResizable.selectedProperty().addListener(new ChangeListener() {
            public void changed(ObservableValue observable, Boolean oldValue, Boolean newValue) {

                stage.setResizable(checkBoxResizable.selectedProperty().get());

            }
        });

        stage.setScene(scene);
        stage.show();

    }
}

Tags: Java

Similar Questions

  • Synaptics touchpad two fingers scrolling does not work in the player to develop modern UI application Windows 8.1

    I have a HP Envy TouchSmart UltraBook 4-1161er. Two fingers to scroll worked well in all modern user interface applications that come with the pre-installed operating system Windows 8.1, but the situation changed after the upgrade to Windows 8.1. Now this excellent and very useful two fingers scrolling does not work in the updated reader application. How to make it work?

    If the problem is in the drivers, maybe, install the drivers the latest may correct this?

    I tried to find the latest drivers for the touchpad Synptics in my ultrabook on the HP website, but it's the same old v16.5.3.3, I already have (published in may 2013). Synatics official site contains a link to the latest touchpad driver pack v17.0.19. Can I install it?

    I would try to install the Windows 8.1 (64-bit) driver Synaptics touchpad available in the download section of your sleekbook web support before using compatibility mode.  If the current driver does not work for you, try the earlier versions available .

    If you have no positive results, then use the compatibility mode (select Windows 8) on all three Windows 8.1 synaptics touchpad drivers, starting with the most recent.

    To use compatibility mode to install the driver just softpaq to the right, click on the file and choose troubleshoot compatibility. Select Windows 8 and run the installer.

    The following video has a decent explanation, but the Narrator does not get to the point for a bit. Go directly to the minute 4 and watch it from there.

  • Two finger scroll does not work on the new MacBook

    Did I miss something? Hold scroll a window or a list using trackpad and not the scroll bar lift - but it does not work as advertised.

    The this MacBook, literally 'new', i.e. bought Apple in the last week or two? You have installed third-party extensions that could affect the mouse/trackpad settings?

    C.

  • Two fingers scrolling does not work on my Mac in Firefox, but works in Safari. I think switch to Safari as my main browser. This can be corrected?

    I reloaded Firefox as suggested. I clicked "Always" in System Preferences of scrolling. But none of these work. If Firefox does not resolve the problem of scrolling for Mac OS X, I have to use Safari as my main browser, because scrolling works there. I have used Firefox for almost 10 years, but this problem is very frustrating.

    A duplicate was question here: http://mzl.la/1hlpGi0

    It seems like turning off "Smooth Scrolling" works.

  • Firefox 8 on Windows 7 (64) Synaptics touchpad gesture with two fingers scrolling does not work. Works in any other program.

    UI.trackpoint_hack. Enabled = 1 does not help. All the Plugins and drivers (Synaptics) up to date. Samsung 900x3a. Slider modifies the icon when running two finger gesture but not scroll. No PDF not loaded. No other open tab. When you load in the tab PDF PDF scrolls with the gesture. Same problem in Thunderbird 8. Reason to use Chrome as standard browser.

    I solved this problem with this registry setting:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Synaptics\SynTPEnh]
    "UseScrollCursor" = DWORD: 00000000

    You could do it faster with by downloading and running this file: ScollingFix.reg (watch out, click on the link just! there are ads)

    IT disables the small view icon on the cursor. Bad driver from Synaptics...

  • Satellite C50 - B - 14 d - two finger scroll does not work

    I've had my laptop for about 6 months now and I am generally happy with it. However, the two fingers scrolling has stopped working (it was working fine when I got it and for some time after). I know that it is not essential, but it made such a difference to the work that I end up having to do, implying often copy and pasting etc, and really miss me!

    I've read many threads saying that you should go in Control Panel, click the mouse and go to device settings. However when I get to this point, my box of mouse says just "buttons; pointers; pointer options; material"and there is no sign 'Device settings' along the top. What can I do? I also can't find the synaptics driver anywhere to uninstall, as others have suggested.

    Can you please put name of full model of your laptop to check the Toshiba download page and try to find the right touchpad driver.

  • Two fingers scrolling does not work in one account the mouse?

    Hello

    After the installation of Windows 8 on my laptop official, I found that even though I have the driver Synaptics installed and applied on all three accounts, two fingers scrolling works perfectly every time that I am connected as administrator on the domain of the official of the company or with my Personal Hotmail account but not when I am logged on as normal on the same domain user.

    Advice in this regard for the necessary adjustments will be required.

    Thanks in advance.

    Hi Faraz,

    The question you posted would be better suited in the TechNet Forums; We recommend that you post your question in the TechNet Forums to get help:

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w8itpro

  • T440s error message from two fingers Scroll - does not work - Synaptics

    Hello! T440s, Windows 7 Professional. Never had a problem, then suddenly two-fingers Betacam touchpad scroll no longer works. When you go to control panel, mouse, I get (when you click on the mouse) the error message "unable to connect to the Synaptics Pointing device driver. If I then click OK in the error message windows menu mouse opens but not sure what to do.

    Thank you for your help "!"

    OK found myself: Reinstall "Synaptics ThinkPad UltraNav Driver for Windows 8.1 (32 - bit, 64-bit), 8 (32 bit, 64 bit), 7 (32-bit, 64-bit) - ThinkPad" from http://support.lenovo.com/ch/en/downloads/ds034647

  • Magic Trackpad 2 two fingers scrolling does not work

    Two fingers scrolling is enabled in preferences and works using the built in trackpad and on my old Magic Trackpad (1).

    This is the forum 10.9. The Magic Trackpad 2 requires 10.11. See the system requirements in the link below.

    The Magic Trackpad 2 - Technical Specifications

  • Vostro 5470 - two finger tap does not work

    My new Vostro 5470 with ELAN touchpad driver installed (later), everything works except the «tap with two fingers to show the right click menu»

    Activate the option "both tap of finger to show right click menu", but nothing happened when I made two fingers tap...

    Could someone give me a clue. Thank you all

    1. run - Regedit,

    2 HKEY_CURRENT_USER/Software/Elantech/SmartPad

    3. the change of Tap_Two_Finger = 1 Hexagon

    Restart the window and enjoy!

  • variable binding does not work

    Hello

    The problem is when I run a simple query to a table:

    Select count (*)
    from my_table
    where column1 = 'S1 ';

    Result: 600.

    However, if I use the variable to link as: p1_test instead of "S1", then "S1" of entry to: p1_test, the result is 0. Column1 data type is char (6).

    Has anyone had similar problem and fixed before?

    Thank you!

    Hello:

    You should type Column1 "varchar2".

    You can do the following to resolve your query

    Select count (*)
    from my_table
    where column1 = cast (: p1_test as char (6));

    CITY

  • When my page is reduced to half of my screen, horizontal scrolling does not work.

    He worked previously, but he just stopped. If I'm on a Web page and trying to scroll sideways with two fingers, it does not work. Vertical scrolling works very well.

    I'm on a Dell Inspiron running Windows 7.

    Start Firefox in Mode safe to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    To turn on safe mode

    • You can open Firefox 4.0 + in Safe Mode holding the key SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • Or open the Help menu and click on the restart with the disabled... modules menu item while Firefox is running.
    • Once you get the pop-up, simply select "" boot mode safe. "

    If it works in Mode safe mode and normal mode with all extensions (Tools > Modules > Extensions) off and then try to find which extension is the cause by allowing an extension at a time until the problem reappears.

    Close and restart Firefox after each change via "Firefox > Exit ' (Windows: Firefox/file > quit;) Mac: ' Firefox > quit Firefox. " Linux: "Firefox/file > exit ')

  • Wireless does not work on Qosmio f60-159

    I have a problem on a Qosmio f60-159.

    In "improving the performance of the computer", a message saying that some services that * ing the computer appeared and asked me if I wanted to turn this service off.
    I said yes and after that the wireless feature no longer works.

    The indicator in the front panel wireless is always on, no matter if I press this led or not.
    In addition, toggling the fn + f8 key does nothing.
    The diagnosis told me to turn on the radio, but if there is no switch in addition to these two, this solution does not work.

    I have cleaned the registry, reinstalled the wireless driver and when I try the same thing with bluetooth it says for the driver installation procedure I should turn on the wireless.

    What can I do?

    Hello

    It appears that you have disabled a service that controls the FN key or Wlan functionality. I think that the WiFi network is disabled and therefore it of not possible to establish the connection

    I think you should check this:
    Select all programs-> Toshiba-> Flash memory card Support utility, and then restart Flash cards.

    Flash cards control the FN keys and so I think that might help.

    Also I recommend that you check the Services tab, which is located in the Manager (CTRL + ALT + DELE) tasks

    Recommend to check and allowing (if disabled) the following process:
    Wlansvc (Wlan auto configuration)

    Good luck

  • HP 2549: HP 2549 and Mac OS x: double-sided printing does not work

    Hello!

    I just installed this printer on my Macbook Air and I cannot print double-sided. I tried by USB / wireless (in the case where there is a difference between the two) but no luck.

    I followed the advice in this post: http://h30434.www3.hp.com/t5/Printer-All-in-One-Install-Setup/two-sided-printing-no-longer-availble-...

    but I did not tab "driver". I only have "Général", "Levels of power" and "utility." I tried to delete the printer and then add it with HP 2359 and AirPrint not but that does not change.

    When I print a pdf document, double-sided printed is greyed out and I cannot change.

    What should I do? I already reinstalled the drivers on the HP Web site, I selected all the things that I can install it, but that has not changed anything.

    Thank you.

    Hi @blablaalf,

    Welcome to the HP Forums!

    I see that two-sided printing does not work with your printer HP 2549 on Mac OS X 10.10. I'm happy to help with this problem!

    I assume that your printer is a HP Deskjet 2549, otherwise please reply with the exact type of printer you have. To find product/model number of your printer follow the instructions in this link. Find your model number of the HP product.

    Otherwise, if the type of printer you have. According to this guide, print on both sides of the paper (duplex printing). He said: this printer is not an automatic duplex unit integrated, you can always print on both sides of the page to manually reload paper in the paper after printing tray first to print on both sides of the paper.

    This is the reason why this option is grayed out.

    If you print on letterhead, pre-printed paper or paper with watermarks and pre-drilled holes, the printer prints first the front of the document. Load the paper with the top edge first and the side to be printed facing downwards.
  • 14:Two yoga made 3 finger tap a click right does not work, no way to disable the Tracker for palm

    I have recently buy Lenovo Yoga 3 14 inches and have found that I cannot disable followed two palm or use two fingers click right tap function.

    I went in the mouse settings but still no help, it is said that tap two fingers is enabled but does not work, all other touchpad gestures work perfectly. I currently have the driver version: ELAN Touchpad 11.4.54.1_x64

    If it's any help, the virtual mouse device of Lenovo also has the version of the driver 14.20.52.752

    I already checked the MOMENTUM without result and also parameters of lenovo found in Program Files/Elantech. They both contain palm Tracker settings, but they are put at least still do not clear up my problem.

    If I can't fix the two finger tap or palm Tracker option that I plan to take my back just Lenovo for the hassle it caused.

    I did my research but still no results found. Help, please!

    That help me:

    I have the solution:

    Run regedit

    HKEY_curreent_user/elantech smartpad /software/.
    Tap_two_fingers value 1
    Tap_two_fingers_enable value 1

    Reboot and then you can use 2 fingers to the right click

Maybe you are looking for