Browse Source

Pull request #2328: REPORT-39489【预定义样式】服务器预定义样式入口,首次更新jar没有小红点

Merge in DESIGN/design from ~KERRY/design_10.0:feature/10.0 to feature/10.0

* commit 'de770ad215c816cdb90013c5cdbe5d80a4c92100':
  REPORT-39489【预定义样式】服务器预定义样式入口,首次更新jar没有小红点
persist/11.0
kerry 4 years ago
parent
commit
3ea72838cc
  1. 13
      designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/detail/CellStyleSettingPane.java
  2. 15
      designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/detail/cell/CustomPredefinedStylePane.java
  3. 28
      designer-base/src/main/java/com/fr/design/notification/SnapChatAllTypes.java
  4. 11
      designer-realize/src/main/java/com/fr/design/actions/server/predefined/ServerPredefinedStyleAction.java
  5. 3
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

13
designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/detail/CellStyleSettingPane.java

@ -5,8 +5,6 @@ import com.fr.base.Style;
import com.fr.config.predefined.PredefinedCellStyle; import com.fr.config.predefined.PredefinedCellStyle;
import com.fr.config.predefined.PredefinedCellStyleConfig; import com.fr.config.predefined.PredefinedCellStyleConfig;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.NameInspector; import com.fr.design.gui.NameInspector;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -110,7 +108,6 @@ public class CellStyleSettingPane extends BasicBeanPane<PredefinedCellStyleConfi
private JPanel createCenterPane() { private JPanel createCenterPane() {
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.setPreferredSize(new Dimension(230, 267));
JPanel titlePreviewPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")); JPanel titlePreviewPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
titlePreviewPane.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); titlePreviewPane.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
previewPane = new CellStylePreviewPane(); previewPane = new CellStylePreviewPane();
@ -120,15 +117,7 @@ public class CellStyleSettingPane extends BasicBeanPane<PredefinedCellStyleConfi
panel.add(titlePreviewPane, BorderLayout.NORTH); panel.add(titlePreviewPane, BorderLayout.NORTH);
cardLayout = new CardLayout(); cardLayout = new CardLayout();
centerPane = new JPanel(cardLayout); centerPane = new JPanel(cardLayout);
centerPane.setPreferredSize(new Dimension(226, 500)); panel.add(centerPane, BorderLayout.CENTER);
BasicScrollPane basicScrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return centerPane;
}
};
basicScrollPane.setPreferredSize(new Dimension(230, 214));
panel.add(basicScrollPane, BorderLayout.CENTER);
return panel; return panel;
} }

15
designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/detail/cell/CustomPredefinedStylePane.java

@ -2,7 +2,9 @@ package com.fr.design.mainframe.predefined.ui.detail.cell;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.dialog.MultiTabPane; import com.fr.design.dialog.MultiTabPane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
@ -101,6 +103,13 @@ public class CustomPredefinedStylePane extends MultiTabPane<Style> {
this.setLayout(new BorderLayout(0, 4)); this.setLayout(new BorderLayout(0, 4));
this.add(tabPane, BorderLayout.NORTH); this.add(tabPane, BorderLayout.NORTH);
JPanel attrListenerPane = new AbstractAttrNoScrollPane() { JPanel attrListenerPane = new AbstractAttrNoScrollPane() {
@Override
protected void initContentPane() {
leftContentPane = createContentPane();
this.add(leftContentPane, BorderLayout.CENTER);
}
@Override @Override
protected JPanel createContentPane() { protected JPanel createContentPane() {
this.addAttributeChangeListener(new AttributeChangeListener() { this.addAttributeChangeListener(new AttributeChangeListener() {
@ -112,9 +121,15 @@ public class CustomPredefinedStylePane extends MultiTabPane<Style> {
} }
}); });
BasicScrollPane basicScrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return centerPane; return centerPane;
} }
}; };
return basicScrollPane;
}
};
this.add(attrListenerPane, BorderLayout.CENTER); this.add(attrListenerPane, BorderLayout.CENTER);
} }

28
designer-base/src/main/java/com/fr/design/notification/SnapChatAllTypes.java

@ -35,4 +35,32 @@ public abstract class SnapChatAllTypes {
} }
} }
public enum UpdateAction implements SnapChatKey {
/**
* 服务器预定义样式
*/
PREDEFINED_STYLE("PREDEFINED_STYLE");
private static final String SIGN = "0002";
private String key;
UpdateAction(String key) {
this.key = key;
}
public String getKey() {
return key;
}
@Override
public String calc() {
return CommonUtils.join(
new String[]{SIGN, getKey()}, "-"
);
}
}
} }

11
designer-realize/src/main/java/com/fr/design/actions/server/predefined/ServerPredefinedStyleAction.java

@ -1,12 +1,13 @@
package com.fr.design.actions.server.predefined; package com.fr.design.actions.server.predefined;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.server.StyleManagerPane; import com.fr.design.actions.server.StyleManagerPane;
import com.fr.design.mainframe.predefined.ui.dialog.ServerPredefinedStyleDialog; import com.fr.design.mainframe.predefined.ui.dialog.ServerPredefinedStyleDialog;
import com.fr.design.mainframe.predefined.ui.ServerPredefinedStylePane; import com.fr.design.mainframe.predefined.ui.ServerPredefinedStylePane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.design.menu.SnapChatUpdateAction;
import com.fr.design.notification.SnapChatKey;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
@ -15,9 +16,11 @@ import java.awt.event.ActionEvent;
/** /**
* Created by kerry on 2020-08-26 * Created by kerry on 2020-08-26
*/ */
public class ServerPredefinedStyleAction extends UpdateAction { public class ServerPredefinedStyleAction extends SnapChatUpdateAction {
public ServerPredefinedStyleAction() {
public ServerPredefinedStyleAction(SnapChatKey uniqueKey) {
super(uniqueKey);
this.setMenuKeySet(PREDEFINED_STYLES); this.setMenuKeySet(PREDEFINED_STYLES);
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
@ -26,7 +29,7 @@ public class ServerPredefinedStyleAction extends UpdateAction {
} }
@Override @Override
public void actionPerformed(ActionEvent e) { protected void actionPerformed0(ActionEvent e) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
ServerPredefinedStylePane predefinedStylePane = new ServerPredefinedStylePane(); ServerPredefinedStylePane predefinedStylePane = new ServerPredefinedStylePane();
ServerPredefinedStyleDialog dialog = new ServerPredefinedStyleDialog(designerFrame, predefinedStylePane); ServerPredefinedStyleDialog dialog = new ServerPredefinedStyleDialog(designerFrame, predefinedStylePane);

3
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -37,6 +37,7 @@ import com.fr.design.menu.ShortCut;
import com.fr.design.module.ChartEmptyDataStyleAction; import com.fr.design.module.ChartEmptyDataStyleAction;
import com.fr.design.module.ChartPreStyleAction; import com.fr.design.module.ChartPreStyleAction;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.notification.SnapChatAllTypes;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.Event; import com.fr.event.Event;
@ -162,7 +163,7 @@ public class MainDesigner extends BaseDesigner {
menuDef.addShortCut(SeparatorDef.DEFAULT); menuDef.addShortCut(SeparatorDef.DEFAULT);
if (WorkContext.getCurrent().isRoot()) { if (WorkContext.getCurrent().isRoot()) {
menuDef.addShortCut(new ServerConfigManagerAction(), new ServerPredefinedStyleAction(), menuDef.addShortCut(new ServerConfigManagerAction(), new ServerPredefinedStyleAction(SnapChatAllTypes.UpdateAction.PREDEFINED_STYLE),
new WidgetManagerAction()); new WidgetManagerAction());
menuDef.addShortCut(new ChartPreStyleAction(), new ChartEmptyDataStyleAction(),new ChartMapEditorAction()); menuDef.addShortCut(new ChartPreStyleAction(), new ChartEmptyDataStyleAction(),new ChartMapEditorAction());
} }

Loading…
Cancel
Save