|
|
|
@ -156,6 +156,18 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
|
|
|
|
|
private JPanel tabPane; |
|
|
|
|
|
|
|
|
|
private JPanel labelPane; |
|
|
|
|
|
|
|
|
|
private JPanel labelContentPane; |
|
|
|
|
|
|
|
|
|
private JPanel labelEastPane; |
|
|
|
|
|
|
|
|
|
private JPanel labelWestPane; |
|
|
|
|
|
|
|
|
|
private UILabel tabLabel; |
|
|
|
|
|
|
|
|
|
private UILabel readLabel; |
|
|
|
|
|
|
|
|
|
private SelectedLabel selectedTab; |
|
|
|
|
|
|
|
|
|
private String beforeSearchStr = StringUtils.EMPTY; |
|
|
|
@ -422,20 +434,21 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// label区,border layout
|
|
|
|
|
JPanel labelPane = new JPanel(new BorderLayout()); |
|
|
|
|
labelPane = new JPanel(new BorderLayout()); |
|
|
|
|
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20)); |
|
|
|
|
labelPane.setBackground(Color.WHITE); |
|
|
|
|
JPanel labelContentPane = new JPanel(new BorderLayout()); |
|
|
|
|
UILabel tabLabel = new UILabel(PRODUCT_NEWS); |
|
|
|
|
labelContentPane = new JPanel(new BorderLayout()); |
|
|
|
|
tabLabel = new UILabel(PRODUCT_NEWS); |
|
|
|
|
tabLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); |
|
|
|
|
tabLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); |
|
|
|
|
tabLabel.setPreferredSize(new Dimension(100, 30)); |
|
|
|
|
JPanel westPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
westPane.add(tabLabel); |
|
|
|
|
labelContentPane.add(westPane, BorderLayout.WEST); |
|
|
|
|
JPanel eastPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0)); |
|
|
|
|
tabLabel.setPreferredSize(new Dimension(60, 30)); |
|
|
|
|
tabLabel.setForeground(AlphaFineConstants.LABEL_SELECTED); |
|
|
|
|
labelWestPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
labelWestPane.add(tabLabel); |
|
|
|
|
labelContentPane.add(labelWestPane, BorderLayout.WEST); |
|
|
|
|
labelEastPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0)); |
|
|
|
|
// 一键已读
|
|
|
|
|
UILabel readLabel = new UILabel(ONE_CLICK_READ); |
|
|
|
|
readLabel = new UILabel(ONE_CLICK_READ); |
|
|
|
|
readLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
|
|
|
|
readLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));; |
|
|
|
|
readLabel.setPreferredSize(new Dimension(100, 30)); |
|
|
|
@ -447,8 +460,8 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
showPane.repaint(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
eastPane.add(readLabel); |
|
|
|
|
labelContentPane.add(eastPane, BorderLayout.EAST); |
|
|
|
|
labelEastPane.add(readLabel); |
|
|
|
|
labelContentPane.add(labelEastPane, BorderLayout.EAST); |
|
|
|
|
labelContentPane.setBackground(new Color(245, 245, 247)); |
|
|
|
|
labelPane.add(labelContentPane); |
|
|
|
|
labelPane.setPreferredSize(new Dimension(AlphaFineConstants.FULL_SIZE.width, 30)); |
|
|
|
@ -478,6 +491,14 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
return showPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public JPanel getLabelWestPane() { |
|
|
|
|
return labelWestPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public UILabel getTabLabel() { |
|
|
|
|
return tabLabel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private MouseAdapter createMouseListener(List<SelectedLabel> selectedLabelList, SelectedLabel selectedLabel, |
|
|
|
|
JPanel tabPane, UILabel tabLabel, UILabel readLabel) { |
|
|
|
|
return new MouseAdapter() { |
|
|
|
@ -499,6 +520,9 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
tabLabel.setText(selectedLabel.getText()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 刷新westlabelpane
|
|
|
|
|
refreshLabelPane(); |
|
|
|
|
|
|
|
|
|
// 将已读设置不可见
|
|
|
|
|
readLabel.setVisible(false); |
|
|
|
|
|
|
|
|
@ -562,6 +586,11 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void refreshLabelPane() { |
|
|
|
|
labelWestPane.removeAll(); |
|
|
|
|
labelWestPane.add(tabLabel); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<SelectedLabel> createSelectedLabelList() { |
|
|
|
|
List<SelectedLabel> selectedLabelList = new ArrayList<>(); |
|
|
|
|
AlphaFineConfigManager alphaFineConfigManager = DesignerEnvManager.getEnvManager().getAlphaFineConfigManager(); |
|
|
|
@ -832,6 +861,7 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doSearch(String text) { |
|
|
|
|
refreshLabelPane(); |
|
|
|
|
initSearchLoadingPane(); |
|
|
|
|
SearchTextBean searchTextBean = generateSearchTextBean(text); |
|
|
|
|
this.productNewsSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
@ -954,6 +984,7 @@ public class AlphaFineFrame extends JFrame {
|
|
|
|
|
@Override |
|
|
|
|
public void setVisible(boolean b) { |
|
|
|
|
super.setVisible(b); |
|
|
|
|
switchTab(selectedTab.getCellType(), readLabel); |
|
|
|
|
QuestionWindow.getInstance().setVisible(!b); |
|
|
|
|
if (!b) { |
|
|
|
|
AlphaFineHelper.resetAlphaFineDialog(); |
|
|
|
|