Class SimpleRenderContext

java.lang.Object
org.jhotdraw8.draw.render.SimpleRenderContext
All Implemented Interfaces:
RenderContext, WritableRenderContext, ReadOnlyPropertyBean

public class SimpleRenderContext extends Object implements WritableRenderContext
  • Constructor Details

    • SimpleRenderContext

      public SimpleRenderContext()
  • Method Details

    • getNode

      public javafx.scene.Node getNode(Figure figure)
      Description copied from interface: RenderContext
      Gets the JavaFX node which is used to render the specified figure by this RenderContext.
      Specified by:
      getNode in interface RenderContext
      Parameters:
      figure - The figure
      Returns:
      The JavaFX node associated to the figure
    • getProperties

      public javafx.collections.ObservableMap<Key<?>,Object> getProperties()
    • set

      public <T> void set(MapAccessor<T> key, @Nullable T value)
      Specified by:
      set in interface WritableRenderContext
    • get

      public <T> @Nullable T get(MapAccessor<T> key)
      Gets a property value.
      Specified by:
      get in interface ReadOnlyPropertyBean
      Type Parameters:
      T - the value type
      Parameters:
      key - the key
      Returns:
      the value
    • getNonNull

      public <T> T getNonNull(NonNullMapAccessor<T> key)
      Gets a nonnull property value.
      Specified by:
      getNonNull in interface ReadOnlyPropertyBean
      Type Parameters:
      T - the value type
      Parameters:
      key - the key
      Returns:
      the value