Browse Source

Merge pull request #1952 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '92c7e1329e5e86e587739ac469687db304cbdd4d':
  REPORT-35463 修改SaveSomeTemplatePane的换行格式
  REPORT-35463 使用LocaleAction包装action
  REPORT-35463 添加BUG需求反馈、技术支持菜单项,英文帮助菜单新增技术支持,韩文、日文帮助菜单新增帮助文档,台湾社区菜单BUG 与需求反馈合为一个,新增技术支持菜单项
  REPORT-23260 将原本的全选框替换为三态的CheckBox,并在三态的CheckBox中添加状态监听器
  REPORT-29562 【国际化】条件属性中超级链接和控件事件文字展示不全 修改import
  REPORT-29562 【国际化】条件属性中超级链接和控件事件文字展示不全
  主要修改: 1.将MacOS系统下的粘贴键添加到UIPasswordField的InputMap中,使其支持command+v为粘贴键 2.修改导包 3.将构造方法里的公用操作抽取出来放在init()中
  主要修改: 1.将MacOS系统下的粘贴键添加到UIPasswordField的InputMap中,使其支持command+v为粘贴键 2.修改导包
  主要修改: 1.将MacOS系统下的粘贴键添加到UIPasswordField的InputMap中,使其支持command+v为粘贴键 2.修改导包
  主要修改: 1.将MacOS系统下的粘贴键添加到UIPasswordField的InputMap中,使其支持command+v为粘贴键 2.修改导包
  主要修改: 1.将MacOS系统下的粘贴键添加到UIPasswordField的InputMap中,使其支持command+v为粘贴键 2.修改导包
  主要修改: 1.将MacOS系统下的粘贴键添加到UIPasswordField的InputMap中,使其支持command+v为粘贴键 2.修改导包
research/11.0
superman 4 years ago
parent
commit
b6cbacfa1e
  1. 48
      designer-base/src/main/java/com/fr/design/actions/community/BugNeedAction.java
  2. 49
      designer-base/src/main/java/com/fr/design/actions/community/TechSupportAction.java
  3. 9
      designer-base/src/main/java/com/fr/design/event/StateChangeListener.java
  4. 245
      designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
  5. 23
      designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPassWordField.java
  6. 35
      designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java
  7. 20
      designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/TristateCheckBox.java
  8. 29
      designer-base/src/main/java/com/fr/design/locale/impl/BugNeedMark.java
  9. 107
      designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java
  10. 30
      designer-base/src/main/java/com/fr/design/locale/impl/TechSupportMark.java
  11. 69
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  12. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/support.png
  13. 4
      designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java
  14. 6
      designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

48
designer-base/src/main/java/com/fr/design/actions/community/BugNeedAction.java

@ -0,0 +1,48 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.locale.impl.BugNeedMark;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import javax.swing.*;
import java.awt.event.ActionEvent;
/**
* @Author: Yuan.Wang
* @Date: 2020/7/28
*/
public class BugNeedAction extends UpdateAction {
public BugNeedAction() {
this.setMenuKeySet(BugAndNeed);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/need.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
LocaleMark<String> localeMark = LocaleCenter.getMark(BugNeedMark.class);
BrowseUtils.browser(localeMark.getValue());
}
public static final MenuKeySet BugAndNeed = new MenuKeySet() {
@Override
public char getMnemonic() {
return 0;
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_BugAndNeed");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

49
designer-base/src/main/java/com/fr/design/actions/community/TechSupportAction.java

@ -0,0 +1,49 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.locale.impl.TechSupportMark;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import javax.swing.*;
import java.awt.event.ActionEvent;
/**
* @Author: Yuan.Wang
* @Date: 2020/7/28
*/
public class TechSupportAction extends UpdateAction {
public TechSupportAction() {
this.setMenuKeySet(TechSupport);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/support.png"));
}
@Override
public void actionPerformed(ActionEvent e) {
LocaleMark<String> localeMark = LocaleCenter.getMark(TechSupportMark.class);
String str=localeMark.getValue();
BrowseUtils.browser(localeMark.getValue());
}
public static final MenuKeySet TechSupport = new MenuKeySet() {
@Override
public char getMnemonic() {
return 0;
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_TechSupport");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

9
designer-base/src/main/java/com/fr/design/event/StateChangeListener.java

@ -0,0 +1,9 @@
package com.fr.design.event;
/**
* @Author: Yuan.Wang
* @Date: 2020/7/29
*/
public interface StateChangeListener {
public void stateChange();
}

245
designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java

File diff suppressed because one or more lines are too long

23
designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPassWordField.java

@ -1,11 +1,12 @@
package com.fr.design.gui.ipasswordfield; package com.fr.design.gui.ipasswordfield;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import javax.swing.*; import javax.swing.JPasswordField;
import javax.swing.text.Document; import javax.swing.text.Document;
import java.awt.*; import java.awt.Graphics;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -21,26 +22,34 @@ public class UIPassWordField extends JPasswordField {
public UIPassWordField() { public UIPassWordField() {
super(); super();
addRollOverListener(); init();
} }
public UIPassWordField(String text) { public UIPassWordField(String text) {
super(text); super(text);
addRollOverListener(); init();
} }
public UIPassWordField(int columns) { public UIPassWordField(int columns) {
super(columns); super(columns);
addRollOverListener(); init();
} }
public UIPassWordField(String text, int columns) { public UIPassWordField(String text, int columns) {
super(text, columns); super(text, columns);
addRollOverListener(); init();
} }
public UIPassWordField(Document doc, String txt, int columns) { public UIPassWordField(Document doc, String txt, int columns) {
super(doc, txt, columns); super(doc, txt, columns);
init();
}
/**
* 每个构造方法里都需要做的一些操作
*/
public void init() {
InputEventBaseOnOS.addBasicEditInputMap(this);
addRollOverListener(); addRollOverListener();
} }
@ -69,4 +78,4 @@ public class UIPassWordField extends JPasswordField {
super.paintBorder(g); super.paintBorder(g);
} }
} }
} }

35
designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java

@ -9,11 +9,20 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.text.Document; import javax.swing.text.Document;
import java.awt.*; import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.LayoutManager;
import java.awt.RenderingHints;
/** /**
* @author Jerry * @author Jerry
@ -33,31 +42,33 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
public UITextField() { public UITextField() {
super(); super();
InputEventBaseOnOS.addBasicEditInputMap(this); init();
initListener();
} }
public UITextField(int columns) { public UITextField(int columns) {
super(columns); super(columns);
InputEventBaseOnOS.addBasicEditInputMap(this); init();
initListener();
} }
public UITextField(String text, int columns) { public UITextField(String text, int columns) {
super(text, columns); super(text, columns);
InputEventBaseOnOS.addBasicEditInputMap(this); init();
initListener();
} }
public UITextField(String text) { public UITextField(String text) {
super(text); super(text);
InputEventBaseOnOS.addBasicEditInputMap(this); init();
initListener();
} }
public UITextField(Document doc, String text, int columns) { public UITextField(Document doc, String text, int columns) {
super(doc, text, columns); super(doc, text, columns);
init();
}
/**
* 每个构造方法里都需要做的一些操作
*/
public void init() {
InputEventBaseOnOS.addBasicEditInputMap(this); InputEventBaseOnOS.addBasicEditInputMap(this);
initListener(); initListener();
} }
@ -251,4 +262,4 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
this.isBorderPainted = isBorderPainted; this.isBorderPainted = isBorderPainted;
} }
} }

20
designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/TristateCheckBox.java

@ -1,6 +1,7 @@
package com.fr.design.gui.itree.checkboxtree; package com.fr.design.gui.itree.checkboxtree;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.StateChangeListener;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -75,6 +76,8 @@ public class TristateCheckBox extends UICheckBox {
private final TristateDecorator model; private final TristateDecorator model;
public StateChangeListener stateChangeListener;
public TristateCheckBox(String text, Icon icon, State initial) { public TristateCheckBox(String text, Icon icon, State initial) {
super(text, icon); super(text, icon);
setUI(new TristateCheckBoxUI()); setUI(new TristateCheckBoxUI());
@ -83,7 +86,7 @@ public class TristateCheckBox extends UICheckBox {
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
grabFocus(); grabFocus();
model.setState(getNextState(model.getState())); setState(getNextState(model.getState()));
} }
}); });
// Reset the keyboard action map // Reset the keyboard action map
@ -92,7 +95,7 @@ public class TristateCheckBox extends UICheckBox {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
grabFocus(); grabFocus();
model.setState(getNextState(model.getState())); setState(getNextState(model.getState()));
} }
}); });
map.put("released", null); map.put("released", null);
@ -125,12 +128,20 @@ public class TristateCheckBox extends UICheckBox {
public void addMouseListener(MouseListener l) { public void addMouseListener(MouseListener l) {
} }
public void addStateChangeListener(StateChangeListener stateChangeListener) {
this.stateChangeListener=stateChangeListener;
}
/** /**
* Set the new state to either SELECTED, NOT_SELECTED or * Set the new state to either SELECTED, NOT_SELECTED or
* DO_NOT_CARE. If state == null, it is treated as DO_NOT_CARE. * DO_NOT_CARE. If state == null, it is treated as DO_NOT_CARE.
*/ */
public void setState(State state) { public void setState(State state) {
State old = getState();
model.setState(state); model.setState(state);
if (old != state) {
fireBoxStateChanged();
}
} }
/** /**
@ -141,6 +152,11 @@ public class TristateCheckBox extends UICheckBox {
return model.getState(); return model.getState();
} }
public void fireBoxStateChanged() {
if (stateChangeListener != null) {
stateChangeListener.stateChange();
}
}
/** /**
* Exactly which Design Pattern is this? Is it an Adapter, * Exactly which Design Pattern is this? Is it an Adapter,

29
designer-base/src/main/java/com/fr/design/locale/impl/BugNeedMark.java

@ -0,0 +1,29 @@
package com.fr.design.locale.impl;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.locale.LocaleMark;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* @Author: Yuan.Wang
* @Date: 2020/7/29
*/
public class BugNeedMark implements LocaleMark<String> {
private Map<Locale, String> map = new HashMap<>();
private static final String TW_BUG_AND_NEEDS = CloudCenter.getInstance().acquireUrlByKind("bbs.bug.needs.zh_TW");
public BugNeedMark() {
map.put(Locale.TAIWAN, TW_BUG_AND_NEEDS);
}
@Override
public String getValue() {
String result = map.get(GeneralContext.getLocale());
return result == null ? TW_BUG_AND_NEEDS : result;
}
}

107
designer-base/src/main/java/com/fr/design/locale/impl/SupportLocaleImpl.java

@ -10,6 +10,7 @@ import java.util.Set;
* 某些国际化环境支持的操作 * 某些国际化环境支持的操作
* 需要增加/删除支持的语言 统一在这里修改 无须改动业务代码 * 需要增加/删除支持的语言 统一在这里修改 无须改动业务代码
* 后续有新的不同语言下的差异操作 添加新的枚举 * 后续有新的不同语言下的差异操作 添加新的枚举
*
* @author Hades * @author Hades
* @date 2019/6/24 * @date 2019/6/24
*/ */
@ -50,6 +51,112 @@ public enum SupportLocaleImpl implements SupportLocale {
set.add(Locale.KOREA); set.add(Locale.KOREA);
return set; return set;
} }
},
/**
* BUG反馈
*/
BUG {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.CHINA);
set.add(Locale.US);
set.add(Locale.JAPAN);
set.add(Locale.KOREA);
return set;
}
},
/**
* 需求反馈
*/
NEED {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.CHINA);
set.add(Locale.US);
set.add(Locale.JAPAN);
set.add(Locale.KOREA);
return set;
}
},
/**
* BUG需求反馈
*/
BUG_AND_NEED {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.TAIWAN);
return set;
}
},
/**
* 视频
*/
VIDEO {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.US);
return set;
}
},
/**
* 技术支持-帮助菜单下
*/
TECH_SUPPORT_HELP {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.US);
return set;
}
},
/**
* 技术支持-社区菜单下
*/
TECH_SUPPORT_COMMUNITY {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.TAIWAN);
return set;
}
},
/**
* 帮助文档-帮助菜单下
*/
TUTORIAL_HELP {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.CHINA);
set.add(Locale.TAIWAN);
return set;
}
},
/**
* 帮助文档-社区菜单下
*/
TUTORIAL_COMMUNITY {
@Override
public Set<Locale> support() {
Set<Locale> set = new HashSet<Locale>();
set.add(Locale.US);
set.add(Locale.KOREA);
set.add(Locale.JAPAN);
return set;
}
} }
} }

30
designer-base/src/main/java/com/fr/design/locale/impl/TechSupportMark.java

@ -0,0 +1,30 @@
package com.fr.design.locale.impl;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.locale.LocaleMark;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* @Author: Yuan.Wang
* @Date: 2020/7/29
*/
public class TechSupportMark implements LocaleMark<String> {
private Map<Locale, String> map = new HashMap<>();
private static final String EN_TECH_SUPPORT = CloudCenter.getInstance().acquireUrlByKind("bbs.tech.support.en_US");
private static final String TW_TECH_SUPPORT = CloudCenter.getInstance().acquireUrlByKind("bbs.tech.support.zh_TW");
public TechSupportMark() {
map.put(Locale.US, EN_TECH_SUPPORT);
map.put(Locale.TAIWAN, TW_TECH_SUPPORT);
}
@Override
public String getValue() {
String result = map.get(GeneralContext.getLocale());
return result == null ? EN_TECH_SUPPORT : result;
}
}

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

@ -11,12 +11,14 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.BBSAction; import com.fr.design.actions.community.BBSAction;
import com.fr.design.actions.community.BugAction; import com.fr.design.actions.community.BugAction;
import com.fr.design.actions.community.BugNeedAction;
import com.fr.design.actions.community.CenterAction; import com.fr.design.actions.community.CenterAction;
import com.fr.design.actions.community.FacebookFansAction; import com.fr.design.actions.community.FacebookFansAction;
import com.fr.design.actions.community.NeedAction; import com.fr.design.actions.community.NeedAction;
import com.fr.design.actions.community.QuestionAction; import com.fr.design.actions.community.QuestionAction;
import com.fr.design.actions.community.SignAction; import com.fr.design.actions.community.SignAction;
import com.fr.design.actions.community.TechSolutionAction; import com.fr.design.actions.community.TechSolutionAction;
import com.fr.design.actions.community.TechSupportAction;
import com.fr.design.actions.community.VideoAction; import com.fr.design.actions.community.VideoAction;
import com.fr.design.actions.file.CloseCurrentTemplateAction; import com.fr.design.actions.file.CloseCurrentTemplateAction;
import com.fr.design.actions.file.ExitDesignerAction; import com.fr.design.actions.file.ExitDesignerAction;
@ -529,11 +531,30 @@ public abstract class ToolBarMenuDock {
*/ */
public ShortCut[] createHelpShortCuts() { public ShortCut[] createHelpShortCuts() {
final java.util.List<ShortCut> shortCuts = new ArrayList<ShortCut>(); final java.util.List<ShortCut> shortCuts = new ArrayList<ShortCut>();
// 英文,把 video 和帮助文档放到 Help 下面
if (GeneralContext.getLocale().equals(Locale.US)) { Locale locale = GeneralContext.getLocale();
shortCuts.add(new VideoAction());
shortCuts.add(new TutorialAction()); LocaleCenter.buildAction(new LocaleAction() {
} @Override
public void execute() {
shortCuts.add(new VideoAction());
}
}, SupportLocaleImpl.VIDEO);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new TutorialAction());
}
}, SupportLocaleImpl.TUTORIAL_HELP);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new TechSupportAction());
}
}, SupportLocaleImpl.TECH_SUPPORT_HELP);
//远程不使用更新升级,产品演示 //远程不使用更新升级,产品演示
if (WorkContext.getCurrent().isLocal()) { if (WorkContext.getCurrent().isLocal()) {
shortCuts.add(new WebDemoAction()); shortCuts.add(new WebDemoAction());
@ -576,9 +597,41 @@ public abstract class ToolBarMenuDock {
shortCuts.add(new TechSolutionAction()); shortCuts.add(new TechSolutionAction());
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new BugAction()); LocaleCenter.buildAction(new LocaleAction() {
shortCuts.add(new NeedAction()); @Override
public void execute() {
shortCuts.add(new BugAction());
}
}, SupportLocaleImpl.BUG);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new NeedAction());
}
}, SupportLocaleImpl.NEED);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new BugNeedAction());
}
}, SupportLocaleImpl.BUG_AND_NEED);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new TechSupportAction());
}
}, SupportLocaleImpl.TECH_SUPPORT_COMMUNITY);
LocaleCenter.buildAction(new LocaleAction() {
@Override
public void execute() {
shortCuts.add(new TutorialAction());
}
}, SupportLocaleImpl.TUTORIAL_COMMUNITY);
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

4
designer-realize/src/main/java/com/fr/design/condition/HyperlinkPane.java

@ -15,6 +15,7 @@ import com.fr.report.cell.cellattr.highlight.HighlightAction;
import com.fr.report.cell.cellattr.highlight.HyperlinkHighlightAction; import com.fr.report.cell.cellattr.highlight.HyperlinkHighlightAction;
import javax.swing.*; import javax.swing.*;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -30,6 +31,7 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane<HighlightAct
protected UIButton hyperlinkButton; protected UIButton hyperlinkButton;
protected HyperlinkGroupPane pane; protected HyperlinkGroupPane pane;
protected BasicDialog dialog; protected BasicDialog dialog;
private static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(730, 600);
public HyperlinkPane(final ConditionAttributesPane conditionAttributesPane) { public HyperlinkPane(final ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane); super(conditionAttributesPane);
@ -39,7 +41,7 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane<HighlightAct
NameJavaScriptGroup nameHyperlinks = jsGroup; NameJavaScriptGroup nameHyperlinks = jsGroup;
pane = DesignerContext.getDesignerFrame().getSelectedJTemplate().getHyperLinkPaneNoPop(HyperlinkGroupPaneActionImpl.getInstance()); pane = DesignerContext.getDesignerFrame().getSelectedJTemplate().getHyperLinkPaneNoPop(HyperlinkGroupPaneActionImpl.getInstance());
pane.populate(nameHyperlinks); pane.populate(nameHyperlinks);
dialog = pane.showWindow(SwingUtilities.getWindowAncestor(conditionAttributesPane)); dialog = pane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(conditionAttributesPane), null, WINDOW_CUSTOM_SIZE);
dialog.addDialogActionListener(new DialogActionAdapter() { dialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {

6
designer-realize/src/main/java/com/fr/design/condition/WidgetHighlightPane.java

@ -12,10 +12,12 @@ import com.fr.design.widget.WidgetManageCardPane;
import com.fr.design.widget.WidgetPane; import com.fr.design.widget.WidgetPane;
import com.fr.form.ui.*; import com.fr.form.ui.*;
import com.fr.form.ui.TextArea;
import com.fr.report.cell.cellattr.highlight.HighlightAction; import com.fr.report.cell.cellattr.highlight.HighlightAction;
import com.fr.report.cell.cellattr.highlight.WidgetHighlightAction; import com.fr.report.cell.cellattr.highlight.WidgetHighlightAction;
import javax.swing.*; import javax.swing.*;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -27,6 +29,7 @@ import java.awt.event.ActionListener;
public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<HighlightAction> { public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<HighlightAction> {
private static final int DIALOG_WIDTH = 700; private static final int DIALOG_WIDTH = 700;
private static final int DIALOG_HEIGHT = 400; private static final int DIALOG_HEIGHT = 400;
private static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(720, 600);
private Widget widget; private Widget widget;
private UIComboBox box; private UIComboBox box;
@ -45,8 +48,7 @@ public class WidgetHighlightPane extends ConditionAttrSingleConditionPane<Highli
} }
}; };
widgetPane.populate(widget); widgetPane.populate(widget);
BasicDialog dialog = widgetPane.showWindow( BasicDialog dialog = widgetPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(conditionAttributesPane), null, WINDOW_CUSTOM_SIZE);
SwingUtilities.getWindowAncestor(conditionAttributesPane));
dialog.addDialogActionListener(new DialogActionAdapter() { dialog.addDialogActionListener(new DialogActionAdapter() {
public void doOk() { public void doOk() {
widget = widgetPane.update(); widget = widgetPane.update();

Loading…
Cancel
Save