com.alee.extended.label
Class WebMultiLineLabelUI.SegmentCache

java.lang.Object
  extended by com.alee.extended.label.WebMultiLineLabelUI.SegmentCache
Enclosing class:
WebMultiLineLabelUI

protected static final class WebMultiLineLabelUI.SegmentCache
extends java.lang.Object

Static singleton Segment cache.

Author:
Samuel Sjoberg
See Also:
SegmentCache

Method Summary
static javax.swing.text.Segment getSegment()
          Returns a Segment.
static void releaseSegment(javax.swing.text.Segment segment)
          Releases a Segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSegment

public static javax.swing.text.Segment getSegment()
Returns a Segment. When done, the Segment should be recycled by invoking releaseSegment(Segment).

Returns:
a Segment.

releaseSegment

public static void releaseSegment(javax.swing.text.Segment segment)
Releases a Segment. A segment should not be used after it is released, and a segment should never be released more than once.