title: JavaFX ListView Cell Layout X Slide
body: <p>I want a <code>ListView</code> item to slide out when the user slides across it. I have the following code to set the layout x property:</p>
  
  <pre><code>list.setOnMousePressed(e -&gt; {
      startX = e.getX();
  });
  
  list.setOnMouseDragged(e -&gt; {
      list.getSelectionModel().getSelectedItem().setLayoutX(startX - e.getX());
  });
  </code></pre>
  
  <p>The cell stays in position. How do I get the cell to slide out of the <code>ListView</code>?</p>