|
|
@ -27,7 +27,6 @@ import com.fr.form.main.Form; |
|
|
|
import com.fr.form.main.FormIO; |
|
|
|
import com.fr.form.main.FormIO; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.FRLogger; |
|
|
|
import com.fr.general.FRLogger; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.http.HttpClient; |
|
|
|
import com.fr.general.http.HttpClient; |
|
|
|
import com.fr.io.TemplateWorkBookIO; |
|
|
|
import com.fr.io.TemplateWorkBookIO; |
|
|
@ -60,29 +59,18 @@ import java.util.concurrent.ExecutionException; |
|
|
|
* Created by XiaXiang on 2017/3/21. |
|
|
|
* Created by XiaXiang on 2017/3/21. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class AlphaFineDialog extends UIDialog { |
|
|
|
public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
private static final String ADVANCED_SEARCH_MARK = "k:"; |
|
|
|
private static final String ACTION_MARK_SHORT = "k:1 "; |
|
|
|
private static final String ACTION_MARK_SHORT = "k:1 "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String ACTION_MARK = "k:setting "; |
|
|
|
private static final String ACTION_MARK = "k:setting "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String DOCUMENT_MARK_SHORT = "k:2 "; |
|
|
|
private static final String DOCUMENT_MARK_SHORT = "k:2 "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String DOCUMENT_MARK = "k:help "; |
|
|
|
private static final String DOCUMENT_MARK = "k:help "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String FILE_MARK_SHORT = "k:3 "; |
|
|
|
private static final String FILE_MARK_SHORT = "k:3 "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String FILE_MARK = "k:reportlets "; |
|
|
|
private static final String FILE_MARK = "k:reportlets "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String CPT_MARK = "k:cpt "; |
|
|
|
private static final String CPT_MARK = "k:cpt "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String FRM_MARK = "k:frm "; |
|
|
|
private static final String FRM_MARK = "k:frm "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String DS_MARK = "k:ds "; |
|
|
|
private static final String DS_MARK = "k:ds "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String DS_NAME = "dsname=\""; |
|
|
|
private static final String DS_NAME = "dsname=\""; |
|
|
|
|
|
|
|
|
|
|
|
private static final String PLUGIN_MARK_SHORT = "k:4 "; |
|
|
|
private static final String PLUGIN_MARK_SHORT = "k:4 "; |
|
|
|
|
|
|
|
|
|
|
|
private static final String PLUGIN_MARK = "k:shop "; |
|
|
|
private static final String PLUGIN_MARK = "k:shop "; |
|
|
|
|
|
|
|
|
|
|
|
private AlphaFineTextField searchTextField; |
|
|
|
private AlphaFineTextField searchTextField; |
|
|
@ -94,6 +82,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
private JList searchResultList; |
|
|
|
private JList searchResultList; |
|
|
|
private SearchListModel searchListModel; |
|
|
|
private SearchListModel searchListModel; |
|
|
|
private SwingWorker searchWorker; |
|
|
|
private SwingWorker searchWorker; |
|
|
|
|
|
|
|
private SwingWorker showWorker; |
|
|
|
//是否强制打开,因为面板是否关闭绑定了全局鼠标事件,这里需要处理一下
|
|
|
|
//是否强制打开,因为面板是否关闭绑定了全局鼠标事件,这里需要处理一下
|
|
|
|
private boolean forceOpen; |
|
|
|
private boolean forceOpen; |
|
|
|
|
|
|
|
|
|
|
@ -102,7 +91,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
super(parent); |
|
|
|
super(parent); |
|
|
|
this.forceOpen = forceOpen; |
|
|
|
this.forceOpen = forceOpen; |
|
|
|
initProperties(); |
|
|
|
initProperties(); |
|
|
|
initListener(); |
|
|
|
initGlobalListener(); |
|
|
|
initComponents(); |
|
|
|
initComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -112,12 +101,10 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static AWTEventListener listener() { |
|
|
|
public static AWTEventListener listener() { |
|
|
|
|
|
|
|
|
|
|
|
return new AWTEventListener() { |
|
|
|
return new AWTEventListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void eventDispatched(AWTEvent event) { |
|
|
|
public void eventDispatched(AWTEvent event) { |
|
|
|
|
|
|
|
|
|
|
|
if (event instanceof KeyEvent) { |
|
|
|
if (event instanceof KeyEvent) { |
|
|
|
KeyEvent e = (KeyEvent) event; |
|
|
|
KeyEvent e = (KeyEvent) event; |
|
|
|
KeyStroke keyStroke = (KeyStroke) KeyStroke.getAWTKeyStrokeForEvent(e); |
|
|
|
KeyStroke keyStroke = (KeyStroke) KeyStroke.getAWTKeyStrokeForEvent(e); |
|
|
@ -132,7 +119,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void doClickAction() { |
|
|
|
private static void doClickAction() { |
|
|
|
|
|
|
|
|
|
|
|
AlphaFineHelper.showAlphaFineDialog(false); |
|
|
|
AlphaFineHelper.showAlphaFineDialog(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -140,24 +126,21 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* 初始化全部组件 |
|
|
|
* 初始化全部组件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void initComponents() { |
|
|
|
private void initComponents() { |
|
|
|
|
|
|
|
|
|
|
|
searchTextField = new AlphaFineTextField("AlphaFine"); |
|
|
|
searchTextField = new AlphaFineTextField("AlphaFine"); |
|
|
|
searchTextField.setFont(AlphaFineConstants.GREATER_FONT); |
|
|
|
searchTextField.setFont(AlphaFineConstants.GREATER_FONT); |
|
|
|
searchTextField.setBackground(Color.white); |
|
|
|
searchTextField.setBackground(Color.white); |
|
|
|
searchTextField.setBorderPainted(false); |
|
|
|
searchTextField.setBorderPainted(false); |
|
|
|
searchTextField.initKeyListener(this); |
|
|
|
searchTextField.initKeyListener(this); |
|
|
|
JPanel topPane = new JPanel(new BorderLayout()); |
|
|
|
JPanel topPane = new JPanel(new BorderLayout()); |
|
|
|
UILabel iconLabel = new UILabel(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/bigsearch.png")); |
|
|
|
UILabel iconLabel = new UILabel(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigsearch.png"))); |
|
|
|
iconLabel.setPreferredSize(AlphaFineConstants.ICON_LABEL_SIZE); |
|
|
|
iconLabel.setPreferredSize(AlphaFineConstants.ICON_LABEL_SIZE); |
|
|
|
iconLabel.setOpaque(true); |
|
|
|
iconLabel.setOpaque(true); |
|
|
|
iconLabel.setBackground(Color.white); |
|
|
|
iconLabel.setBackground(Color.white); |
|
|
|
topPane.add(iconLabel, BorderLayout.WEST); |
|
|
|
topPane.add(iconLabel, BorderLayout.WEST); |
|
|
|
topPane.add(searchTextField, BorderLayout.CENTER); |
|
|
|
topPane.add(searchTextField, BorderLayout.CENTER); |
|
|
|
closeButton = new UIButton() { |
|
|
|
closeButton = new UIButton() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void paintComponent(Graphics g) { |
|
|
|
public void paintComponent(Graphics g) { |
|
|
|
|
|
|
|
|
|
|
|
g.setColor(Color.white); |
|
|
|
g.setColor(Color.white); |
|
|
|
g.fillRect(0, 0, getSize().width, getSize().height); |
|
|
|
g.fillRect(0, 0, getSize().width, getSize().height); |
|
|
|
super.paintComponent(g); |
|
|
|
super.paintComponent(g); |
|
|
@ -165,13 +148,11 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
}; |
|
|
|
}; |
|
|
|
closeButton.setContentAreaFilled(false); |
|
|
|
closeButton.setContentAreaFilled(false); |
|
|
|
closeButton.setPreferredSize(AlphaFineConstants.CLOSE_BUTTON_SIZE); |
|
|
|
closeButton.setPreferredSize(AlphaFineConstants.CLOSE_BUTTON_SIZE); |
|
|
|
closeButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/alphafine_close.png")); |
|
|
|
closeButton.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/alphafine_close.png"))); |
|
|
|
closeButton.set4ToolbarButton(); |
|
|
|
closeButton.set4ToolbarButton(); |
|
|
|
closeButton.addActionListener(new ActionListener() { |
|
|
|
closeButton.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
|
|
|
|
dispose(); |
|
|
|
dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -182,10 +163,8 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
topPane.add(borderLabel, BorderLayout.SOUTH); |
|
|
|
topPane.add(borderLabel, BorderLayout.SOUTH); |
|
|
|
add(topPane, BorderLayout.CENTER); |
|
|
|
add(topPane, BorderLayout.CENTER); |
|
|
|
searchTextField.getDocument().addDocumentListener(new DocumentAdapter() { |
|
|
|
searchTextField.getDocument().addDocumentListener(new DocumentAdapter() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void textChanged(DocumentEvent e) { |
|
|
|
protected void textChanged(DocumentEvent e) { |
|
|
|
|
|
|
|
|
|
|
|
doSearch(searchTextField.getText()); |
|
|
|
doSearch(searchTextField.getText()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -195,7 +174,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void initProperties() { |
|
|
|
private void initProperties() { |
|
|
|
|
|
|
|
|
|
|
|
setUndecorated(true); |
|
|
|
setUndecorated(true); |
|
|
|
addComponentListener(new ComponentHandler()); |
|
|
|
addComponentListener(new ComponentHandler()); |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
|
setSize(AlphaFineConstants.FIELD_SIZE); |
|
|
@ -209,7 +187,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* @param win |
|
|
|
* @param win |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void centerWindow(Window win) { |
|
|
|
private void centerWindow(Window win) { |
|
|
|
|
|
|
|
|
|
|
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); |
|
|
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); |
|
|
|
|
|
|
|
|
|
|
|
Dimension winSize = win.getSize(); |
|
|
|
Dimension winSize = win.getSize(); |
|
|
@ -226,13 +203,12 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
// TODO: 2017/5/8 xiaxiang: 窗体圆角setShape()有毛边,重写paint方法可以解决毛边问题,但带来了别的问题,处理比较麻烦,暂用setShape();
|
|
|
|
// TODO: 2017/5/8 xiaxiang: 窗体圆角setShape()有毛边,重写paint方法可以解决毛边问题,但带来了别的问题,处理比较麻烦,暂用setShape();
|
|
|
|
// public void paint(Graphics g){
|
|
|
|
// public void paint(Graphics g){
|
|
|
|
//
|
|
|
|
|
|
|
|
// Graphics2D g2 = (Graphics2D) g.create();
|
|
|
|
// Graphics2D g2 = (Graphics2D) g.create();
|
|
|
|
// RenderingHints qualityHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
|
|
|
// RenderingHints qualityHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
|
|
|
// qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
|
|
|
// qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
|
|
|
// g2.setRenderingHints(qualityHints);
|
|
|
|
// g2.setRenderingHints(qualityHints);
|
|
|
|
// g2.setPaint(Color.WHITE);
|
|
|
|
// g2.setPaint(Color.WHITE);
|
|
|
|
// g2.fillRoundRect(0, 0, getWidth(), getHeight(), 25, 25);
|
|
|
|
// g2.fillRoundRect(0, 0, getWidth(), getHeight(), 15, 15);
|
|
|
|
// g2.dispose();
|
|
|
|
// g2.dispose();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
@ -243,21 +219,21 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void doSearch(String text) { |
|
|
|
private void doSearch(String text) { |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(text) || text.equals("AlphaFine")) { |
|
|
|
if (StringUtils.isBlank(text) || isNeedSearch(text)) { |
|
|
|
removeSearchResult(); |
|
|
|
removeSearchResult(); |
|
|
|
} else if (text.contains("'")) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
showSearchResult(); |
|
|
|
showSearchResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean isNeedSearch(String text) { |
|
|
|
|
|
|
|
return ComparatorUtils.equals("AlphaFine", text) || text.contains("'"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 移除搜索结果 |
|
|
|
* 移除搜索结果 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void removeSearchResult() { |
|
|
|
private void removeSearchResult() { |
|
|
|
|
|
|
|
|
|
|
|
if (searchResultPane != null) { |
|
|
|
if (searchResultPane != null) { |
|
|
|
remove(searchResultPane); |
|
|
|
remove(searchResultPane); |
|
|
|
searchResultPane = null; |
|
|
|
searchResultPane = null; |
|
|
@ -281,7 +257,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* 初始化搜索面板 |
|
|
|
* 初始化搜索面板 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void initSearchResultComponents() { |
|
|
|
private void initSearchResultComponents() { |
|
|
|
|
|
|
|
|
|
|
|
searchResultList = new JList(); |
|
|
|
searchResultList = new JList(); |
|
|
|
searchListModel = new SearchListModel(new SearchResult()); |
|
|
|
searchListModel = new SearchListModel(new SearchResult()); |
|
|
|
searchResultList.setModel(searchListModel); |
|
|
|
searchResultList.setModel(searchListModel); |
|
|
@ -289,7 +264,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
searchResultPane.setPreferredSize(AlphaFineConstants.CONTENT_SIZE); |
|
|
|
searchResultPane.setPreferredSize(AlphaFineConstants.CONTENT_SIZE); |
|
|
|
searchResultPane.setLayout(new BorderLayout()); |
|
|
|
searchResultPane.setLayout(new BorderLayout()); |
|
|
|
searchResultList.setCellRenderer(new ContentCellRender()); |
|
|
|
searchResultList.setCellRenderer(new ContentCellRender()); |
|
|
|
searchResultList.setFixedCellHeight(AlphaFineConstants.CELL_HEIGHT); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
leftSearchResultPane = new UIScrollPane(searchResultList); |
|
|
|
leftSearchResultPane = new UIScrollPane(searchResultList); |
|
|
|
leftSearchResultPane.setBackground(Color.white); |
|
|
|
leftSearchResultPane.setBackground(Color.white); |
|
|
@ -315,15 +289,13 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
this.searchWorker = new SwingWorker() { |
|
|
|
this.searchWorker = new SwingWorker() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Object doInBackground() throws Exception { |
|
|
|
protected Object doInBackground() throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
rebuildList(searchTextField.getText().toLowerCase()); |
|
|
|
rebuildList(searchTextField.getText().toLowerCase()); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void done() { |
|
|
|
protected void done() { |
|
|
|
|
|
|
|
if (!isCancelled() && searchListModel.getSize() > 1) { |
|
|
|
if (!isCancelled() && searchListModel.getSize() > 0) { |
|
|
|
|
|
|
|
searchResultList.setSelectedIndex(1); |
|
|
|
searchResultList.setSelectedIndex(1); |
|
|
|
showResult(searchResultList.getSelectedIndex(), searchResultList.getSelectedValue()); |
|
|
|
showResult(searchResultList.getSelectedIndex(), searchResultList.getSelectedValue()); |
|
|
|
} |
|
|
|
} |
|
|
@ -339,28 +311,25 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* @param searchText |
|
|
|
* @param searchText |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void rebuildList(String searchText) { |
|
|
|
private void rebuildList(String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
searchListModel.removeAllElements(); |
|
|
|
searchListModel.removeAllElements(); |
|
|
|
if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) { |
|
|
|
if (searchText.startsWith(ADVANCED_SEARCH_MARK)) { |
|
|
|
getActionList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) { |
|
|
|
return; |
|
|
|
getActionList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
} else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { |
|
|
|
} else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { |
|
|
|
getDocumentList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
getDocumentList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
return; |
|
|
|
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) { |
|
|
|
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) { |
|
|
|
getFileList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
getFileList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
} else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) { |
|
|
|
return; |
|
|
|
getFileList(searchText); |
|
|
|
} else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) { |
|
|
|
} else if (searchText.startsWith(DS_MARK)) { |
|
|
|
getFileList(searchText); |
|
|
|
getFileList(DS_NAME + searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
return; |
|
|
|
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { |
|
|
|
} else if (searchText.startsWith(DS_MARK)) { |
|
|
|
getPluginList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
getFileList(DS_NAME + searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
} |
|
|
|
return; |
|
|
|
} else { |
|
|
|
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { |
|
|
|
doNormalSearch(searchText.trim()); |
|
|
|
getPluginList(searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length())); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
doNormalSearch(searchText.trim()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -369,7 +338,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* @param searchText |
|
|
|
* @param searchText |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void doNormalSearch(String searchText) { |
|
|
|
private void doNormalSearch(String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
getRecentList(searchText); |
|
|
|
getRecentList(searchText); |
|
|
|
getRecommendList(searchText); |
|
|
|
getRecommendList(searchText); |
|
|
|
getActionList(searchText); |
|
|
|
getActionList(searchText); |
|
|
@ -378,18 +346,15 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
getPluginList(searchText); |
|
|
|
getPluginList(searchText); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void getDocumentList(final String searchText) { |
|
|
|
private void getDocumentList(final String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult documentModelList = DocumentSearchManager.getDocumentSearchManager().getLessSearchResult(searchText); |
|
|
|
SearchResult documentModelList = DocumentSearchManager.getDocumentSearchManager().getLessSearchResult(searchText); |
|
|
|
for (Object object : documentModelList) { |
|
|
|
for (Object object : documentModelList) { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
searchListModel.addElement(object); |
|
|
|
searchListModel.addElement(object); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void getFileList(final String searchText) { |
|
|
|
private void getFileList(final String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult fileModelList = FileSearchManager.getFileSearchManager().getLessSearchResult(searchText); |
|
|
|
SearchResult fileModelList = FileSearchManager.getFileSearchManager().getLessSearchResult(searchText); |
|
|
|
for (Object object : fileModelList) { |
|
|
|
for (Object object : fileModelList) { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
@ -397,8 +362,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void getActionList(final String searchText) { |
|
|
|
private void getActionList(final String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult actionModelList = ActionSearchManager.getActionSearchManager().getLessSearchResult(searchText); |
|
|
|
SearchResult actionModelList = ActionSearchManager.getActionSearchManager().getLessSearchResult(searchText); |
|
|
|
for (Object object : actionModelList) { |
|
|
|
for (Object object : actionModelList) { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
@ -406,8 +370,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void getPluginList(final String searchText) { |
|
|
|
private void getPluginList(final String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult pluginModelList = PluginSearchManager.getPluginSearchManager().getLessSearchResult(searchText); |
|
|
|
SearchResult pluginModelList = PluginSearchManager.getPluginSearchManager().getLessSearchResult(searchText); |
|
|
|
for (Object object : pluginModelList) { |
|
|
|
for (Object object : pluginModelList) { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
@ -415,8 +378,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void getRecommendList(final String searchText) { |
|
|
|
private void getRecommendList(final String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult recommendModelList = RecommendSearchManager.getRecommendSearchManager().getLessSearchResult(searchText); |
|
|
|
SearchResult recommendModelList = RecommendSearchManager.getRecommendSearchManager().getLessSearchResult(searchText); |
|
|
|
for (Object object : recommendModelList) { |
|
|
|
for (Object object : recommendModelList) { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
@ -424,8 +386,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void getRecentList(final String searchText) { |
|
|
|
private void getRecentList(final String searchText) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult recentModelList = RecentSearchManager.getRecentSearchManger().getLessSearchResult(searchText); |
|
|
|
SearchResult recentModelList = RecentSearchManager.getRecentSearchManger().getLessSearchResult(searchText); |
|
|
|
for (Object object : recentModelList) { |
|
|
|
for (Object object : recentModelList) { |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
@ -434,71 +395,13 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 初始化监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initListListener() { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 鼠标监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchResultList.addMouseListener(new MouseAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
|
|
|
int selectedIndex = searchResultList.getSelectedIndex(); |
|
|
|
|
|
|
|
Object selectedValue = searchResultList.getSelectedValue(); |
|
|
|
|
|
|
|
if (e.getClickCount() == 2) { |
|
|
|
|
|
|
|
doNavigate(selectedIndex); |
|
|
|
|
|
|
|
if (selectedValue instanceof AlphaCellModel) { |
|
|
|
|
|
|
|
saveHistory((AlphaCellModel) selectedValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (e.getClickCount() == 1) { |
|
|
|
|
|
|
|
if (selectedValue instanceof MoreModel && ((MoreModel) selectedValue).isNeedMore()) { |
|
|
|
|
|
|
|
HandleMoreOrLessResult(selectedIndex, (MoreModel) selectedValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
*单击时触发右侧面板展示搜索结果 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchResultList.addListSelectionListener(new ListSelectionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void valueChanged(ListSelectionEvent e) { |
|
|
|
|
|
|
|
if (!e.getValueIsAdjusting()) { |
|
|
|
|
|
|
|
showResult(searchResultList.getSelectedIndex(), searchResultList.getSelectedValue()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 键盘监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchResultList.addKeyListener(new KeyAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
|
|
|
|
|
Object selectedValue = searchResultList.getSelectedValue(); |
|
|
|
|
|
|
|
doNavigate(searchResultList.getSelectedIndex()); |
|
|
|
|
|
|
|
if (searchResultList.getSelectedValue() instanceof AlphaCellModel) { |
|
|
|
|
|
|
|
saveHistory((AlphaCellModel) selectedValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showResult(int index, final Object selectedValue) { |
|
|
|
private void showResult(int index, final Object selectedValue) { |
|
|
|
if (selectedValue instanceof FileModel) { |
|
|
|
if (selectedValue instanceof FileModel) { |
|
|
|
final String fileName = ((FileModel) selectedValue).getFilePath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1); |
|
|
|
final String fileName = ((FileModel) selectedValue).getFilePath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1); |
|
|
|
showDefaultPreviewPane(); |
|
|
|
showDefaultPreviewPane(); |
|
|
|
if (fileName.endsWith(ProjectConstants.FRM_SUFFIX)) { |
|
|
|
if (fileName.endsWith(ProjectConstants.FRM_SUFFIX)) { |
|
|
|
if (this.searchWorker != null && !this.searchWorker.isDone()) { |
|
|
|
checkWorker(); |
|
|
|
this.searchWorker.cancel(true); |
|
|
|
this.showWorker = new SwingWorker<BufferedImage, Void>() { |
|
|
|
this.searchWorker = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.searchWorker = new SwingWorker<BufferedImage, Void>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected BufferedImage doInBackground() throws Exception { |
|
|
|
protected BufferedImage doInBackground() throws Exception { |
|
|
|
Form form = FormIO.readForm(FRContext.getCurrentEnv(), fileName); |
|
|
|
Form form = FormIO.readForm(FRContext.getCurrentEnv(), fileName); |
|
|
@ -522,13 +425,10 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.searchWorker.execute(); |
|
|
|
this.showWorker.execute(); |
|
|
|
} else if (fileName.endsWith(ProjectConstants.CPT_SUFFIX)) { |
|
|
|
} else if (fileName.endsWith(ProjectConstants.CPT_SUFFIX)) { |
|
|
|
if (this.searchWorker != null && !this.searchWorker.isDone()) { |
|
|
|
checkWorker(); |
|
|
|
this.searchWorker.cancel(true); |
|
|
|
this.showWorker = new SwingWorker<BufferedImage, Void>() { |
|
|
|
this.searchWorker = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.searchWorker = new SwingWorker<BufferedImage, Void>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected BufferedImage doInBackground() throws Exception { |
|
|
|
protected BufferedImage doInBackground() throws Exception { |
|
|
|
WorkBook workBook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCurrentEnv(), fileName); |
|
|
|
WorkBook workBook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(FRContext.getCurrentEnv(), fileName); |
|
|
@ -553,11 +453,10 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.searchWorker.execute(); |
|
|
|
this.showWorker.execute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else if (selectedValue instanceof DocumentModel) { |
|
|
|
} else if (selectedValue instanceof DocumentModel) { |
|
|
|
rightSearchResultPane.removeAll(); |
|
|
|
rightSearchResultPane.removeAll(); |
|
|
|
rightSearchResultPane.add(new DocumentPreviewPane(((DocumentModel) selectedValue).getName(), ((DocumentModel) selectedValue).getContent())); |
|
|
|
rightSearchResultPane.add(new DocumentPreviewPane(((DocumentModel) selectedValue).getName(), ((DocumentModel) selectedValue).getContent())); |
|
|
@ -565,18 +464,19 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
|
} else if (selectedValue instanceof PluginModel) { |
|
|
|
} else if (selectedValue instanceof PluginModel) { |
|
|
|
showDefaultPreviewPane(); |
|
|
|
showDefaultPreviewPane(); |
|
|
|
if (this.searchWorker != null && !this.searchWorker.isDone()) { |
|
|
|
checkWorker(); |
|
|
|
this.searchWorker.cancel(true); |
|
|
|
this.showWorker = new SwingWorker<Image, Void>() { |
|
|
|
this.searchWorker = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.searchWorker = new SwingWorker<Image, Void>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Image doInBackground() { |
|
|
|
protected Image doInBackground() { |
|
|
|
BufferedImage bufferedImage = null; |
|
|
|
BufferedImage bufferedImage = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
bufferedImage = ImageIO.read(new URL(((PluginModel) selectedValue).getImageUrl())); |
|
|
|
bufferedImage = ImageIO.read(new URL(((PluginModel) selectedValue).getImageUrl())); |
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
bufferedImage = IOUtils.readImage("/com/fr/design/mainframe/alphafine/images/default_product.png"); |
|
|
|
try { |
|
|
|
|
|
|
|
bufferedImage = ImageIO.read(getClass().getResource("/com/fr/design/mainframe/alphafine/images/default_product.png")); |
|
|
|
|
|
|
|
} catch (IOException e1) { |
|
|
|
|
|
|
|
FRLogger.getLogger().error(e.getMessage()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return bufferedImage; |
|
|
|
return bufferedImage; |
|
|
|
} |
|
|
|
} |
|
|
@ -598,7 +498,7 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.searchWorker.execute(); |
|
|
|
this.showWorker.execute(); |
|
|
|
|
|
|
|
|
|
|
|
} else if (selectedValue instanceof ActionModel) { |
|
|
|
} else if (selectedValue instanceof ActionModel) { |
|
|
|
rightSearchResultPane.removeAll(); |
|
|
|
rightSearchResultPane.removeAll(); |
|
|
@ -609,6 +509,16 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 检查 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void checkWorker() { |
|
|
|
|
|
|
|
if (this.showWorker != null && !this.showWorker.isDone()) { |
|
|
|
|
|
|
|
this.showWorker.cancel(true); |
|
|
|
|
|
|
|
this.showWorker = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void HandleMoreOrLessResult(int index, MoreModel selectedValue) { |
|
|
|
private void HandleMoreOrLessResult(int index, MoreModel selectedValue) { |
|
|
|
if (selectedValue.getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowAll"))) { |
|
|
|
if (selectedValue.getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowAll"))) { |
|
|
|
selectedValue.setContent(Inter.getLocText("FR-Designer_AlphaFine_ShowLess")); |
|
|
|
selectedValue.setContent(Inter.getLocText("FR-Designer_AlphaFine_ShowLess")); |
|
|
@ -622,38 +532,106 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
private void showDefaultPreviewPane() { |
|
|
|
private void showDefaultPreviewPane() { |
|
|
|
rightSearchResultPane.removeAll(); |
|
|
|
rightSearchResultPane.removeAll(); |
|
|
|
UILabel label = new UILabel(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/opening.gif")); |
|
|
|
UILabel label = new UILabel(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/opening.gif"))); |
|
|
|
label.setBorder(BorderFactory.createEmptyBorder(120,0,0,0)); |
|
|
|
label.setBorder(BorderFactory.createEmptyBorder(120, 0, 0, 0)); |
|
|
|
rightSearchResultPane.add(label, BorderLayout.CENTER); |
|
|
|
rightSearchResultPane.add(label, BorderLayout.CENTER); |
|
|
|
validate(); |
|
|
|
validate(); |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initListener() { |
|
|
|
/** |
|
|
|
|
|
|
|
* 为面板添加全局监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initGlobalListener() { |
|
|
|
initAWTEventListener(); |
|
|
|
initAWTEventListener(); |
|
|
|
|
|
|
|
|
|
|
|
initMouseListener(); |
|
|
|
initMouseListener(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 为面板中各组件添加监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initListListener() { |
|
|
|
|
|
|
|
initListMouseListener(); |
|
|
|
|
|
|
|
initListKeyListener(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initListKeyListener() { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 为list添加键盘监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchResultList.addKeyListener(new KeyAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
|
|
|
|
|
Object selectedValue = searchResultList.getSelectedValue(); |
|
|
|
|
|
|
|
doNavigate(searchResultList.getSelectedIndex()); |
|
|
|
|
|
|
|
if (searchResultList.getSelectedValue() instanceof AlphaCellModel) { |
|
|
|
|
|
|
|
saveHistory((AlphaCellModel) selectedValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 为textField添加键盘监听器,按上下方向键时把焦点给list,实现键盘操作 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchTextField.addKeyListener(new KeyAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_UP) { |
|
|
|
|
|
|
|
searchResultList.requestFocus(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initListMouseListener() { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 鼠标监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchResultList.addMouseListener(new MouseAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
|
|
|
int selectedIndex = searchResultList.getSelectedIndex(); |
|
|
|
|
|
|
|
Object selectedValue = searchResultList.getSelectedValue(); |
|
|
|
|
|
|
|
if (e.getClickCount() == 2) { |
|
|
|
|
|
|
|
doNavigate(selectedIndex); |
|
|
|
|
|
|
|
if (selectedValue instanceof AlphaCellModel) { |
|
|
|
|
|
|
|
saveHistory((AlphaCellModel) selectedValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (e.getClickCount() == 1) { |
|
|
|
|
|
|
|
if (selectedValue instanceof MoreModel && ((MoreModel) selectedValue).isNeedMore()) { |
|
|
|
|
|
|
|
HandleMoreOrLessResult(selectedIndex, (MoreModel) selectedValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
*单击时触发右侧面板展示搜索结果 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
searchResultList.addListSelectionListener(new ListSelectionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void valueChanged(ListSelectionEvent e) { |
|
|
|
|
|
|
|
if (!e.getValueIsAdjusting()) { |
|
|
|
|
|
|
|
showResult(searchResultList.getSelectedIndex(), searchResultList.getSelectedValue()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 窗口拖拽 |
|
|
|
* 窗口拖拽 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void initMouseListener() { |
|
|
|
private void initMouseListener() { |
|
|
|
|
|
|
|
|
|
|
|
addMouseMotionListener(new MouseMotionAdapter() { |
|
|
|
addMouseMotionListener(new MouseMotionAdapter() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
|
|
|
|
|
|
|
|
doMouseDragged(e); |
|
|
|
doMouseDragged(e); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
addMouseListener(new MouseAdapter() { |
|
|
|
addMouseListener(new MouseAdapter() { |
|
|
|
|
|
|
|
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
|
|
|
|
|
|
|
doMousePressed(e); |
|
|
|
doMousePressed(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -795,7 +773,6 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
* @param selectedValue |
|
|
|
* @param selectedValue |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void rebuildShowMoreList(int index, MoreModel selectedValue) { |
|
|
|
private void rebuildShowMoreList(int index, MoreModel selectedValue) { |
|
|
|
|
|
|
|
|
|
|
|
SearchResult moreResult = getMoreResult(selectedValue); |
|
|
|
SearchResult moreResult = getMoreResult(selectedValue); |
|
|
|
if ((selectedValue).getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowLess"))) { |
|
|
|
if ((selectedValue).getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowLess"))) { |
|
|
|
for (int i = 0; i < moreResult.size(); i++) { |
|
|
|
for (int i = 0; i < moreResult.size(); i++) { |
|
|
@ -861,12 +838,10 @@ public class AlphaFineDialog extends UIDialog { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isForceOpen() { |
|
|
|
public boolean isForceOpen() { |
|
|
|
|
|
|
|
|
|
|
|
return forceOpen; |
|
|
|
return forceOpen; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setForceOpen(boolean forceOpen) { |
|
|
|
public void setForceOpen(boolean forceOpen) { |
|
|
|
|
|
|
|
|
|
|
|
this.forceOpen = forceOpen; |
|
|
|
this.forceOpen = forceOpen; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|