Browse Source

Merge pull request #4983 in DESIGN/design from feature/10.0 to release/11.0

* commit '741d594ce65ca441e907f8e9cfcf8ddd2be16ece':
  REPORT-55149 【组件背景分离】组件复用-图表块没看到内边距设置项
  REPORT-55214 【组件背景分离】组件复用-组件编辑状态,蓝色实线边框感觉不太明显,和交互图预期效果不太一样;阴影效果看起来正常
  REPORT-55187【组件背景分离】组件复用-body和参数面板里的控件(frm参面和body 以及 cpt参面),应该也有只显示锁按钮的工具栏,现在是没有工具栏的
  REPORT-53175 【10.0.18】组件背景分离为标题/背景/边框
  REPORT-55211【组件背景分离】组件复用-图表块取消勾选标题可见,设置的主体背景(颜色/渐变色/图片),在设计界面里会遮盖住图表,可见图。web效果正常
  REPORT-53175 【10.0.18】组件背景分离为标题/背景/边框
  无jira任务 代码质量
  REPORT-52641 文件数据集需要限制目录
fix-lag
superman 3 years ago
parent
commit
79167aeafc
  1. 24
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java
  2. 10
      designer-form/src/main/java/com/fr/design/designer/beans/events/DesignerEditor.java
  3. 3
      designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java

24
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

@ -26,6 +26,7 @@ import com.fr.design.gui.itableeditorpane.UITableEditorPane;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -612,7 +613,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private void setTextField(FileTableData ob) {
if (ob.getFilePath() != null) {
if (ob.getFilePath().indexOf("http") != -1) {
if (ob.getFilePath().contains("http")) {
urlRadioSelectAction();
urlText.setText(ob.getFilePath());
} else {
@ -625,6 +626,15 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
@Override
public FileTableData updateBean() {
String filePath = getFilePathFromUrlOrLocal();
// 安全要求禁止 file 协议访问本地磁盘
if (FileTableData.isInvalidFilePath(filePath)) {
FineJOptionPane.showMessageDialog(this,
Toolkit.i18nText("Fine-Design_File_Table_Data_Path_Invalid"),
Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip"),
JOptionPane.ERROR_MESSAGE);
// 阻止对话框关闭
throw new RuntimeException(Toolkit.i18nText("Fine-Design_File_Table_Data_Path_Invalid"));
}
if (StringUtils.isNotBlank(filePath)) {
this.params = getEditorPaneParameter().length == 0 ? null : getEditorPaneParameter();
if (fileTypeComboBox.getSelectedIndex() == EXCEL) {
@ -786,6 +796,14 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
if (this.fileTableData == null) {
return;
}
String filePath = getFilePathFromUrlOrLocal();
if (FileTableData.isInvalidFilePath(filePath)) {
FineJOptionPane.showMessageDialog(this,
Toolkit.i18nText("Fine-Design_File_Table_Data_Path_Invalid"),
Toolkit.i18nText("Fine-Design_Basic_Widget_Error_Tip"),
JOptionPane.ERROR_MESSAGE);
return;
}
PreviewTablePane.previewTableData(this.updateBean());
}
@ -802,7 +820,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
xmlNodeTree = new XMLNodeTree();
this.add(new JScrollPane(xmlNodeTree));
keyPointLaber = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Key_Point") + ":");
keyPointLaber = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Key_Point") + ":");
refreshAction = new RefreshParameterAction();
ToolBarDef toolbarDef = new ToolBarDef();
toolbarDef.addShortCut(refreshAction);
@ -820,7 +838,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private class RefreshParameterAction extends UpdateAction {
public RefreshParameterAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setName(Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setMnemonic('r');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
}

10
designer-form/src/main/java/com/fr/design/designer/beans/events/DesignerEditor.java

@ -86,9 +86,15 @@ public class DesignerEditor<T extends JComponent> implements PropertyChangeListe
int horizonMargin = marginLeft + marginRight;
int verticalMargin = marginTop + marginBottom;
comp.setSize(new Dimension(size.width - 2 - horizonMargin, size.height - 2 - verticalMargin));
int x = 1 + marginLeft;
int y = 1 + marginTop;
int width = size.width - 2 - horizonMargin;
int height = size.height - 2 - verticalMargin;
comp.setSize(new Dimension(width, height));
LayoutUtils.layoutContainer(comp);
Graphics clipg = g.create(1 + marginLeft, 1 + marginTop, size.width, size.height);
comp.setBounds(comp.getX() + x, comp.getY() + y, width, height);
Graphics clipg = g.create(x, y, width, height);
this.comp.paint(clipg);
}
}

3
designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java

@ -146,6 +146,9 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
if (isEditing) {
g.setColor(OUTER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 1, bounds.height + BORDER_WIDTH + 1), Constants.LINE_LARGE);
g.setColor(INNER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height), Constants.LINE_MEDIUM);
} else if (!isHovering) {
super.paintBorder(g, bounds);
}

Loading…
Cancel
Save