Package com.tagtraum.core.swing
Class WindowFocusBorder
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- com.tagtraum.core.swing.AlternativeBorder
-
- com.tagtraum.core.swing.WindowFocusBorder
-
- All Implemented Interfaces:
Serializable
,Border
public class WindowFocusBorder extends AlternativeBorder
Border that behaves differently depending on whether the parentWindow
(not the component itself) is focused.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WindowFocusBorder(int top, int left, int bottom, int right, Color focusedColor, Color unfocusedColor)
Creates a matte border that changes color depending on parent window focus.WindowFocusBorder(Border focusedBorder, Border unfocusedBorder)
Creates an AlternativeBorder changes depending on parent window focus.
-
Method Summary
-
Methods inherited from class com.tagtraum.core.swing.AlternativeBorder
getBorderInsets, getBorderInsets, isBorderOpaque, paintBorder
-
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle
-
-
-
-
Constructor Detail
-
WindowFocusBorder
public WindowFocusBorder(Border focusedBorder, Border unfocusedBorder)
Creates an AlternativeBorder changes depending on parent window focus.- Parameters:
focusedBorder
- border to show, when the parent window has the focusunfocusedBorder
- border to show, when the parent window does not have the focus
-
WindowFocusBorder
public WindowFocusBorder(int top, int left, int bottom, int right, Color focusedColor, Color unfocusedColor)
Creates a matte border that changes color depending on parent window focus.- Parameters:
top
- an integer specifying the width of the top, in pixelsleft
- an integer specifying the width of the left side, in pixelsbottom
- an integer specifying the width of the right side, in pixelsright
- an integer specifying the width of the bottom, in pixelsfocusedColor
- focused colorunfocusedColor
- unfocused color- See Also:
MatteBorder
-
-