E - component typeD - decoration typeI - shape typepublic interface IShape<E extends javax.swing.JComponent,D extends IDecoration<E,D>,I extends IShape<E,D,I>>
extends java.io.Serializable, java.lang.Cloneable, com.alee.api.Mergeable<I>, com.alee.api.Identifiable
| Modifier and Type | Method and Description |
|---|---|
java.awt.Insets |
getBorderInsets(E c,
D d)
Returns shape borders size.
|
java.awt.Shape |
getShape(ShapeType type,
java.awt.Rectangle bounds,
E c,
D d)
Returns shape provided for shade painting.
|
java.lang.Object[] |
getShapeSettings(java.awt.Rectangle bounds,
E c,
D d)
Returns exclusive shape settings used to cache the shape itself.
|
StretchInfo |
getStretchInfo(java.awt.Rectangle bounds,
E c,
D d)
Returns shape stretch information.
|
boolean |
isVisible(ShapeType type,
E c,
D d)
Returns whether shape is visible within component bounds.
|
java.awt.Insets getBorderInsets(E c, D d)
c - painted componentd - painted decoration stateboolean isVisible(ShapeType type, E c, D d)
type - checked shape typec - painted componentd - painted decoration statejava.awt.Shape getShape(ShapeType type, java.awt.Rectangle bounds, E c, D d)
type - requested shape typebounds - painting boundsc - painted componentd - painted decoration statejava.lang.Object[] getShapeSettings(java.awt.Rectangle bounds,
E c,
D d)
bounds - painting boundsc - painted componentd - painted decoration stateStretchInfo getStretchInfo(java.awt.Rectangle bounds, E c, D d)
null shape is stretchable horizontally and/or vertically.
That information might be extremely useful for painting optimization, but it is not necessary to implement this method.
As an example - WebLaF uses this information to optimize (reduce amount of) shade images generation. Since generating even a small shade requires a good chunk of memory and processing time it is necessary.
bounds - painting boundsc - painted componentd - painted decoration state