public class ShapeCache
- extends java.lang.Object
This utility class can be used to implement shape caching withing any painter or component.
This might be useful to improve component painting performance in case it uses complex shapes.
- Mikle Garin
<T extends java.awt.Shape>
Returns cached component shape.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static <T extends java.awt.Shape> T getShape(java.awt.Component component,
- Returns cached component shape.
If shape is not yet cached it will be created.
If shape settings are changed from the last time it was queued it will be re-created.
- Type Parameters:
T - shape type
component - component for which shape is cached
shapeId - unique shape ID
shapeProvider - shape provider
settings - shape settings used as a shape key
- cached component shape