Browse Source

Pull request #2582: 解决冲突

Merge in DESIGN/design from ~BJORN/design:feature/10.0 to feature/10.0

* commit 'fb0ee28e8bad4ef96d33a4ae76975d3c64ca1e64':
  REPORT-38778 去掉社区和模板商城的小红点,修正使用工厂类引起的bug,修改预装组件的逻辑
  CHART-15747  修改其他交互属性,导致条件属性中的系列名勾选被去掉
  CHART-16117 选择富文本编辑器时,不应设置dirty
  填充面板时更新初始参数
  CHART-15948 富文本编辑器默认内容
  MOBILE-29637 & MOBILE-29634【设计器】tab手势设计变更,取消滑动设置与圆点指示器设置的关联关系 & 【RN】release jar,默认样式tab标题字号变小了
  CHART-16116 修改气泡图散点图标签HTMl组件
  CHART-16097 柱形图选择富文本时,文本方向灰化
  REPORT-38778 修改接口描述。添加了SnapChat的工厂
  REPORT-38778 格式化
  REPORT-38778 代码调整,去掉无用import
  REPORT-38778 1.新用户的小红点、弹窗提示; 2.去掉菜单项 3.新用户预装组件
  CHART-16111 富文本字符样式切换时不保留content
research/11.0
ju.ju 4 years ago
parent
commit
5bf7ec1571
  1. 54
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  2. 20
      designer-base/src/main/java/com/fr/design/mainframe/PromptWindow.java
  3. 20
      designer-base/src/main/java/com/fr/design/mainframe/PropertyItemBean.java
  4. 7
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  5. 35
      designer-base/src/main/java/com/fr/design/menu/SnapChatMenuDef.java
  6. 25
      designer-base/src/main/java/com/fr/design/menu/SnapChatUpdateAction.java
  7. 29
      designer-base/src/main/java/com/fr/design/menu/SnapChatUtil.java
  8. 22
      designer-base/src/main/java/com/fr/design/notification/AbstractSnapChat.java
  9. 4
      designer-base/src/main/java/com/fr/design/notification/SnapChat.java
  10. 32
      designer-base/src/main/java/com/fr/design/notification/SnapChatFactory.java
  11. 9
      designer-base/src/main/java/com/fr/design/notification/SnapChatKey.java
  12. 2
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java
  13. 22
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java
  14. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java
  15. 30
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  16. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java
  17. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  18. 6
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java
  19. 10
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java
  20. 2
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/tooltip/VanChartGanttTooltipContentPane.java
  21. 3
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterLabelContentPane.java
  22. 2
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java
  23. 2
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java
  24. 37
      designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html
  25. 2
      designer-chart/src/main/resources/com/fr/design/editor/script/editor.js
  26. 8
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

54
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -12,6 +12,8 @@ import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.gui.icontainer.UIEastResizableContainer; import com.fr.design.gui.icontainer.UIEastResizableContainer;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.menu.SnapChatUtil;
import com.fr.design.notification.SnapChat;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.design.utils.gui.GUIPaintUtils;
@ -171,7 +173,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
updateAllPropertyPane(); updateAllPropertyPane();
} }
}); } });
}
}, filter); }, filter);
PluginListenerRegistration.getInstance().listen( PluginListenerRegistration.getInstance().listen(
PluginEventType.BeforeStop, PluginEventType.BeforeStop,
@ -221,11 +224,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
String key = provider.key(); String key = provider.key();
PropertyItemBean itemBean = provider.getItem(); PropertyItemBean itemBean = provider.getItem();
PropertyItem propertyItem = new PropertyItem(itemBean.getName(), PropertyItem propertyItem = new PropertyItem(itemBean.getName(),
itemBean.getTitle(), itemBean.getTitle(),
itemBean.getBtnIconName(), itemBean.getBtnIconName(),
itemBean.getBtnIconBaseDir(), itemBean.getBtnIconBaseDir(),
itemBean.getVisibleModes(), itemBean.getVisibleModes(),
itemBean.getEnableModes()); itemBean.getEnableModes(),
itemBean.getSnapChat(),
itemBean.getPromptWindow());
UIButton button = propertyItem.getButton(); UIButton button = propertyItem.getButton();
List<ActionListener> buttonListeners = itemBean.getButtonListeners(); List<ActionListener> buttonListeners = itemBean.getButtonListeners();
if (buttonListeners != null) { if (buttonListeners != null) {
@ -324,6 +329,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
cellElement.popupDialog.showDefaultPane(); cellElement.popupDialog.showDefaultPane();
} }
} }
// 禁用单元格元素tab // 禁用单元格元素tab
private void enableCellElementPane(PropertyItem cellElement) { private void enableCellElementPane(PropertyItem cellElement) {
cellElement.setEnabled(true); cellElement.setEnabled(true);
@ -381,7 +387,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
/** /**
* 可通过此方法判断当前的编辑模式 * 可通过此方法判断当前的编辑模式
* */ */
public PropertyMode getCurrentMode() { public PropertyMode getCurrentMode() {
return currentMode; return currentMode;
} }
@ -527,7 +533,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceHeaderPane(paraPane); propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceHeaderPane(paraPane);
} }
public static void main(String[] args){ public static void main(String[] args) {
JFrame jf = new JFrame("test"); JFrame jf = new JFrame("test");
// jf = new JFrame("test"); // jf = new JFrame("test");
@ -549,7 +555,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// leftPane.add(b2); // leftPane.add(b2);
// leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS)); // leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS));
JPanel content = (JPanel)jf.getContentPane(); JPanel content = (JPanel) jf.getContentPane();
// content.setLayout(null); // content.setLayout(null);
content.add(cc, BorderLayout.CENTER); content.add(cc, BorderLayout.CENTER);
content.add(new EastRegionContainerPane(), BorderLayout.EAST); content.add(new EastRegionContainerPane(), BorderLayout.EAST);
@ -657,6 +663,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
class PropertyItem { class PropertyItem {
private SnapChat snapChat;
private UIButton button; private UIButton button;
private String name; // 用于 card 切换 private String name; // 用于 card 切换
private String title; // 用于显示 private String title; // 用于显示
@ -667,6 +674,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private FixedPopupPane popupPane; // 左侧固定弹出框 private FixedPopupPane popupPane; // 左侧固定弹出框
private PopupToolPane popupToolPane; // 弹出工具条 private PopupToolPane popupToolPane; // 弹出工具条
private PopupDialog popupDialog; // 弹出框 private PopupDialog popupDialog; // 弹出框
private PromptWindow promptWindow; //提示窗
private boolean isPoppedOut = false; // 是否弹出 private boolean isPoppedOut = false; // 是否弹出
private boolean isVisible = true; // 是否可见 private boolean isVisible = true; // 是否可见
private boolean replace = false; // 是否被替代 private boolean replace = false; // 是否被替代
@ -687,14 +695,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) { public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) {
this(name, title, btnIconName, ICON_BASE_DIR, visibleModes, enableModes); this(name, title, btnIconName, ICON_BASE_DIR, visibleModes, enableModes, null, null);
} }
public PropertyItem(String name, String title, String btnIconName, String iconBaseDir, PropertyMode[] visibleModes, PropertyMode[] enableModes) { public PropertyItem(String name, String title, String btnIconName, String iconBaseDir, PropertyMode[] visibleModes, PropertyMode[] enableModes, SnapChat snapChat, PromptWindow promptWindow) {
this.name = name; this.name = name;
this.title = title; this.title = title;
this.btnIconName = btnIconName; this.btnIconName = btnIconName;
this.iconBaseDir = iconBaseDir; this.iconBaseDir = iconBaseDir;
this.snapChat = snapChat;
this.promptWindow = promptWindow;
initButton(); initButton();
initPropertyPanel(); initPropertyPanel();
initModes(visibleModes, enableModes); initModes(visibleModes, enableModes);
@ -835,7 +845,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
if (isRightPaneVisible()) { if (isRightPaneVisible()) {
hideCurrentPopupPane(); hideCurrentPopupPane();
replaceContentPane(contentPane); replaceContentPane(contentPane);
} else if(popupPane != null && popupPane.isVisible()) { } else if (popupPane != null && popupPane.isVisible()) {
popupPane.replaceContentPane(contentArea); popupPane.replaceContentPane(contentArea);
} }
} }
@ -872,9 +882,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(TAB_BUTTON_WIDTH, TAB_BUTTON_HEIGHT); return new Dimension(TAB_BUTTON_WIDTH, TAB_BUTTON_HEIGHT);
} }
@Override @Override
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
if (snapChat != null && !snapChat.hasRead()) {
SnapChatUtil.paintPropertyItemPoint(g, getBounds());
}
} }
}; };
button.set4LargeToolbarButton(); button.set4LargeToolbarButton();
@ -902,6 +916,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupFixedPane(); popupFixedPane();
} }
setTabButtonSelected(); setTabButtonSelected();
if (snapChat != null && !snapChat.hasRead()) {
snapChat.markRead();
if (promptWindow != null) {
promptWindow.showWindow();
}
}
} }
}); });
button.setToolTipText(title); button.setToolTipText(title);
@ -1015,8 +1035,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
/** /**
* @Description:刷新currentPopupPane面板位置当设计器缩放时会调用这个函数
* @param * @param
* @Description:刷新currentPopupPane面板位置当设计器缩放时会调用这个函数
* @return: * @return:
* @Author: Henry.Wang * @Author: Henry.Wang
* @date: 2020/7/30 11:39 * @date: 2020/7/30 11:39
@ -1031,8 +1051,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
/** /**
* @Description:清空currentPopupPane数据当切换模板时会调用这个函数
* @param * @param
* @Description:清空currentPopupPane数据当切换模板时会调用这个函数
* @return: * @return:
* @Author: Henry.Wang * @Author: Henry.Wang
* @date: 2020/7/30 11:42 * @date: 2020/7/30 11:42
@ -1071,12 +1091,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
repaint(); repaint();
} }
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getX() >= ARROW_RANGE_START) { if (e.getX() >= ARROW_RANGE_START) {
onPop(); onPop();
} }
} }
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
mouseDownCompCoords = null; mouseDownCompCoords = null;
@ -1084,6 +1106,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
contentPane.setBackground(originColor); contentPane.setBackground(originColor);
} }
} }
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (e.getX() < ARROW_RANGE_START) { if (e.getX() < ARROW_RANGE_START) {
@ -1105,6 +1128,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
repaint(); repaint();
} }
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (isMovable && mouseDownCompCoords != null) { if (isMovable && mouseDownCompCoords != null) {
@ -1217,6 +1241,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private Container contentPane; private Container contentPane;
private JPanel defaultPane; // 无可用配置项 private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem; private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) { public PopupDialog(PropertyItem propertyItem) {
super(DesignerContext.getDesignerFrame()); super(DesignerContext.getDesignerFrame());
container = getContentPane(); container = getContentPane();
@ -1319,6 +1344,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
mouseDownCompCoords = e.getLocationOnScreen(); mouseDownCompCoords = e.getLocationOnScreen();
} }
} }
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
mouseDownCompCoords = null; mouseDownCompCoords = null;

20
designer-base/src/main/java/com/fr/design/mainframe/PromptWindow.java

@ -0,0 +1,20 @@
package com.fr.design.mainframe;
import javax.swing.JWindow;
/**
* @Author: Yuan.Wang
* @Date: 2020/10/9
* 只关心Window的显示和隐藏操作时可以实现该接口
*/
public interface PromptWindow {
/**
* 显示弹窗
*/
void showWindow();
/**
* 隐藏弹窗
*/
void hideWindow();
}

20
designer-base/src/main/java/com/fr/design/mainframe/PropertyItemBean.java

@ -1,5 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.design.notification.SnapChat;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.List; import java.util.List;
@ -12,6 +14,8 @@ public class PropertyItemBean {
private String title; private String title;
private String btnIconName; private String btnIconName;
private String btnIconBaseDir; private String btnIconBaseDir;
private SnapChat snapChat;
private PromptWindow promptWindow;
private EastRegionContainerPane.PropertyMode[] visibleModes; private EastRegionContainerPane.PropertyMode[] visibleModes;
private EastRegionContainerPane.PropertyMode[] enableModes; private EastRegionContainerPane.PropertyMode[] enableModes;
private List<ActionListener> buttonListeners; private List<ActionListener> buttonListeners;
@ -52,6 +56,22 @@ public class PropertyItemBean {
this.btnIconBaseDir = btnIconBaseDir; this.btnIconBaseDir = btnIconBaseDir;
} }
public SnapChat getSnapChat() {
return snapChat;
}
public void setSnapChat(SnapChat snapChat) {
this.snapChat = snapChat;
}
public PromptWindow getPromptWindow() {
return promptWindow;
}
public void setPromptWindow(PromptWindow promptWindow) {
this.promptWindow = promptWindow;
}
public EastRegionContainerPane.PropertyMode[] getVisibleModes() { public EastRegionContainerPane.PropertyMode[] getVisibleModes() {
return visibleModes; return visibleModes;
} }

7
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -54,9 +54,7 @@ import com.fr.design.mainframe.ToolBarNewTemplatePane;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.SnapChatMenuDef;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.notification.SnapChatAllTypes;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.remote.action.RemoteDesignAuthManagerAction; import com.fr.design.remote.action.RemoteDesignAuthManagerAction;
import com.fr.design.update.actions.SoftwareUpdateAction; import com.fr.design.update.actions.SoftwareUpdateAction;
@ -656,10 +654,7 @@ public abstract class ToolBarMenuDock {
public MenuDef createCommunityMenuDef() { public MenuDef createCommunityMenuDef() {
MenuDef menuDef = new SnapChatMenuDef( MenuDef menuDef = new MenuDef(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community"), 'C');
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community"),
'C',
SnapChatAllTypes.Menu.BBS);
ShortCut[] otherCommunityShortCuts = createCommunityShortCuts(); ShortCut[] otherCommunityShortCuts = createCommunityShortCuts();
for (ShortCut shortCut : otherCommunityShortCuts) { for (ShortCut shortCut : otherCommunityShortCuts) {
menuDef.addShortCut(shortCut); menuDef.addShortCut(shortCut);

35
designer-base/src/main/java/com/fr/design/menu/SnapChatMenuDef.java

@ -4,6 +4,7 @@ import com.fr.design.gui.imenu.UIMenu;
import com.fr.design.gui.imenu.UIScrollMenu; import com.fr.design.gui.imenu.UIScrollMenu;
import com.fr.design.notification.SnapChat; import com.fr.design.notification.SnapChat;
import com.fr.design.notification.SnapChatConfig; import com.fr.design.notification.SnapChatConfig;
import com.fr.design.notification.SnapChatFactory;
import com.fr.design.notification.SnapChatKey; import com.fr.design.notification.SnapChatKey;
import javax.swing.JMenu; import javax.swing.JMenu;
@ -22,42 +23,44 @@ public class SnapChatMenuDef extends MenuDef implements SnapChat {
private SnapChatKey uniqueKey; private SnapChatKey uniqueKey;
private SnapChatMenuUI menuUI = new SnapChatMenuUI(this); private SnapChatMenuUI menuUI = new SnapChatMenuUI(this);
private SnapChat snapChat ;
public SnapChatMenuDef(String name, SnapChatKey uniqueKey) { public SnapChatMenuDef(String name, SnapChatKey uniqueKey) {
super(name); super(name);
this.uniqueKey = uniqueKey; this.uniqueKey = uniqueKey;
snapChat = SnapChatFactory.createSnapChat(true, uniqueKey);
} }
public SnapChatMenuDef(Boolean rePaint, SnapChatKey uniqueKey) { public SnapChatMenuDef(Boolean rePaint, SnapChatKey uniqueKey) {
super(rePaint); super(rePaint);
this.uniqueKey = uniqueKey; this.uniqueKey = uniqueKey;
snapChat = SnapChatFactory.createSnapChat(true, uniqueKey);
} }
public SnapChatMenuDef(String name, char mnemonic, SnapChatKey uniqueKey) { public SnapChatMenuDef(String name, char mnemonic, SnapChatKey uniqueKey) {
super(name, mnemonic); super(name, mnemonic);
this.uniqueKey = uniqueKey; this.uniqueKey = uniqueKey;
snapChat = SnapChatFactory.createSnapChat(true, uniqueKey);
} }
@Override @Override
public boolean hasRead() { public boolean hasRead() {
return snapChat.hasRead();
String calcKey = calcKey();
Boolean val = SnapChatConfig.getInstance().hasRead(calcKey);
// 默认读过了。
return val == null ? defaultStatus() : val;
} }
@Override @Override
public void markRead() { public void markRead() {
snapChat.markRead();
String calcKey = calcKey();
SnapChatConfig.getInstance().markRead(calcKey);
} }
@Override @Override
public boolean defaultStatus() { public boolean defaultStatus() {
return snapChat.defaultStatus();
}
return true; @Override
public SnapChatKey key() {
return snapChat.key();
} }
@Override @Override
@ -74,13 +77,6 @@ public class SnapChatMenuDef extends MenuDef implements SnapChat {
super.insertShortCut(index, shortCut); super.insertShortCut(index, shortCut);
} }
@Override
public SnapChatKey key() {
return this.uniqueKey;
}
@Override @Override
protected MenuListener createMenuListener() { protected MenuListener createMenuListener() {
@ -97,17 +93,12 @@ public class SnapChatMenuDef extends MenuDef implements SnapChat {
if (shortCut instanceof SnapChatUpdateAction) { if (shortCut instanceof SnapChatUpdateAction) {
SnapChatUpdateAction action = (SnapChatUpdateAction) shortCut; SnapChatUpdateAction action = (SnapChatUpdateAction) shortCut;
if (!action.hasRead()) { if (!action.hasRead()) {
String calcKey = calcKey(); String calcKey = snapChat.calcKey();
SnapChatConfig.getInstance().resetRead(calcKey); SnapChatConfig.getInstance().resetRead(calcKey);
} }
} }
} }
private String calcKey() {
return key().calc();
}
@Override @Override
protected UIMenu createJMenu0() { protected UIMenu createJMenu0() {

25
designer-base/src/main/java/com/fr/design/menu/SnapChatUpdateAction.java

@ -3,7 +3,7 @@ package com.fr.design.menu;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.notification.SnapChat; import com.fr.design.notification.SnapChat;
import com.fr.design.notification.SnapChatConfig; import com.fr.design.notification.SnapChatFactory;
import com.fr.design.notification.SnapChatKey; import com.fr.design.notification.SnapChatKey;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -14,14 +14,15 @@ import java.awt.event.ActionEvent;
public abstract class SnapChatUpdateAction extends UpdateAction implements SnapChat { public abstract class SnapChatUpdateAction extends UpdateAction implements SnapChat {
private SnapChatKey uniqueKey; private SnapChatKey uniqueKey;
private SnapChat snapChat ;
public SnapChatUpdateAction(SnapChatKey uniqueKey) { public SnapChatUpdateAction(SnapChatKey uniqueKey) {
this.uniqueKey = uniqueKey; this.uniqueKey = uniqueKey;
snapChat = SnapChatFactory.createSnapChat(false, uniqueKey);
} }
@Override @Override
public final void actionPerformed(ActionEvent e) { public final void actionPerformed(ActionEvent e) {
markRead(); markRead();
actionPerformed0(e); actionPerformed0(e);
} }
@ -30,34 +31,22 @@ public abstract class SnapChatUpdateAction extends UpdateAction implements SnapC
@Override @Override
public boolean hasRead() { public boolean hasRead() {
return snapChat.hasRead();
String calcKey = calcKey();
Boolean val = SnapChatConfig.getInstance().hasRead(calcKey);
return val == null ? defaultStatus() : val;
} }
@Override @Override
public void markRead() { public void markRead() {
snapChat.markRead();
String calcKey = calcKey();
SnapChatConfig.getInstance().markRead(calcKey);
} }
@Override @Override
public boolean defaultStatus() { public boolean defaultStatus() {
return snapChat.defaultStatus();
return false;
} }
@Override @Override
public SnapChatKey key() { public SnapChatKey key() {
return snapChat.key();
return this.uniqueKey;
}
private String calcKey() {
return key().calc();
} }
@Override @Override

29
designer-base/src/main/java/com/fr/design/menu/SnapChatUtil.java

@ -10,24 +10,31 @@ import java.awt.geom.Ellipse2D;
* created by Harrison on 2020/03/22 * created by Harrison on 2020/03/22
**/ **/
public class SnapChatUtil { public class SnapChatUtil {
private static final int WIDTH = 4;
private static final int HEIGHT = 4;
private static final int TOP_GAP = 4;
private static final int RIGHT_GAP = 6;
/**
* 绘制菜单项的小红点
*/
public static void paintSnapChat(Graphics g, Rectangle textRect) { public static void paintSnapChat(Graphics g, Rectangle textRect) {
double x = textRect.getWidth() + textRect.getX() + 2;
Color oldColor = g.getColor();
double x = textRect.getWidth();
x += textRect.getX();
x += 2;
double y = textRect.getY(); double y = textRect.getY();
paintRedPoint(g, new Ellipse2D.Double(x, y, WIDTH, HEIGHT));
}
public static void paintPropertyItemPoint(Graphics g, Rectangle bounds) {
double x = bounds.getWidth() - RIGHT_GAP;
paintRedPoint(g, new Ellipse2D.Double(x, TOP_GAP, WIDTH, HEIGHT));
}
private static void paintRedPoint(Graphics g, Ellipse2D.Double shape) {
Color oldColor = g.getColor();
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setColor(Color.red); g2d.setColor(Color.red);
Ellipse2D.Double shape =
new Ellipse2D.Double(x, y, 4, 4);
g2d.fill(shape); g2d.fill(shape);
g2d.draw(shape); g2d.draw(shape);
g2d.setColor(oldColor); g2d.setColor(oldColor);
} }
} }

22
designer-base/src/main/java/com/fr/design/notification/AbstractSnapChat.java

@ -0,0 +1,22 @@
package com.fr.design.notification;
/**
* @Author: Yuan.Wang
* @Date: 2020/9/27
*/
public abstract class AbstractSnapChat implements SnapChat {
@Override
public boolean hasRead() {
String calcKey = calcKey();
Boolean val = SnapChatConfig.getInstance().hasRead(calcKey);
return val == null ? defaultStatus() : val;
}
@Override
public void markRead() {
String calcKey = calcKey();
SnapChatConfig.getInstance().markRead(calcKey);
}
}

4
designer-base/src/main/java/com/fr/design/notification/SnapChat.java

@ -32,4 +32,8 @@ public interface SnapChat {
* @return 字符标志 * @return 字符标志
*/ */
SnapChatKey key(); SnapChatKey key();
default String calcKey() {
return key().calc();
}
} }

32
designer-base/src/main/java/com/fr/design/notification/SnapChatFactory.java

@ -0,0 +1,32 @@
package com.fr.design.notification;
import com.fr.plugin.context.PluginContext;
/**
* @Author: Yuan.Wang
* @Date: 2020/10/10
*/
public class SnapChatFactory {
public static SnapChat createSnapChat(boolean defaultStatus, SnapChatKey snapChatKey) {
return createSnapChat(defaultStatus, snapChatKey, null);
}
public static SnapChat createSnapChat(boolean defaultStatus, SnapChatKey snapChatKey, PluginContext context) {
return new AbstractSnapChat() {
@Override
public boolean defaultStatus() {
return defaultStatus;
}
@Override
public SnapChatKey key() {
return snapChatKey;
}
@Override
public String calcKey() {
return context == null ? key().calc() : key().calc(context);
}
};
}
}

9
designer-base/src/main/java/com/fr/design/notification/SnapChatKey.java

@ -1,9 +1,18 @@
package com.fr.design.notification; package com.fr.design.notification;
import com.fr.plugin.context.PluginContext;
/** /**
* created by Harrison on 2020/03/16 * created by Harrison on 2020/03/16
**/ **/
public interface SnapChatKey { public interface SnapChatKey {
String calc(); String calc();
/**
* 插件刚被安装时不能通过PluginContexts.getContext()方法获取插件上下文因此加一个接口
*/
default String calc(PluginContext context) {
throw new UnsupportedOperationException();
}
} }

2
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java

@ -308,6 +308,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
} }

22
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java

@ -1,6 +1,9 @@
package com.fr.van.chart.column; package com.fr.van.chart.column;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane;
@ -14,4 +17,23 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa
protected boolean hasLabelOrientationPane() { protected boolean hasLabelOrientationPane() {
return !((VanChartColumnPlot) this.getPlot()).isBar(); return !((VanChartColumnPlot) this.getPlot()).isBar();
} }
private void checkOrientationEnable(AttrLabelDetail detail) {
AttrTooltipContent content = detail.getContent();
UIButtonGroup<Integer> orientation = getOrientation();
if (orientation != null) {
orientation.setEnabled(content != null && !content.isRichText());
}
}
public void populate(AttrLabelDetail detail) {
super.populate(detail);
checkOrientationEnable(detail);
}
public void update(AttrLabelDetail detail) {
super.update(detail);
checkOrientationEnable(detail);
}
} }

21
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java

@ -69,18 +69,27 @@ public class VanChartRichEditorPane {
paramsStr.deleteCharAt(len - 1); paramsStr.deleteCharAt(len - 1);
} }
return new RichEditorModel(richText.getContent(), richText.isAuto(), paramsStr.toString()); String content = richText.getContent();
String initParams = StringUtils.EMPTY;
if (content.contains("data-id") && !content.contains("class")) {
initParams = richText.getInitParamsContent();
}
return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams);
} }
public static class RichEditorModel { public static class RichEditorModel {
private String content; private String content;
private boolean auto; private boolean auto;
private String params; private String params;
private String initParams;
public RichEditorModel(String content, boolean auto, String params) { public RichEditorModel(String content, boolean auto, String params, String initParams) {
this.content = content; this.content = content;
this.auto = auto; this.auto = auto;
this.params = params; this.params = params;
this.initParams = initParams;
} }
public String getContent() { public String getContent() {
@ -106,5 +115,13 @@ public class VanChartRichEditorPane {
public void setParams(String params) { public void setParams(String params) {
this.params = params; this.params = params;
} }
public String getInitParams() {
return initParams;
}
public void setInitParams(String initParams) {
this.initParams = initParams;
}
} }
} }

30
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -12,9 +12,11 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.ui.ModernUIPane; import com.fr.design.ui.ModernUIPane;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox;
@ -604,7 +606,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
} }
htmlLabelPane.populate(attrTooltipContent.getHtmlLabel()); htmlLabelPane.populate(attrTooltipContent.getHtmlLabel());
if(!attrTooltipContent.isCommon()){ if (!(attrTooltipContent.isCommon() || attrTooltipContent.isRichText())) {
setDirty(false); setDirty(false);
} }
@ -683,6 +685,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
richText = new AttrTooltipRichText(); richText = new AttrTooltipRichText();
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
protected void populateRichTextFormat(VanChartFormatPaneWithCheckBox[] formatPaneGroup, AttrTooltipFormat[] formatGroup) { protected void populateRichTextFormat(VanChartFormatPaneWithCheckBox[] formatPaneGroup, AttrTooltipFormat[] formatGroup) {
@ -702,6 +706,14 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
protected void populateRichText(AttrTooltipRichText tooltipRichText) { protected void populateRichText(AttrTooltipRichText tooltipRichText) {
if (tooltipRichText != null) { if (tooltipRichText != null) {
updateLocalRichText(tooltipRichText.getContent(), tooltipRichText.isAuto()); updateLocalRichText(tooltipRichText.getContent(), tooltipRichText.isAuto());
richText.setInitParamsContent(tooltipRichText.getInitParamsContent());
}
}
protected void checkRichEditorState(AttrTooltipContent attrTooltipContent) {
if (ComparatorUtils.equals(richText.getInitParamsContent(), StringUtils.EMPTY)) {
richText.setContent(attrTooltipContent.getRichTextDefaultContent());
richText.setInitParamsContent(attrTooltipContent.getRichTextDefaultParams());
} }
} }
@ -719,8 +731,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
attrTooltipContent.setTextAttr(this.textAttrPane.update()); attrTooltipContent.setTextAttr(this.textAttrPane.update());
} }
updateFormatsWithPaneWidth(attrTooltipContent);
htmlLabelPane.update(attrTooltipContent.getHtmlLabel()); htmlLabelPane.update(attrTooltipContent.getHtmlLabel());
return attrTooltipContent; return attrTooltipContent;
@ -793,20 +803,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
if (attrTooltipContent != null) { if (attrTooltipContent != null) {
AttrTooltipRichText tooltipRichText = attrTooltipContent.getRichTextAttr(); AttrTooltipRichText tooltipRichText = attrTooltipContent.getRichTextAttr();
tooltipRichText.setContent(richText.getContent()); tooltipRichText.setContent(richText.getContent());
tooltipRichText.setInitParamsContent(richText.getInitParamsContent());
tooltipRichText.setAuto(richText.isAuto()); tooltipRichText.setAuto(richText.isAuto());
} }
} }
/**
* CHART-1295
* 通过格式的面板宽度来判断在自定义js代码中是否显示this.seriesName字符串
* 图表对于其他的格式有要求也可以在这里继续添加
* @param attrTooltipContent
*/
private void updateFormatsWithPaneWidth (AttrTooltipContent attrTooltipContent) {
int paneWidth = seriesNameFormatPane.getWidth();
if (paneWidth == 0) {
attrTooltipContent.getSeriesFormat().setEnable(false);
}
}
} }

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java

@ -57,5 +57,7 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane
setRichTextAttr(new AttrTooltipRichText()); setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
} }

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -88,6 +88,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
return plot; return plot;
} }
public UIButtonGroup<Integer> getOrientation() {
return orientation;
}
//默认从factory中取 //默认从factory中取
protected void initToolTipContentPane(Plot plot) { protected void initToolTipContentPane(Plot plot) {
dataLabelContentPane = PlotFactory.createPlotLabelContentPane(plot, parent, VanChartPlotLabelDetailPane.this); dataLabelContentPane = PlotFactory.createPlotLabelContentPane(plot, parent, VanChartPlotLabelDetailPane.this);

6
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java

@ -77,13 +77,19 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane {
setRichTextAttr(new AttrTooltipRichText()); setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); AttrTooltipContent attrTooltipContent = new AttrTooltipContent();
attrTooltipContent.getCategoryFormat().setEnable(false); attrTooltipContent.getCategoryFormat().setEnable(false);
attrTooltipContent.getRichTextCategoryFormat().setEnable(false);
attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat());
attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat());
return attrTooltipContent; return attrTooltipContent;
} }

10
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java

@ -77,15 +77,23 @@ public class VanChartFunnelTooltipContentPane extends VanChartTooltipContentPane
setRichTextAttr(new AttrTooltipRichText()); setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
protected AttrTooltipContent createAttrTooltip() { protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); AttrTooltipContent attrTooltipContent = new AttrTooltipContent();
attrTooltipContent.getCategoryFormat().setEnable(false);
attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat());
attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat()); attrTooltipContent.setRichTextSeriesFormat(new AttrTooltipNameFormat());
attrTooltipContent.getCategoryFormat().setEnable(false);
attrTooltipContent.getSeriesFormat().setEnable(true); attrTooltipContent.getSeriesFormat().setEnable(true);
attrTooltipContent.getValueFormat().setEnable(true); attrTooltipContent.getValueFormat().setEnable(true);
attrTooltipContent.getRichTextCategoryFormat().setEnable(false);
attrTooltipContent.getRichTextSeriesFormat().setEnable(true);
attrTooltipContent.getRichTextValueFormat().setEnable(true);
return attrTooltipContent; return attrTooltipContent;
} }
} }

2
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/tooltip/VanChartGanttTooltipContentPane.java

@ -167,6 +167,8 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane
richTextProgressFormatPane.updateFormatParams(params, progressFormat.getJs()); richTextProgressFormatPane.updateFormatParams(params, progressFormat.getJs());
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
} }

3
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterLabelContentPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.scatter; package com.fr.van.chart.scatter;
import com.fr.van.chart.designer.component.VanChartHtmlLabelPane; import com.fr.van.chart.designer.component.VanChartHtmlLabelPane;
import com.fr.van.chart.designer.component.VanChartHtmlLabelPaneWithBackGroundLabel;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -17,7 +18,7 @@ public class VanChartScatterLabelContentPane extends VanChartScatterTooltipCont
@Override @Override
protected VanChartHtmlLabelPane createHtmlLabelPane() { protected VanChartHtmlLabelPane createHtmlLabelPane() {
return new VanChartHtmlLabelPane(); return new VanChartHtmlLabelPaneWithBackGroundLabel();
} }
} }

2
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java

@ -128,6 +128,8 @@ public class VanChartScatterTooltipContentPane extends VanChartTooltipContentPa
setRichTextAttr(new AttrTooltipRichText()); setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
} }

2
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java

@ -106,6 +106,8 @@ public class VanChartStructureTooltipContentPane extends VanChartTooltipContentP
setRichTextAttr(new AttrTooltipRichText()); setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup); populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr()); populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
} }
@Override @Override

37
designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html

@ -40,6 +40,7 @@
var content = Pool.data.getContent(); var content = Pool.data.getContent();
var isAuto = Pool.data.isAuto(); var isAuto = Pool.data.isAuto();
var params = Pool.data.getParams(); var params = Pool.data.getParams();
var initParams = Pool.data.getInitParams();
var getDimensionIds = function (params) { var getDimensionIds = function (params) {
var result = []; var result = [];
@ -57,8 +58,29 @@
return result; return result;
} }
var getInitContent = function (params, initParams) {
var editorService = BI.Services.getService("bi.service.design.chart.common.editor");
var paramGroup = params.split("-");
content = "";
for (var i = 0, len = paramGroup.length; i < len; i++) {
var [key, value] = paramGroup[i].split(":");
if (initParams.indexOf(value) > -1) {
content += '<p style="text-align: center;">' + editorService.getEditorParamImage(key) + '<br></p>';
}
}
return content;
}
var dimensionIds = getDimensionIds(params); var dimensionIds = getDimensionIds(params);
if (initParams) {
content = getInitContent(params, initParams);
}
var rich_editor = BI.createWidget({ var rich_editor = BI.createWidget({
type: "bi.design.chart.common.editor", type: "bi.design.chart.common.editor",
element: "body", element: "body",
@ -92,10 +114,19 @@
}); });
Pool.dispatch = function () { Pool.dispatch = function () {
var content = Pool.data.getContent();
var isAuto = Pool.data.isAuto();
var params = Pool.data.getParams();
var initParams = Pool.data.getInitParams();
if (initParams) {
content = getInitContent(params, initParams);
}
rich_editor.setValue({ rich_editor.setValue({
content: Pool.data.getContent(), content: content,
isAuto: Pool.data.isAuto(), isAuto: isAuto,
dimensionIds: getDimensionIds(Pool.data.getParams()) dimensionIds: getDimensionIds(params)
}); });
} }

2
designer-chart/src/main/resources/com/fr/design/editor/script/editor.js

@ -232,7 +232,7 @@
content = this.editor.getValue(BI.NicEditor.FormatType.ESCAPE), content = this.editor.getValue(BI.NicEditor.FormatType.ESCAPE),
origin = content; origin = content;
if (isAuto) { if (isAuto) {
// content = this._switchToAutoStyle(); content = this._switchToAutoStyle();
this.setFocus(); this.setFocus();
} else if (editorService.isRichTextEqual(content, this.options.placeholder)) { } else if (editorService.isRichTextEqual(content, this.options.placeholder)) {
content = ""; content = "";

8
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

@ -133,14 +133,6 @@ public class MobileTabCommonSettingPane extends BasicPane {
tableConfigJPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER); tableConfigJPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER);
this.add(tableConfigJPanel, BorderLayout.CENTER); this.add(tableConfigJPanel, BorderLayout.CENTER);
tabSlideCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
showTabDotIndicatorCheck.setVisible(tabSlideCheck.isSelected());
dotIndicatorSettingPanel.setVisible(tabSlideCheck.isSelected() && showTabDotIndicatorCheck.isSelected());
}
});
showTabDotIndicatorCheck.addChangeListener(new ChangeListener() { showTabDotIndicatorCheck.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {

Loading…
Cancel
Save