bibliothek.gui.dock.station.span
Interface Span


public interface Span

A Span is an empty space that show up on a DockStation mostly during drag and drop operations. Every DockStation can contain multiple spans which can change their size at any time.
Spans are created by the customizeable SpanFactory, and interact with their DockStation using a SpanCallback.

Author:
Benjamin Sigg

Method Summary
 void configureSize(SpanMode mode, int size)
          Tells this Span that mode is associated with a size of size pixels.
 int getSize()
          Gets the current size of this Span.
 void mutate(SpanMode mode)
          Tells this Span to mutate its size according to the settings made for mode.
 void set(SpanMode mode)
          Like mutate(SpanMode), but the mutation into mode has to be instantly.
 

Method Detail

mutate

void mutate(SpanMode mode)
Tells this Span to mutate its size according to the settings made for mode. If there are no settings for mode, then the default values from mode itself should be utilizied. Whether the Span changes its size instantly, or uses some kind of animation, is up to the span. In any case the mutation should not take any longer than 1 second.

Parameters:
mode - the mode into which this Span should go

set

void set(SpanMode mode)
Like mutate(SpanMode), but the mutation into mode has to be instantly.

Parameters:
mode - the mode to apply instantly

configureSize

void configureSize(SpanMode mode,
                   int size)
Tells this Span that mode is associated with a size of size pixels. If this Span currently is in mode, then it should apply the new size as if set(SpanMode) would be called.

Parameters:
mode - the mode for which to set a size
size - the size in pixels, at least 0

getSize

int getSize()
Gets the current size of this Span.

Returns:
the current size, at least 0