java.lang.Object
furbelow.AbstractComponentDecorator
furbelow.ListAnimator
Animates moving list cells out of the way for a potential drop.
This decorator completely over-paints the target JList, optionally
painting a dragged item and animating creation of a space for the
dragged item to be dropped.
Thanks to Neil Cochran/keilly for a base visualization:
http://jroller.com/page/swinguistuff?entry=animated_jlist
-
Nested Class Summary
Nested classes/interfaces inherited from class furbelow.AbstractComponentDecorator
AbstractComponentDecorator.Painter -
Field Summary
Fields inherited from class furbelow.AbstractComponentDecorator
DEFAULT_BOUNDS, TOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrop(Transferable t, int index) voidEnd an internal drag.voidendDragOver(Point where, Transferable t) Stop tracking an external drag.protected Objectstatic voidThrow up a frame to demonstrate the animator at work.protected abstract voidmove(int fromIndex, int toIndex) voidDefine the decoration's appearance.voidsetInsertionIndex(int idx) voidsetInsertionLocation(Point where) voidStart an internal drag.voidstartDragOver(Point where) Track a drag which originated somewhere else.Methods inherited from class furbelow.AbstractComponentDecorator
attach, clipDecorationBounds, dispose, getComponent, getDecorationBounds, getPainter, getToolTipText, getToolTipText, isVisible, repaint, setCursor, setDecorationBounds, setDecorationBounds, setPainterBounds, setToolTipText, setVisible, synch, toString
-
Constructor Details
-
ListAnimator
-
-
Method Details
-
getPlaceholder
-
move
protected abstract void move(int fromIndex, int toIndex) -
drop
-
startDragOver
Track a drag which originated somewhere else. -
endDragOver
Stop tracking an external drag. -
startDrag
Start an internal drag. -
endDrag
End an internal drag. -
setInsertionLocation
-
setInsertionIndex
public void setInsertionIndex(int idx) -
paint
Description copied from class:AbstractComponentDecoratorDefine the decoration's appearance. The point (0,0) represents the upper left corner of the decorated component. The default clip mask will be the extents of the decoration bounds, as indicated byAbstractComponentDecorator.getDecorationBounds(), which defaults to the decorated component bounds.- Specified by:
paintin classAbstractComponentDecorator
-
main
Throw up a frame to demonstrate the animator at work. Funkify the list renderer to demonstrate that customized renderers are handled properly.
-