|
|
|
@ -33,6 +33,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager
|
|
|
|
|
import com.fr.design.mainframe.alphafine.search.manager.impl.ProductNewsSearchManager; |
|
|
|
|
import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
@ -66,8 +67,11 @@ import javax.swing.Icon;
|
|
|
|
|
import javax.swing.JButton; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JPopupMenu; |
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
import javax.swing.Timer; |
|
|
|
|
import javax.swing.event.PopupMenuEvent; |
|
|
|
|
import javax.swing.event.PopupMenuListener; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author hades |
|
|
|
@ -241,13 +245,10 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
topRightPane.setBackground(Color.WHITE); |
|
|
|
|
JPanel tipPane = new JPanel(new BorderLayout()); |
|
|
|
|
tipPane.setBackground(Color.WHITE); |
|
|
|
|
String toolTip = AlphaFineShortCutUtil.getDisplayShortCut(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Short_Cut", DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortcuts())); |
|
|
|
|
tipIconLabel = new UILabel(AlphaFineConstants.BULB_ICON); |
|
|
|
|
tipIconLabel.addMouseListener(tipMouseListener); |
|
|
|
|
tipIconLabel.setToolTipText(toolTip); |
|
|
|
|
useTipLabel = new UILabel(SKILLS); |
|
|
|
|
useTipLabel.addMouseListener(tipMouseListener); |
|
|
|
|
useTipLabel.setToolTipText(toolTip); |
|
|
|
|
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); |
|
|
|
|
tipPane.add(tipIconLabel, BorderLayout.WEST); |
|
|
|
|
tipPane.add(useTipLabel, BorderLayout.CENTER); |
|
|
|
@ -264,19 +265,63 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
|
|
|
|
|
private MouseAdapter tipMouseListener = new MouseAdapter() { |
|
|
|
|
|
|
|
|
|
private JPopupMenu popupMenu; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseEntered(MouseEvent e) { |
|
|
|
|
useTipLabel.setForeground(UIConstants.FLESH_BLUE); |
|
|
|
|
tipIconLabel.setIcon(AlphaFineConstants.BLUE_BULB_ICON); |
|
|
|
|
tipIconLabel.setIcon(AlphaFineConstants.YELLOW_BULB_ICON); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
|
if (popupMenu == null || !popupMenu.isShowing()) { |
|
|
|
|
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); |
|
|
|
|
tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
useTipLabel.setForeground(UIConstants.FLESH_BLUE); |
|
|
|
|
tipIconLabel.setIcon(AlphaFineConstants.LIGHT_YELLOW_BULB_ICON); |
|
|
|
|
popupMenu = createTipPop(); |
|
|
|
|
GUICoreUtils.showPopupMenu(popupMenu, e.getComponent(), e.getComponent().getX() - 60, e.getComponent().getY() + 20); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPopupMenu createTipPop() { |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
String toolTip = AlphaFineShortCutUtil.getDisplayShortCut(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Short_Cut", DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortcuts())); |
|
|
|
|
UILabel label = new UILabel(toolTip); |
|
|
|
|
label.setForeground(AlphaFineConstants.FOREGROUND_COLOR_8); |
|
|
|
|
label.setBackground(Color.WHITE); |
|
|
|
|
panel.add(label); |
|
|
|
|
panel.setBackground(Color.WHITE); |
|
|
|
|
JPopupMenu popupMenu = new JPopupMenu(); |
|
|
|
|
popupMenu.setBorder(BorderFactory.createEmptyBorder(20, 5, 10, 5)); |
|
|
|
|
popupMenu.add(panel); |
|
|
|
|
popupMenu.setBackground(Color.WHITE); |
|
|
|
|
popupMenu.addPopupMenuListener(new PopupMenuListener() { |
|
|
|
|
@Override |
|
|
|
|
public void popupMenuWillBecomeVisible(PopupMenuEvent e) { |
|
|
|
|
// do nothing
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { |
|
|
|
|
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); |
|
|
|
|
tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void popupMenuCanceled(PopupMenuEvent e) { |
|
|
|
|
// do nothing
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return popupMenu; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createSearchPane() { |
|
|
|
|
JPanel searchPane = new JPanel(new BorderLayout()); |
|
|
|
|
searchPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20)); |
|
|
|
|