Class EventDSL

  • All Implemented Interfaces:

    
    public final class EventDSL<S extends Drawable>
    
                        

    DSL for events.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      EventDSL(S self)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final <E extends Event> Unit to(E $self, Function2<S, E, Boolean> handler) specify a handler for this event.
      final <E extends Event> Unit To(E $self, Function2<S, E, Unit> handler) specify a handler for this event.
      final <E extends Event> Unit then(E $self, Function2<S, E, Boolean> handler) specify a handler for this event.
      final <E extends Event> Unit Then(E $self, Function2<S, E, Unit> handler) specify a handler for this event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventDSL

        EventDSL(S self)
    • Method Detail

      • to

         final <E extends Event> Unit to(E $self, Function2<S, E, Boolean> handler)

        specify a handler for this event.

        in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.

        Return true to consume the event. True by default.

      • To

         final <E extends Event> Unit To(E $self, Function2<S, E, Unit> handler)

        specify a handler for this event.

        in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.

        Return true to consume the event. True by default.

      • then

         final <E extends Event> Unit then(E $self, Function2<S, E, Boolean> handler)

        specify a handler for this event.

        in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.

        Return true to consume the event. True by default.

      • Then

         final <E extends Event> Unit Then(E $self, Function2<S, E, Unit> handler)

        specify a handler for this event.

        in the given handler, you can perform things on this component, such as Component.rotateBy, Component.recolor, etc.

        Return true to consume the event. True by default.