|
|
@ -367,23 +367,7 @@ public class AlphaFineFrame extends JFrame { |
|
|
|
|
|
|
|
|
|
|
|
JPanel tabPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 20, 10)); |
|
|
|
JPanel tabPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 20, 10)); |
|
|
|
tabPane.setBackground(Color.WHITE); |
|
|
|
tabPane.setBackground(Color.WHITE); |
|
|
|
List<SelectedLabel> selectedLabelList = new ArrayList<>(); |
|
|
|
List<SelectedLabel> selectedLabelList = createSelectedLabelList(); |
|
|
|
AlphaFineConfigManager alphaFineConfigManager = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager(); |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isProductDynamics()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(PRODUCT_NEWS, CellType.PRODUCT_NEWS, true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainAction()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(SETTING, CellType.ACTION)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainFileContent() || alphaFineConfigManager.isContainTemplate()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(TEMPLATES, CellType.FILE)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainDocument()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(HELP, CellType.DOCUMENT)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainPlugin()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(PLUGIN, CellType.PLUGIN)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
selectedType = selectedLabelList.get(0).getCellType(); |
|
|
|
selectedType = selectedLabelList.get(0).getCellType(); |
|
|
|
// 第一个tab 非产品动态
|
|
|
|
// 第一个tab 非产品动态
|
|
|
|
if (selectedType != CellType.PRODUCT_NEWS) { |
|
|
|
if (selectedType != CellType.PRODUCT_NEWS) { |
|
|
@ -391,8 +375,18 @@ public class AlphaFineFrame extends JFrame { |
|
|
|
readLabel.setVisible(false); |
|
|
|
readLabel.setVisible(false); |
|
|
|
} |
|
|
|
} |
|
|
|
for (SelectedLabel selectedLabel : selectedLabelList) { |
|
|
|
for (SelectedLabel selectedLabel : selectedLabelList) { |
|
|
|
|
|
|
|
selectedLabel.addMouseListener(createMouseListener(selectedLabelList, selectedLabel, tabPane, tabLabel, readLabel)); |
|
|
|
|
|
|
|
tabPane.add(selectedLabel); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
showPane.add(tabPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
showPane.add(labelPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
showPane.add(resultPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
return showPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
selectedLabel.addMouseListener(new MouseAdapter() { |
|
|
|
private MouseAdapter createMouseListener(List<SelectedLabel> selectedLabelList, SelectedLabel selectedLabel, |
|
|
|
|
|
|
|
JPanel tabPane, UILabel tabLabel, UILabel readLabel) { |
|
|
|
|
|
|
|
return new MouseAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
for (SelectedLabel label : selectedLabelList) { |
|
|
|
for (SelectedLabel label : selectedLabelList) { |
|
|
@ -450,13 +444,28 @@ public class AlphaFineFrame extends JFrame { |
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
selectedLabel.setForeground(defaultColor); |
|
|
|
selectedLabel.setForeground(defaultColor); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
tabPane.add(selectedLabel); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
showPane.add(tabPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
showPane.add(labelPane, BorderLayout.CENTER); |
|
|
|
private List<SelectedLabel> createSelectedLabelList() { |
|
|
|
showPane.add(resultPane, BorderLayout.SOUTH); |
|
|
|
List<SelectedLabel> selectedLabelList = new ArrayList<>(); |
|
|
|
return showPane; |
|
|
|
AlphaFineConfigManager alphaFineConfigManager = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager(); |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isProductDynamics()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(PRODUCT_NEWS, CellType.PRODUCT_NEWS, true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainAction()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(SETTING, CellType.ACTION)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainFileContent() || alphaFineConfigManager.isContainTemplate()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(TEMPLATES, CellType.FILE)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainDocument()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(HELP, CellType.DOCUMENT)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (alphaFineConfigManager.isContainPlugin()) { |
|
|
|
|
|
|
|
selectedLabelList.add(new SelectedLabel(PLUGIN, CellType.PLUGIN)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return selectedLabelList; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void fireOneClickRead() { |
|
|
|
private void fireOneClickRead() { |
|
|
@ -699,7 +708,7 @@ public class AlphaFineFrame extends JFrame { |
|
|
|
} else if (searchText.startsWith(DS_MARK)) { |
|
|
|
} else if (searchText.startsWith(DS_MARK)) { |
|
|
|
return new SearchTextBean(getStoreText(searchText), new String[]{DS_NAME + getStoreText(searchText)}); |
|
|
|
return new SearchTextBean(getStoreText(searchText), new String[]{DS_NAME + getStoreText(searchText)}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return new SearchTextBean(searchText, segmentationResult); |
|
|
|
return new SearchTextBean(searchText, segmentationResult == null ? new String[]{} : segmentationResult); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|