Browse Source

Merge pull request #1095 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit '8fbebb70ac78955b83f12d4b026a1443b52ff1df':
  REPORT-3163 合作开发9.0设计器=>交互验收=》统一改成“事件”
  REPORT-3163 合作开发9.0设计器=>交互验收=》点击插入按钮,带指向箭头的弹窗被关闭了
  REPORT-3163 合作开发9.0设计器=>交互验收=》用不到的属性面板不继承
  REPORT-3163 合作开发9.0设计器=>控件设置事件编辑面板边框调整
  REPORT-3163 合作开发9.0设计器=>弹出框不可用时,显示提示
  REPORT-3163 合作开发9.0设计器=>交互验收=》修复一些bug
  REPORT-3163 合作开发9.0设计器=>交互验收=》弹出的属性面板被弹回后,其对应tab应为选中状态
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性面板弹出时,底部有一个表示可以缩放的控件
  REPORT-3163 合作开发9.0设计器=>交互验收=》鼠标悬停时应无颜色变化
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性面板弹出时,应该有一个统一的固定位置
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性面板弹出时,应该加边框线
  REPORT-3163 合作开发9.0设计器=>交互验收=》属性栏收起,没有tab是选中状态
  REPORT-3163 合作开发9.0设计器=>交互验收=》继承
  REPORT-3736 [9.0一轮回归]设计器语言设置简体中文后括号内容未翻译
  REPORT-3894 [9.0一轮回归]颜色对话框名称不显示
master
neil 7 years ago
parent
commit
ce9a51cbbb
  1. 4
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  2. 3
      designer/src/com/fr/design/widget/WidgetEventPane.java
  3. 18
      designer_base/src/com/fr/design/actions/file/PreferencePane.java
  4. 1
      designer_base/src/com/fr/design/constants/UIConstants.java
  5. 1
      designer_base/src/com/fr/design/locale/designer.properties
  6. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  7. 1
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  8. 1
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  9. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  10. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  11. 79
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  12. 2
      designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java
  13. 1
      designer_base/src/com/fr/design/style/color/ColorSelectDialog.java
  14. 8
      designer_base/src/com/fr/file/FILEChooserPane.java

4
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -81,8 +81,8 @@ public class CellWidgetCardPane extends BasicPane {
eventTabPane.add(eventPane, BorderLayout.CENTER);
//k
center.add(attriTabPane, Inter.getLocText("FR-Designer_Attribute"));
center.add(eventTabPane, Inter.getLocText("FR-Designer_Form_Editing_Listeners"));
final String[] tabTitles = new String[]{Inter.getLocText("FR-Designer_Attribute"), Inter.getLocText("FR-Designer_Form_Editing_Listeners")};
center.add(eventTabPane, Inter.getLocText("FR-Designer_Event"));
final String[] tabTitles = new String[]{Inter.getLocText("FR-Designer_Attribute"), Inter.getLocText("FR-Designer_Event")};
tabsHeaderIconPane = new UIHeadGroup(tabTitles) {
@Override

3
designer/src/com/fr/design/widget/WidgetEventPane.java

@ -30,11 +30,14 @@ import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.stable.ReportConstants;
import com.fr.stable.Nameable;
import javax.swing.*;
public class WidgetEventPane extends ObjectUIControlPane {
public WidgetEventPane(ElementCasePane pane) {
super(pane);
this.setNameListEditable(false);
setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0));
}
@Override

18
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -75,13 +75,6 @@ public class PreferencePane extends BasicPane {
private static final FRLevel[] LOG = {FRLevel.SEVERE, FRLevel.WARNING, FRLevel.INFO, FRLevel.DEBUG};
private static java.util.List<String> LANGUAGE = new ArrayList<>();
static {
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
for(Locale locale : map.keySet()){
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
};
private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言
private boolean languageChanged; // 是否修改了设计器语言设置
@ -116,6 +109,17 @@ public class PreferencePane extends BasicPane {
public PreferencePane() {
this.initComponents();
this.initLanguageItems();
}
// 语言选项
private void initLanguageItems() {
LANGUAGE.clear();
Map<Locale, String> map = Inter.getSupportLocaleMap();
LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default"));
for(Locale locale : map.keySet()){
LANGUAGE.add(getLocaledLanguage(map.get(locale), locale));
}
}
protected void initComponents() {

1
designer_base/src/com/fr/design/constants/UIConstants.java

@ -104,6 +104,7 @@ public interface UIConstants {
public static final Color SPLIT_LINE = new Color(201, 198, 184);
public static final Color TITLED_BORDER_COLOR = new Color(0xededee);
public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221);
public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd);
public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2127,3 +2127,4 @@ FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit
FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2123,3 +2123,4 @@ FS-Designer_DS_Filter_Odd_Tip=Odd_Tip
FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer-AlphaFine_NO_Result=no search result
FR-Designer_Select_Color=Select Color

1
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -2121,3 +2121,4 @@ FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color=

1
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2122,3 +2122,4 @@ FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=
FR-Designer_Select_Color=

1
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2134,3 +2134,4 @@ FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\
FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...)
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570
FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C
FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2126,3 +2126,4 @@ FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578
M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868
FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C
FR-Designer_Select_Color=

79
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -13,6 +13,7 @@ import com.fr.general.FRFont;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.third.fr.pdf.kernel.utils.CompareTool;
import com.sap.conn.jco.JCo;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
@ -38,7 +39,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框高度
private static final int POPUP_MIN_HEIGHT = 145;
private static final int POPUP_MAX_HEIGHT = 480;
private static final int POPUP_DEFAULT_HEIGHT = 360;
private static final int POPUP_DEFAULT_HEIGHT = 356;
public static final String KEY_CELL_ELEMENT = "cellElement";
public static final String KEY_CELL_ATTR = "cellAttr";
public static final String KEY_FLOAT_ELEMENT = "floatElement";
@ -53,6 +54,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel defaultPane; // "无可用配置项"面板
private JPanel defaultAuthorityPane; // "该元素不支持权限编辑"
private PropertyItem selectedItem; // 当前被选中的属性配置项
public enum PropertyMode {
REPORT, // 报表
@ -219,6 +221,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
@Override
public void onResize() {
if (!isRightPaneVisible()) {
resetPropertyIcons();
} else {
refreshRightPane();
}
for (PropertyItem item : propertyItemMap.values()) {
item.onResize();
}
@ -374,6 +381,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
* 刷新右面板
*/
public void refreshRightPane() {
// 可继承,就继承
if (selectedItem != null && selectedItem.isVisible() && selectedItem.isEnabled() && !selectedItem.isPoppedOut()) {
selectedItem.setTabButtonSelected();
propertyCard.show(rightPane, selectedItem.getName());
return;
}
// 不可继承时,选中第一个可用 tab
boolean hasAvailableTab = false;
boolean hasEnabledTab = false;
for (String name : propertyItemMap.keySet()) {
@ -388,6 +403,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
}
// 无可用 tab 时,显示提示文字
if (!hasAvailableTab) {
resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
@ -417,6 +433,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
private void resetPropertyIcons() {
for (PropertyItem item : propertyItemMap.values()) {
item.resetButtonIcon();
@ -477,6 +494,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void updateStatus() {
setEnabled(enableModes.contains(currentMode));
setVisible(visibleModes.contains(currentMode));
if (isPoppedOut()) {
if (!isVisible()) {
popToFrame();
} else if (!isEnabled()) {
popupDialog.showDefaultPane();
}
}
}
public boolean isVisible() {
@ -593,6 +617,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
selectedItem = this;
}
private void initButton() {
@ -672,6 +697,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.setVisible(false);
initContentPane();
onResize();
if (isEnabled()) {
propertyCard.show(rightPane, getName());
setTabButtonSelected();
}
refreshContainer();
}
}
@ -763,7 +792,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
setBackground(Color.pink);
} else {
setCursor(Cursor.getDefaultCursor());
}
@ -867,12 +895,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private class PopupDialog extends JDialog {
private Container container;
private static final int RESIZE_RANGE = 4;
private static final int RESIZE_RANGE = 8;
private Cursor originCursor;
private Cursor southResizeCursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
private Point mouseDownCompCoords;
private JPanel contentWrapper;
private JComponent contentPane;
private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) {
super(DesignerContext.getDesignerFrame());
@ -882,29 +912,50 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
PopupToolPane popupToolPane = new PopupToolPane(propertyItem, PopupToolPane.UP_BUTTON);
popupToolPane.setParentDialog(this);
contentPane = propertyItem.getContentPane();
container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT);
contentWrapper = new JPanel(new BorderLayout());
contentWrapper.add(popupToolPane, BorderLayout.NORTH);
contentWrapper.add(contentPane, BorderLayout.CENTER);
contentWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.PROPERTY_DIALOG_BORDER));
JPanel horizontalToolPane = new JPanel() {
@Override
public void paint(Graphics g) {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, getWidth(), getHeight(), null);
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - RESIZE_RANGE) / 2, 3, RESIZE_RANGE, 5, null);
}
};
contentWrapper.add(horizontalToolPane, BorderLayout.SOUTH);
container.add(contentWrapper, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT + RESIZE_RANGE);
adjustLocation();
initListener();
this.setVisible(true);
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
}
public void showDefaultPane() {
replaceContentPane(defaultPane);
}
public void adjustLocation() {
Point btnCoords = propertyItem.getButton().getLocationOnScreen();
this.setLocation(btnCoords.x - CONTENT_WIDTH, btnCoords.y);
this.setLocation(
getLeftPane().getLocationOnScreen().x - CONTENT_WIDTH,
DesignerContext.getDesignerFrame().getLocationOnScreen().y + 228
);
}
public void replaceContentPane(PropertyItem propertyItem) {
this.propertyItem = propertyItem;
JComponent contentPane = propertyItem.getContentPane();
container.remove(this.contentPane);
container.add(this.contentPane = contentPane);
// pack();
if (getSize().height < container.getPreferredSize().height) {
setSize(CONTENT_WIDTH, container.getPreferredSize().height);
replaceContentPane(propertyItem.getContentPane());
}
public void replaceContentPane(JComponent contentPane) {
contentWrapper.remove(this.contentPane);
contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER);
refreshContainer();
}

2
designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java

@ -56,7 +56,7 @@ public class ColorSelectDetailPane extends BasicPane {
@Override
protected String title4PopupWindow() {
return null;
return Inter.getLocText("FR-Designer_Select_Color");
}
protected void initComponents() {

1
designer_base/src/com/fr/design/style/color/ColorSelectDialog.java

@ -113,6 +113,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
}
});
this.setTitle(pane.title4PopupWindow());
GUICoreUtils.setWindowCenter(getOwner(), this);
}

8
designer_base/src/com/fr/file/FILEChooserPane.java

@ -1,10 +1,6 @@
package com.fr.file;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@ -510,7 +506,7 @@ public class FILEChooserPane extends BasicPane {
this.suffix = suffix;
dialog = showWindow(SwingUtilities.getWindowAncestor(parent), false);
dialog = showWindow((Window)parent, false);
JPanel contentPane = (JPanel) dialog.getContentPane();
contentPane.setLayout(FRGUIPaneFactory.createM_BorderLayout());
contentPane.add(this, BorderLayout.CENTER);

Loading…
Cancel
Save