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 void
drop
(Transferable t, int index) void
End an internal drag.void
endDragOver
(Point where, Transferable t) Stop tracking an external drag.protected Object
static void
Throw up a frame to demonstrate the animator at work.protected abstract void
move
(int fromIndex, int toIndex) void
Define the decoration's appearance.void
setInsertionIndex
(int idx) void
setInsertionLocation
(Point where) void
Start an internal drag.void
startDragOver
(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:AbstractComponentDecorator
Define 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:
paint
in classAbstractComponentDecorator
-
main
Throw up a frame to demonstrate the animator at work. Funkify the list renderer to demonstrate that customized renderers are handled properly.
-