Fangjie Hu 8 years ago
parent
commit
e5425abb44
  1. 18
      designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java
  2. 1
      designer_base/src/com/fr/design/actions/file/PreferenceAction.java
  3. 38
      designer_base/src/com/fr/design/actions/file/PreferencePane.java
  4. 18
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  5. 13
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  6. 1
      designer_base/src/com/fr/design/locale/designer.properties
  7. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  8. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  9. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  10. 31
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  11. 0
      sonar-dev-project.properties

18
designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

@ -8,12 +8,14 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import com.fr.base.FRContext;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.extra.WebDialog; import com.fr.design.extra.WebDialog;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.env.RemoteEnv;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.page.ReportPageAttrProvider; import com.fr.page.ReportPageAttrProvider;
import com.fr.stable.ColumnRow; import com.fr.stable.ColumnRow;
@ -211,13 +213,13 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
//自适应插件 //自适应插件
JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Attention")); if (shouldShowTip()) {
JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Attention"));
BoxCenterAligmentPane actionLabel = getURLActionLabel(Inter.getLocText("FR-Designer_Form-Fit-Tip")); BoxCenterAligmentPane actionLabel = getURLActionLabel(Inter.getLocText("FR-Designer_Form-Fit-Tip"));
infoPane.add(actionLabel, BorderLayout.SOUTH); infoPane.add(actionLabel, BorderLayout.SOUTH);
this.add(infoPane, BorderLayout.SOUTH);
}
outfreezePanel.add(freezePanel); outfreezePanel.add(freezePanel);
this.add(infoPane, BorderLayout.SOUTH);
// 重复打印部分 // 重复打印部分
// 重复打印标题的起始行 // 重复打印标题的起始行
JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
@ -241,6 +243,10 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
initWriteListener(); initWriteListener();
} }
private boolean shouldShowTip() {
return !(FRContext.getCurrentEnv() instanceof RemoteEnv) && FRContext.isChineseEnv();
}
protected void initWriteListener() { protected void initWriteListener() {
// 填报重复冻结行 // 填报重复冻结行
useWriteFrozenCCheckBox.addChangeListener(useWriteFrozenCListener); useWriteFrozenCCheckBox.addChangeListener(useWriteFrozenCListener);

1
designer_base/src/com/fr/design/actions/file/PreferenceAction.java

@ -38,6 +38,7 @@ public class PreferenceAction extends UpdateAction {
DesignerEnvManager.getEnvManager().saveXMLFile(); DesignerEnvManager.getEnvManager().saveXMLFile();
JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
jt.refreshToolArea(); jt.refreshToolArea();
preferencePane.showRestartDialog();
} }
}); });

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

@ -83,6 +83,8 @@ public class PreferencePane extends BasicPane {
}; };
private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言 private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言
private boolean languageChanged; // 是否修改了设计器语言设置
//设置是否支持undo //设置是否支持undo
private UICheckBox supportUndoCheckBox; private UICheckBox supportUndoCheckBox;
//设置最大撤销次数 //设置最大撤销次数
@ -627,25 +629,35 @@ public class PreferencePane extends BasicPane {
return l; return l;
} }
// 如果语言设置改变了,则显示重启对话框
public void showRestartDialog() {
if (!languageChanged) {
return;
}
int rv = JOptionPane.showOptionDialog(
null,
Inter.getLocText("FR-Designer_Language_Change_Successful"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later")},
null
);
if (rv == JOptionPane.OK_OPTION) {
RestartHelper.restart();
}
}
@Override @Override
public BasicDialog showWindow(Window window) { public BasicDialog showWindow(Window window) {
return showWindow(window, new DialogActionAdapter() { return showWindow(window, new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
if (languageComboBox.getSelectedIndex() != designerEnvLanguageIndex) { if (languageComboBox.getSelectedIndex() != designerEnvLanguageIndex) {
int rv = JOptionPane.showOptionDialog( languageChanged = true;
null, } else {
Inter.getLocText("FR-Designer_Language_Change_Successful"), languageChanged = false;
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE,
null,
new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later")},
null
);
if (rv == JOptionPane.OK_OPTION) {
RestartHelper.restart();
}
} }
} }
}); });

18
designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -11,13 +11,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.swing.BorderFactory; import javax.swing.*;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.SwingWorker;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
@ -45,6 +39,7 @@ import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManager;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
@ -119,8 +114,13 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
// 左边的Panel,上面是选择DatabaseConnection的ComboBox,下面DatabaseConnection对应的Table // 左边的Panel,上面是选择DatabaseConnection的ComboBox,下面DatabaseConnection对应的Table
initconnectionTableProcedurePane(); initconnectionTableProcedurePane();
this.setLayout(new BorderLayout(4, 4)); this.setLayout(new BorderLayout(4, 4));
this.add(connectionTableProcedurePane, BorderLayout.WEST); connectionTableProcedurePane.setMinimumSize(new Dimension(155, 500));
this.add(sqlSplitPane, BorderLayout.CENTER); box.setMinimumSize(new Dimension(310, 400));
// 使用SplitPane
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, connectionTableProcedurePane, sqlSplitPane);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
this.add(mainSplitPane, BorderLayout.CENTER);
} }
private void initconnectionTableProcedurePane() { private void initconnectionTableProcedurePane() {

13
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -529,17 +529,6 @@ public class PluginWebBridge {
return LoginWebBridge.getHelper().pluginManageLogin(username, password, uiLabel); return LoginWebBridge.getHelper().pluginManageLogin(username, password, uiLabel);
} }
/**
* 插件管理部分的登陆的回调处理
* @param username
* @param password
* @param callback
*/
public void defaultLogin(String username, String password, final JSObject callback) {
Task<Void> task = new PluginTask<>(webEngine, callback, new PluginLoginExecutor(username, password, uiLabel));
new Thread(task).start();
}
/** /**
* 弹出QQ授权页面 * 弹出QQ授权页面
*/ */
@ -556,4 +545,4 @@ public class PluginWebBridge {
DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY); DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY);
uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn")); uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
} }
} }

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

@ -357,7 +357,6 @@ FR-Designer_KeyPoint=KeyPoint
FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer_loadedTreeModel=loadedTreeModel
FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\:
FR-Designer-Plugin_Please_Update_Jar= FR-Designer-Plugin_Please_Update_Jar=
FR-Designer-Invalid_Page_Number=Invalid Page Number
FR-Designer_XMLA_Database=Database FR-Designer_XMLA_Database=Database
FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_UserName=User name
FR-Designer_XMLA_Password=Password FR-Designer_XMLA_Password=Password

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

@ -358,7 +358,6 @@ FR-Designer_KeyPoint=KeyPoint
FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer_loadedTreeModel=loadedTreeModel
FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\:
FR-Designer-Plugin_Please_Update_Jar=Please Update Jar FR-Designer-Plugin_Please_Update_Jar=Please Update Jar
FR-Designer-Invalid_Page_Number=Invalid Page Number
FR-Designer_XMLA_Database=DB FR-Designer_XMLA_Database=DB
FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_UserName=User name
FR-Designer_XMLA_Password=Password FR-Designer_XMLA_Password=Password

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

@ -358,7 +358,6 @@ FR-Designer_KeyPoint=\u5173\u952E\u8282\u70B9
FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5 FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5
FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A
FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C
FR-Designer-Invalid_Page_Number=\u65E0\u6548\u9875\u7801
FR-Designer_Get-CubeGetting=\u83B7\u53D6cube FR-Designer_Get-CubeGetting=\u83B7\u53D6cube
FR-Designer_XMLA_Database=\u6570\u636E\u5E93 FR-Designer_XMLA_Database=\u6570\u636E\u5E93
FR-Designer_XMLA_UserName=\u7528\u6237\u540D FR-Designer_XMLA_UserName=\u7528\u6237\u540D

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

@ -357,7 +357,6 @@ FR-Designer_KeyPoint=\u95DC\u9375\u7BC0\u9EDE
FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66 FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66
FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A
FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C
FR-Designer-Invalid_Page_Number=\u7121\u6548\u9801\u78BC
FR-Designer_Get-CubeGetting=\u7372\u53D6cube FR-Designer_Get-CubeGetting=\u7372\u53D6cube
FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB
FR-Designer_XMLA_UserName=\u5E33\u865F FR-Designer_XMLA_UserName=\u5E33\u865F

31
designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -96,7 +96,6 @@ public class XWAbsoluteLayout extends XLayoutContainer {
if(screenValue != FormArea.DEFAULT_SLIDER){ if(screenValue != FormArea.DEFAULT_SLIDER){
this.setContainerPercent(screenValue / FormArea.DEFAULT_SLIDER); this.setContainerPercent(screenValue / FormArea.DEFAULT_SLIDER);
} }
widget.setDesigningResolution(scrnsize);
} }
/** /**
@ -208,7 +207,33 @@ public class XWAbsoluteLayout extends XLayoutContainer {
} }
} }
} }
/**
* 更新子组件的Bound
* 这边主要用于绝对布局子组件在适应区域选项时
* 涉及到的不同分辨率下缩放
* @param minHeight 最小高度
*/
@Override
public void updateChildBound(int minHeight) {
double prevContainerPercent = FRScreen.getByDimension(toData().getDesigningResolution()).getValue() / FormArea.DEFAULT_SLIDER;
if (toData().getCompState() == 0 && prevContainerPercent != containerPercent) {
for (int i = 0; i < this.getComponentCount(); i++) {
XCreator creator = getXCreator(i);
Rectangle rec = new Rectangle(creator.getBounds());
rec.x = (int)(rec.x / prevContainerPercent * containerPercent);
rec.y = (int)(rec.y / prevContainerPercent * containerPercent);
rec.height = (int)(rec.height / prevContainerPercent * containerPercent);
rec.width = (int)(rec.width / prevContainerPercent * containerPercent);
BoundsWidget wgt = toData().getBoundsWidget(creator.toData());
wgt.setBounds(rec);
creator.setBounds(rec);
creator.updateChildBound(minHeight);
}
}
toData().setDesigningResolution(Toolkit.getDefaultToolkit().getScreenSize());
}
/** /**
* 增加对齐线 * 增加对齐线
* @param connector 对齐线 * @param connector 对齐线
@ -418,7 +443,7 @@ public class XWAbsoluteLayout extends XLayoutContainer {
); );
g2d.setColor(Color.BLACK); g2d.setColor(Color.BLACK);
//画编辑文字 //画编辑文字
g2d.drawString(Inter.getLocText("Edit"), x + w / 2 - 2, y + h / 2 + 5); g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5);
} }
} }

0
sonar-project.properties → sonar-dev-project.properties

Loading…
Cancel
Save