Interface Animatable<T extends Component<?>>

Type Parameters:
T - The component type
All Known Implementing Classes:
ActivityStream, ActivityStreamItem, Badge, BaseLoginPage, BasePage, Blockquote, Breadcrumb, Button, CheckboxItem, CodeViewer, ColorPicker, ComboboxItem, Container, ContextMenu, DatePicker, DateRangePicker, DropDownButton, DualListBox, FileItem, FileMiniature, Form, Header, HorizontalSplitter, IBox, Image, IntegerItem, Link, ListBox, ListGrid, ListItem, LoadButton, MenuBar, ModalWindow, NavBar, NavBarItem, NumberItem, Paragraph, PasswordItem, ProgressBar, RadioButtonItem, Row, SelectorItem, Small, Span, Sparkline, StaticTextItem, SwitchItem, Tab, Table, TableCell, TableHeader, TableRow, TabPage, TextFilter, TextItem, Timeline, TimelineItem, Toolbar, Treeview, TreeviewNode, UI.RootLayout, VerticalSplitter, Wizard, WizardStep

public interface Animatable<T extends Component<?>>

Components that can have animations

The JBStrap framework offers multiple animations, that are usable by most components. Components that implement this interface, can have animations. The interface provides the placement of the animation event handler and sets the animation.

The component can be animated, by setting the animation type. After that, the component will play an animation when it shows up, or disappears. These components can be handled by the AnimationStart or AnimationEnd events, that will run when the animation starts and ends.

Since:
4.0
Author:
JBStrap
See Also:
  • Method Details

    • setAnimation

      default T setAnimation(Animation animation)
      Sets the animation type on the component
      Parameters:
      animation - The animation type. The usable animation types can be found in the Animation enum
      Returns:
      The component
    • getAnimation

      default Animation getAnimation()
      Gets the component's animation type
      Returns:
      The animation type that is assigned to the component
    • removeAnimation

      default T removeAnimation()
      Removes animation from the component
      Returns:
      The component
    • addAnimationEndHandler

      default T addAnimationEndHandler(AnimationEndEventHandler handler)
      Adds an animation end event handler to the component. This handler is used, when the animation has ended.
      Parameters:
      handler - The AnimationEndEventHandler implementation
      Returns:
      The component
      See Also:
    • addAnimationStartHandler

      default T addAnimationStartHandler(AnimationStartEventHandler handler)
      Adds an animation start event handler to the component. This handler is used, when the animation has starts.
      Parameters:
      handler - The AnimationStartEventHandler implementation
      Returns:
      The component
      See Also: