bibliothek.gui.dock.themes.basic
Class BasicSpanFactory

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.BasicSpanFactory
All Implemented Interfaces:
SpanFactory

public class BasicSpanFactory
extends Object
implements SpanFactory

The BasicSpanFactory uses a small animation to expand and to shrink its Spans.

Author:
Benjamin Sigg

Constructor Summary
BasicSpanFactory(int duration, int minSpeed)
          Creates a new factory
 
Method Summary
 Span create(SpanCallback callback)
          Creates a new Span.
 int getMinSpeed()
          Gets the minimum speed of the animation.
 void setDuration(int duration)
          Sets how long an animation takes for changing the size of a Span.
 void setMinSpeed(int minSpeed)
          Sets the minimum speed to open/close spans.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicSpanFactory

public BasicSpanFactory(int duration,
                        int minSpeed)
Creates a new factory

Parameters:
duration - how long the animation takes
minSpeed - the minimum speed, how many pixels must be shown/hidden on average within 1000 milliseconds.
Method Detail

setDuration

public void setDuration(int duration)
Sets how long an animation takes for changing the size of a Span. Changing this property affects all Spans that were ever created by this factory.

Parameters:
duration - how long the animation is in milliseconds, at least 0

setMinSpeed

public void setMinSpeed(int minSpeed)
Sets the minimum speed to open/close spans. The minimum speed is the average amount of pixels in which the size has to change within 1000 milliseconds.

Parameters:
minSpeed - the minimum speed, can be 0

getMinSpeed

public int getMinSpeed()
Gets the minimum speed of the animation.

Returns:
the minimum speed
See Also:
setMinSpeed(int)

create

public Span create(SpanCallback callback)
Description copied from interface: SpanFactory
Creates a new Span.

Specified by:
create in interface SpanFactory
Parameters:
callback - allows interaction between Span and DockStation.
Returns:
the new Span, not null