Package javafx.beans

Examples of javafx.beans.InvalidationListener


        //
        ScrollPane scrollPane = new ScrollPane();
        scrollPane.setContent(messagePane);
        getItems().addAll(scrollPane, packetTreeView);
        //
        packetTreeView.getSelectionModel().selectedItemProperty().addListener(new InvalidationListener() {

            @Override
            public void invalidated(Observable arg0) {
                PacketTreeItem node = (PacketTreeItem) packetTreeView.getSelectionModel().getSelectedItem();
                if (node == null) {
View Full Code Here


        hexPane.setPrefWidth(500);
        hexPane.setMinHeight(200);
        //
        getItems().addAll(hexPane, packetTreeView);
        //
        packetTreeView.getSelectionModel().selectedItemProperty().addListener(new InvalidationListener() {

            @Override
            public void invalidated(Observable arg0) {
                PacketTreeItem node = (PacketTreeItem) packetTreeView.getSelectionModel().getSelectedItem();
                if (node == null) {
View Full Code Here

            }
        });
        ToolBar toolBar = new ToolBar(openFile, prePacket);
        packetDisplay = new PacketDisplay();
        packetsTableView = new PacketTableView();
        packetsTableView.getSelectionModel().selectedItemProperty().addListener(new InvalidationListener() {

            @Override
            public void invalidated(Observable arg0) {
                Packet packet = packetsTableView.getSelectionModel().getSelectedItem();
                packetDisplay.updateData(packet);
View Full Code Here

        super(control);

        // Whenever the value changes on the control, we need to update the text
        // in the TextField. The only time this is not the case is when the update
        // to the control happened as a result of an update in the text textField.
        control.valueProperty().addListener(integerFieldValueListener = new InvalidationListener() {
            @Override public void invalidated(Observable observable) {
                updateText();
            }
        });
    }
View Full Code Here

        super(control);

        // Whenever the value changes on the control, we need to update the text
        // in the TextField. The only time this is not the case is when the update
        // to the control happened as a result of an update in the text textField.
        control.valueProperty().addListener(integerFieldValueListener = new InvalidationListener() {
            @Override public void invalidated(Observable observable) {
                updateText();
            }
        });
    }
View Full Code Here

        super(control);

        // Whenever the value changes on the control, we need to update the text
        // in the TextField. The only time this is not the case is when the update
        // to the control happened as a result of an update in the text textField.
        control.valueProperty().addListener(doubleFieldValueListener = new InvalidationListener() {
            @Override public void invalidated(Observable observable) {
                updateText();
            }
        });
    }
View Full Code Here

            }
        };

        textField.setId("input-text-field");
        textField.getStyleClass().setAll(control.getStyleClass());
        control.getStyleClass().addListener(InputFieldStyleClassListener = new InvalidationListener() {
            @Override public void invalidated(Observable observable) {
                textField.getStyleClass().setAll(control.getStyleClass());
            }
        });

//        // Align the text to the right
//        textField.setAlignment(Pos.BASELINE_RIGHT);
        textField.promptTextProperty().bind(control.promptTextProperty());
        textField.editableProperty().bind(control.editableProperty());
        textField.prefColumnCountProperty().bind(control.prefColumnCountProperty());

        // Whenever the text of the textField changes, we may need to
        // update the value.
        textField.textProperty().addListener(new InvalidationListener() {
            @Override public void invalidated(Observable observable) {
                updateValue();
            }
        });

        // Right now there is some funny business regarding focus in JavaFX. So
        // we will just make sure the TextField gets focus whenever somebody tries
        // to give it to the InputField. This isn't right, but we need to fix
        // this in JavaFX, I don't think I can hack around it
        textField.setFocusTraversable(false);
        control.focusedProperty().addListener(InputFieldFocusListener = new InvalidationListener() {
            @Override public void invalidated(Observable observable) {
                textField.handleFocus(control.isFocused());
            }
        });
View Full Code Here

   */
  private void createNodes()
  {
    // the main textField
    textField = new TextField();
    textField.focusedProperty().addListener(new InvalidationListener()
    {     
      @Override
      public void invalidated(Observable arg0)
      {
        if (textField.isFocused() == false)
View Full Code Here

        textField = new TextField();
        textField.getStyleClass().add("value");
        textField.getStyleClass().add("editable");
       
        // process text entry
        textField.focusedProperty().addListener(new InvalidationListener()
        {     
          @Override
          public void invalidated(Observable arg0)
          {
            if (textField.isFocused() == false)
View Full Code Here

  public ListView<T> withSelectedItem(T value) { setSelectedItem(value); return this; }
  // construct
  private void constructSelectedItem()
  {
    // when the selectedItem in the selectionModel changes, update our selectedItem
    getSelectionModel().selectedItemProperty().addListener(new InvalidationListener()
    {     
      @Override
      public void invalidated(Observable arg0)
      {
        if (getSelectionModel().selectedItemProperty().get() != selectedItemObjectProperty.get())
        {
          selectedItemObjectProperty.set( getSelectionModel().selectedItemProperty().get() );
        }
      }
    });
    // and vice versa
    selectedItemObjectProperty.addListener(new InvalidationListener()
    {     
      @Override
      public void invalidated(Observable arg0)
      {
        if (getSelectionModel().selectedItemProperty().get() != selectedItemObjectProperty.get())
View Full Code Here

TOP

Related Classes of javafx.beans.InvalidationListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.