|
|
@ -1,30 +1,31 @@ |
|
|
|
package com.fr.design.style; |
|
|
|
package com.fr.design.style; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonUI; |
|
|
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
|
|
|
import com.fr.design.style.background.BackgroundJComponent; |
|
|
|
|
|
|
|
import com.fr.design.utils.gui.GUIPaintUtils; |
|
|
|
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.AbstractButton; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.border.AbstractBorder; |
|
|
|
|
|
|
|
import javax.swing.event.AncestorEvent; |
|
|
|
|
|
|
|
import javax.swing.event.AncestorListener; |
|
|
|
|
|
|
|
import javax.swing.plaf.ButtonUI; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Graphics; |
|
|
|
import java.awt.Graphics; |
|
|
|
import java.awt.Graphics2D; |
|
|
|
import java.awt.Graphics2D; |
|
|
|
import java.awt.Insets; |
|
|
|
import java.awt.Insets; |
|
|
|
|
|
|
|
import java.awt.Rectangle; |
|
|
|
import java.awt.RenderingHints; |
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseListener; |
|
|
|
import java.awt.event.MouseListener; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.AbstractButton; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.border.AbstractBorder; |
|
|
|
|
|
|
|
import javax.swing.event.AncestorEvent; |
|
|
|
|
|
|
|
import javax.swing.event.AncestorListener; |
|
|
|
|
|
|
|
import javax.swing.plaf.ButtonUI; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonUI; |
|
|
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
|
|
|
import com.fr.design.utils.gui.GUIPaintUtils; |
|
|
|
|
|
|
|
import com.fr.design.style.background.BackgroundJComponent; |
|
|
|
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author kunsnat E-mail:kunsnat@gmail.com |
|
|
|
* @author kunsnat E-mail:kunsnat@gmail.com |
|
|
|
* @version 创建时间:2011-10-31 下午03:28:31 类说明: 抽象出来的弹出box. 可以弹出颜色选择, 图案选择, 纹理选择. |
|
|
|
* @version 创建时间:2011-10-31 下午03:28:31 类说明: 抽象出来的弹出box. 可以弹出颜色选择, 图案选择, 纹理选择. |
|
|
@ -94,6 +95,18 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou |
|
|
|
hidePopupMenu(); |
|
|
|
hidePopupMenu(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
displayComponent.addMouseListener(new MouseAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
|
|
|
|
Rectangle rectangle = displayComponent.getBounds(); |
|
|
|
|
|
|
|
if (e.getY() < rectangle.y) { |
|
|
|
|
|
|
|
//如果是从displayComponent上面离开的,隐藏弹出界面。
|
|
|
|
|
|
|
|
hidePopupMenu(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setEnabled(boolean enabled) { |
|
|
|
public void setEnabled(boolean enabled) { |
|
|
|