|
|
|
@ -1,5 +1,17 @@
|
|
|
|
|
package com.fr.design.gui.ibutton; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.event.GlobalNameListener; |
|
|
|
|
import com.fr.design.event.GlobalNameObserver; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.border.Border; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
@ -10,22 +22,6 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.border.Border; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.event.GlobalNameListener; |
|
|
|
|
import com.fr.design.event.GlobalNameObserver; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
|
|
|
|
|
public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver { |
|
|
|
|
private boolean isTwoLine = false; |
|
|
|
|
private boolean isFourLine = false; |
|
|
|
@ -82,11 +78,11 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean hasClick(){ |
|
|
|
|
public boolean hasClick() { |
|
|
|
|
return isClick; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setClickState(boolean changeFlag){ |
|
|
|
|
public void setClickState(boolean changeFlag) { |
|
|
|
|
isClick = changeFlag; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -132,7 +128,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
|
|
|
|
|
if (!isEnabled()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(globalNameListener != null) { |
|
|
|
|
if (globalNameListener != null) { |
|
|
|
|
globalNameListener.setGlobalName(buttonGroupName); |
|
|
|
|
} |
|
|
|
|
setSelectedWithFireChanged(index); |
|
|
|
@ -201,7 +197,7 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
|
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
protected void paintBorder(Graphics g) { |
|
|
|
|
if(isToolBarComponent){ |
|
|
|
|
if (isToolBarComponent) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|