|
|
|
@ -1,24 +1,27 @@
|
|
|
|
|
package com.fr.design.gui.itoolbar; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
|
|
import javax.swing.JToolBar; |
|
|
|
|
|
|
|
|
|
public class UIToolbar extends JToolBar { |
|
|
|
|
private static final int TOOLBAR_HEIGNT = 26; |
|
|
|
|
|
|
|
|
|
public UIToolbar() { |
|
|
|
|
this(FlowLayout.LEFT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UIToolbar(int align) { |
|
|
|
|
public UIToolbar(int align, UIToolBarUI uiToolBarUI) { |
|
|
|
|
super(); |
|
|
|
|
setFloatable(false); |
|
|
|
|
setRollover(true); |
|
|
|
|
setLayout(new FlowLayout(align, 4, 0)); |
|
|
|
|
setUI(new UIToolBarUI()); |
|
|
|
|
setUI(uiToolBarUI); |
|
|
|
|
setBorderPainted(false); |
|
|
|
|
setBackground(Color.RED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UIToolbar(int align) { |
|
|
|
|
this(align, new UIToolBarUI()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|