| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
package com.bulenkov.iconloader.util; |
| 17 |
|
| 18 |
import javax.swing.border.EmptyBorder; |
| 19 |
import javax.swing.plaf.UIResource; |
| 20 |
import java.awt.*; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
public class JBEmptyBorder extends EmptyBorder { |
| 26 |
public JBEmptyBorder(int top, int left, int bottom, int right) { |
| 27 |
super(JBUI.insets(top, left, bottom, right)); |
| 28 |
} |
| 29 |
|
| 30 |
public JBEmptyBorder(Insets insets) { |
| 31 |
super(JBUI.insets(insets)); |
| 32 |
} |
| 33 |
|
| 34 |
public JBEmptyBorder(int offset) { |
| 35 |
this(offset, offset, offset, offset); |
| 36 |
} |
| 37 |
|
| 38 |
public JBEmptyBorderUIResource asUIResource() { |
| 39 |
return new JBEmptyBorderUIResource(this); |
| 40 |
} |
| 41 |
|
| 42 |
public static class JBEmptyBorderUIResource extends JBEmptyBorder implements UIResource { |
| 43 |
public JBEmptyBorderUIResource(JBEmptyBorder border) { |
| 44 |
super(0,0,0,0); |
| 45 |
top = border.top; |
| 46 |
left = border.left; |
| 47 |
bottom = border.bottom; |
| 48 |
right = border.right; |
| 49 |
} |
| 50 |
} |
| 51 |
} |