public class TransitionBorder
extends java.lang.Object
implements javax.swing.border.Border
Border
implementation that respects the transition composite effects
set by the TransitionLayout
. All Border
s installed on the
component hierarchy are wrapped in instances of this class once the
TransitionLayout
is installed on that component (with
TransitionLayoutManager.track(Container, boolean)
or
TransitionLayoutManager.track(Container, boolean, boolean)
.
Note that installing the TransitionLayout
on a component may break
applications that operate directly on the installed borders, resulting in
ClassCastException
or incorrect logic being called. The relevant code
needs to be changed using the getDelegate()
. In addition, the
applications will get PropertyChangeEvent
s when these borders are
set / unset.
Modifier and Type | Class and Description |
---|---|
static class |
TransitionBorder.BorderUIResource
Wrapper border that implements the
UIResource interface. |
Modifier and Type | Field and Description |
---|---|
protected javax.swing.border.Border |
delegate
The delegate (original) border.
|
Constructor and Description |
---|
TransitionBorder(javax.swing.border.Border original)
Creates a new wrapper border.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c) |
javax.swing.border.Border |
getDelegate()
Returns the original (delegate) border.
|
boolean |
isBorderOpaque() |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height) |
protected javax.swing.border.Border delegate
Border
methods,
including paintBorder(Component, Graphics, int, int, int, int)
that operates on a Graphics2D
object with
TransitionLayout
-relevant Composite
.public TransitionBorder(javax.swing.border.Border original)
original
- The original border.public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets
in interface javax.swing.border.Border
public boolean isBorderOpaque()
isBorderOpaque
in interface javax.swing.border.Border
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
public javax.swing.border.Border getDelegate()