Klasse DragCanvas<R extends Row<?,?,?>>

java.lang.Object
javafx.scene.Node
javafx.scene.canvas.Canvas
impl.com.flexganttfx.skin.graphics.DragCanvas<R>
Alle implementierten Schnittstellen:
Styleable, EventTarget

public class DragCanvas<R extends Row<?,?,?>> extends Canvas
Canvas used to render drag visuals for activities. It can paint the dragged activity together with the current selection to produce the drag image shown during drag and drop.
  • Konstruktordetails

    • DragCanvas

      public DragCanvas(GraphicsBase<R> graphics)
      Constructs a new drag canvas for the given graphics control.
      Parameter:
      graphics - the graphics control
  • Methodendetails

    • isResizable

      public boolean isResizable()
      Returns whether this canvas is resizable.
      Setzt außer Kraft:
      isResizable in Klasse Node
      Gibt zurück:
      true if this canvas is resizable
    • prefWidth

      public double prefWidth(double height)
      Returns the preferred width for the given height.
      Setzt außer Kraft:
      prefWidth in Klasse Node
      Parameter:
      height - the height
      Gibt zurück:
      the preferred width
    • prefHeight

      public double prefHeight(double width)
      Returns the preferred height for the given width.
      Setzt außer Kraft:
      prefHeight in Klasse Node
      Parameter:
      width - the width
      Gibt zurück:
      the preferred height
    • draw

      public void draw(GraphicsBase.DragAndDropInfo info)
      Draws the current drag operation based on the information found inside the info parameter. Applications can override this method and add additional functionality if needed. For this the application can use the bounds found in the "rendered bounds" list.
      Parameter:
      info - the drag information
    • getRenderedBounds

      protected final List<ActivityBounds> getRenderedBounds()
      Returns the rendered bounds.
      Gibt zurück:
      the rendered bounds
    • setIncludeSelectedActivitiesInDrag

      public final void setIncludeSelectedActivitiesInDrag(boolean include)
      Sets whether selected activities should be included in the drag operation.
      Parameter:
      include - whether selected activities should be included in the drag operation
    • isIncludeSelectedActivitiesInDrag

      public final boolean isIncludeSelectedActivitiesInDrag()
      Returns whether selected activities are included in the drag operation.
      Gibt zurück:
      true if selected activities are included in the drag operation