Browse Source

REPORT-79093 运营产品化二期(遗留)

1、格式化代码
feature/x
Link.Zhao 2 years ago
parent
commit
8db8b207d2
  1. 42
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
  2. 3
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/CustomSortPane.java
  3. 13
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/MenuLabel.java
  4. 3
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/MenuLabelPane.java
  5. 5
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/RecommendSearchLabel.java
  6. 3
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/SearchHintPane.java
  7. 3
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/DefaultContentPane.java
  8. 6
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/DefaultPluginContentPane.java
  9. 5
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/SearchProviderRegistry.java

42
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java

@ -29,6 +29,7 @@ import java.util.Stack;
*/
public class AlphaFineConfigManager implements XMLable {
public static final String COMMA = ",";
private static final long serialVersionUID = -8170289826729582122L;
private static AlphaFineConfigManager alphaFineConfigManager = new AlphaFineConfigManager();
/**
@ -91,27 +92,20 @@ public class AlphaFineConfigManager implements XMLable {
* 是否提醒
*/
private boolean needRemind = true;
/**
* 产品动态
*/
private boolean productDynamics = true;
/**
* 模板商城是否展示
* */
*/
private boolean showTemplateShop = true;
/**
* tab页排序
* 默认排序动态模板商城帮助文档插件中心功能我的模板
* */
*/
private String[] tabOrder;
public static final String COMMA = ",";
private Map<String, String> actionSearchTextCache = new HashMap<>(8);
private String cacheBuildNO;
@ -329,7 +323,7 @@ public class AlphaFineConfigManager implements XMLable {
/**
* 返回默认排序
* */
*/
private String getDefaultTabOrder() {
return AlphaFineConstants.PRODUCT_NEWS + COMMA + AlphaFineConstants.TEMPLATE_SHOP + COMMA + AlphaFineConstants.HELP + COMMA + AlphaFineConstants.PLUGIN + COMMA + AlphaFineConstants.FUNCTION + COMMA + AlphaFineConstants.MY_TEMPLATES;
}
@ -350,14 +344,14 @@ public class AlphaFineConfigManager implements XMLable {
this.containDocument = containDocument;
}
public void setContainMyTemplate(boolean containMyTemplate) {
this.containMyTemplate = containMyTemplate;
}
public boolean isContainMyTemplate() {
return containMyTemplate;
}
public void setContainMyTemplate(boolean containMyTemplate) {
this.containMyTemplate = containMyTemplate;
}
public boolean isContainTemplate() {
return containTemplate;
}
@ -478,6 +472,10 @@ public class AlphaFineConfigManager implements XMLable {
return productDynamics && FRContext.isChineseEnv();
}
public void setProductDynamics(boolean productDynamics) {
this.productDynamics = productDynamics;
}
public boolean hasTemplateShop() {
return showTemplateShop && FRContext.isChineseEnv();
}
@ -486,13 +484,9 @@ public class AlphaFineConfigManager implements XMLable {
this.showTemplateShop = showTemplateShop;
}
public void setProductDynamics(boolean productDynamics) {
this.productDynamics = productDynamics;
}
/**
* 返回tab显示顺序
* */
*/
public String[] getTabOrder() {
if (tabOrder == null) {
tabOrder = getDefaultTabOrder().split(COMMA);
@ -500,9 +494,13 @@ public class AlphaFineConfigManager implements XMLable {
return tabOrder;
}
public void setTabOrder(String[] tabOrder) {
this.tabOrder = tabOrder;
}
/**
* getTabOrder的tostring
* */
*/
public String getTabOrderString() {
StringBuilder sb = new StringBuilder();
for (String s : getTabOrder()) {
@ -510,8 +508,4 @@ public class AlphaFineConfigManager implements XMLable {
}
return sb.toString();
}
public void setTabOrder(String[] tabOrder) {
this.tabOrder = tabOrder;
}
}

3
designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/CustomSortPane.java

@ -24,10 +24,11 @@ import java.util.Map;
import java.util.function.Function;
/**
* alphafine设置 - 搜索范围 - 自定义排序 - 弹出面板
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* alphafine设置 - 搜索范围 - 自定义排序 - 弹出面板
*/
public class CustomSortPane extends JPanel {

13
designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/MenuLabel.java

@ -13,10 +13,11 @@ import java.awt.event.MouseListener;
import java.util.function.Function;
/**
* 菜单选项label
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* 菜单选项label
*/
public class MenuLabel extends UILabel {
@ -27,7 +28,7 @@ public class MenuLabel extends UILabel {
private static final int WIDTH = 147;
private MenuLabelPane parentMenu;
private Function function;
private final Function function;
private boolean selected;
public MenuLabel(String text, Function function) {
@ -51,6 +52,10 @@ public class MenuLabel extends UILabel {
this.setFont(DesignUtils.getDefaultGUIFont().applySize(12));
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
if (selected) {
parentMenu.setNoneSelected();
@ -63,10 +68,6 @@ public class MenuLabel extends UILabel {
}
}
public boolean isSelected() {
return selected;
}
MouseListener createMouseListener() {
return new MouseAdapter() {
@Override

3
designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/MenuLabelPane.java

@ -5,10 +5,11 @@ import java.awt.FlowLayout;
import java.util.List;
/**
* 简单菜单面板
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* 简单菜单面板
*/
public class MenuLabelPane extends JPanel {

5
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/RecommendSearchLabel.java

@ -12,10 +12,11 @@ import java.awt.event.MouseEvent;
import java.util.List;
/**
* alphaFine - 推荐搜索词标签
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/19
* alphaFine - 推荐搜索词标签
*/
public class RecommendSearchLabel extends JPanel {
@ -36,7 +37,7 @@ public class RecommendSearchLabel extends JPanel {
/**
* 推荐搜索词绑定alphaFine搜索事件
* */
*/
public class SearchKeyLabel extends JLabel {
String searchKey;

3
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/SearchHintPane.java

@ -20,10 +20,11 @@ import java.util.ArrayList;
import java.util.List;
/**
* alphafine - 搜索提示面板
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* alphafine - 搜索提示面板
*/
public class SearchHintPane extends JPanel {

3
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/DefaultContentPane.java

@ -11,10 +11,11 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* alphaFine - 默认展示页面
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* alphaFine - 默认展示页面
*/
public class DefaultContentPane extends JPanel {

6
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/DefaultPluginContentPane.java

@ -16,19 +16,19 @@ import java.util.ArrayList;
import java.util.List;
/**
* alphafine插件默认页
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* alphafine插件默认页
*/
public class DefaultPluginContentPane extends DefaultContentPane {
private static final String[] HINTS = CloudCenter.getInstance().acquireConf("alphafine.plugin.recommend", "JS,API,JSON").split(",");
// 左边展示内容,右边展示搜索提示
private SearchWorkerManager searchWorkerManager;
private CellType cellType;
private static final String[] HINTS = CloudCenter.getInstance().acquireConf("alphafine.plugin.recommend", "JS,API,JSON").split(",");
public DefaultPluginContentPane(CellType cellType, AlphaFineFrame parentWindow) {
super();
this.setLayout(new BorderLayout());

5
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/SearchProviderRegistry.java

@ -10,10 +10,11 @@ import java.util.HashMap;
import java.util.Map;
/**
* alphafine搜索提供者注册到这里
*
* @author Link
* @version 11.0
* Created by Link on 2022/9/18
* alphafine搜索提供者注册到这里
*/
public class SearchProviderRegistry {
private static Map<CellType, AlphaFineSearchProvider> map;
@ -27,7 +28,7 @@ public class SearchProviderRegistry {
/**
* 根据celltype获得对应searchProvider
* */
*/
public static AlphaFineSearchProvider getSearchProvider(CellType cellType) {
return map.get(cellType);
}

Loading…
Cancel
Save