Browse Source

Merge branch 'final/11.0' of ssh://code.fineres.com:7999/~kerry/design_10.0 into release/11.0

# Conflicts:
#	designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
#	designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java
#	designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
bugfix/11.0
kerry 3 years ago
parent
commit
c11e4f02da
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  2. 9
      designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java
  3. 4
      designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java
  4. 4
      designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java
  5. 2
      designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java
  6. 7
      designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java
  7. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java
  8. 1
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  9. 21
      designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java
  10. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash.png
  11. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash@2x.png
  12. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_en.png
  13. BIN
      designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png

1
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -316,7 +316,6 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
colorListExtendedPane.populate(colors);
FineColorManager.FineColorReplaceByColorScheme replaceByColorScheme = new FineColorManager.FineColorReplaceByColorScheme(colors);
T theme = updateBean();
FineColorFlushUtils.replaceCacheObject(theme, replaceByColorScheme);
FineColorManager.traverse(theme, replaceByColorScheme);
populateBean4CustomEditors(theme);

9
designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java

@ -28,6 +28,7 @@ import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.main.Form;
import com.fr.form.main.WidgetGather;
import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.ui.AbstractBorderStyleWidget;
import com.fr.form.ui.Button;
import com.fr.form.ui.CardAddButton;
import com.fr.form.ui.CardSwitchButton;
@ -232,7 +233,7 @@ public class XCreatorUtils {
JTemplate<?,?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
TemplateTheme theme = template.getTemplateTheme();
if (theme instanceof FormTheme) {
setupTemplateTheme(creator, (FormTheme) theme, TemplateThemeCompatible.NONE);
setupTemplateTheme(creator, true, (FormTheme) theme, TemplateThemeCompatible.NONE);
}
return creator;
}
@ -378,12 +379,16 @@ public class XCreatorUtils {
return null;
}
public static void setupTemplateTheme(XCreator container, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) {
public static void setupTemplateTheme(XCreator container, final boolean forceFollowingTheme, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) {
FineColorGather colorGather = new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible);
Form.traversalWidget(container.toData(), new WidgetGather() {
@Override
public void dealWith(Widget widget) {
TemplateThemeAware<FormTheme> themedWidget = (TemplateThemeAware) widget;
if (forceFollowingTheme && widget instanceof AbstractBorderStyleWidget) {
((AbstractBorderStyleWidget) widget).setBorderStyleFollowingTheme(true);
}
themedWidget.onTemplateUsingThemeChange(currentTemplateUsingTheme, compatible);
}

4
designer-form/src/main/java/com/fr/design/designer/creator/XWTitleLayout.java

@ -76,7 +76,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
// 初始化后(如打开旧模版),需要重新调整组件/标题/边框的显示效果
XCreator xCreator = getBodyCreator();
if (xCreator instanceof XBorderStyleWidgetCreator) {
((XBorderStyleWidgetCreator) xCreator).initStyle();
((XBorderStyleWidgetCreator) xCreator).refreshStylePreviewEffect();
}
}
@ -237,7 +237,7 @@ public class XWTitleLayout extends DedicateLayoutContainer {
}
// 刷新时重置下样式
if (bodyCreator != null) {
bodyCreator.initStyle();
bodyCreator.refreshStylePreviewEffect();
}
isRefreshing = false;
}

4
designer-form/src/main/java/com/fr/design/fit/attrpane/FRAbsoluteBodyLayoutExtendDefinePane.java

@ -115,12 +115,10 @@ public class FRAbsoluteBodyLayoutExtendDefinePane extends FRAbsoluteLayoutDefine
initLayoutComboBox();
UILabel layoutTypeLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout_Type"));
UILabel scaleModeLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Scaling_Mode"));
JPanel contentPane = TableLayoutHelper.createGapTableLayoutPane(
new Component[][]{
{layoutTypeLabel, layoutCombox},
{scaleModeLabel, comboBox}
{layoutTypeLabel, layoutCombox}
},
TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);

2
designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java

@ -99,7 +99,7 @@ public class ToolBarButton extends UIButton implements MouseListener, MouseMotio
creatorSource = no.getNameOption().createWidget();
}
if (creatorSource != null) {
XCreator xCreator = XCreatorUtils.createXCreator(creatorSource);
XCreator xCreator = XCreatorUtils.createThemedXCreator(creatorSource);
WidgetToolBarPane.getTarget().startDraggingBean(xCreator);
FormDesignerUtils.addWidgetProcessInfo(xCreator.toData());
lastPressEvent = null;

7
designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java

@ -251,7 +251,10 @@ public class CreateComponentAction extends UpdateAction {
private Image componentToImage(Component comp, Rectangle rect) {
BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB);
BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = (Graphics2D)im.getGraphics();
g2d.setColor(Color.WHITE);
g2d.fillRect(0, 0 , rect.width, rect.height);
comp.paint(im.getGraphics());
return im;
}
@ -260,7 +263,7 @@ public class CreateComponentAction extends UpdateAction {
private Image moduleToImage(Form form, ElementCaseEditor editor, Map<String, Object> parameterMap, Rectangle rect) {
if (editor == null) {
return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB);
return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB);
}
FormElementCaseProvider provider = editor.getElementCase();
provider.setName(editor.getWidgetName());

2
designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java

@ -61,7 +61,7 @@ public class ShareComponentUtils {
boolean isCurrentUsingThemeSuitSharedComponent = StringUtils.isNotEmpty(theme.getName()) &&
StringUtils.isNotEmpty(suitableTemplateThemeName) &&
StringUtils.equals(theme.getName(), suitableTemplateThemeName);
XCreatorUtils.setupTemplateTheme(creator, (FormTheme) theme, isCurrentUsingThemeSuitSharedComponent ? TemplateThemeCompatible.NONE : TemplateThemeCompatible.ABSENT);
XCreatorUtils.setupTemplateTheme(creator, false, (FormTheme) theme, isCurrentUsingThemeSuitSharedComponent ? TemplateThemeCompatible.NONE : TemplateThemeCompatible.ABSENT);
}
return creator;
}

1
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -246,6 +246,7 @@ public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane<WFitLayout
FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{wAbsoluteBodyLayout}));
if (xwAbsoluteBodyLayout.toData() != null) {
xwAbsoluteBodyLayout.toData().setBorderStyleFollowingTheme(wAbsoluteBodyLayout.isBorderStyleFollowingTheme());
xwAbsoluteBodyLayout.toData().setBorderStyle(wAbsoluteBodyLayout.getBorderStyle());
}
xwAbsoluteBodyLayout.refreshStylePreviewEffect();

21
designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java

@ -383,8 +383,27 @@ public class CellSelection extends Selection {
return false;
}
}
int rowStartIndex = row;
int rowEndIndex = row + rowSpan - 1;
int columnStartIndex = column;
int columnEndIndex = column + columnSpan - 1;
// 合并已有单元格,还是新建单元格
boolean hasCellElement = false;
for (int ri = rowStartIndex; ri <= rowEndIndex; ri++) {
for (int ci = columnStartIndex; ci <= columnEndIndex; ci++) {
CellElement ce = ec.getCellElement(ci, ri);
if (ce != null) {
hasCellElement = true;
break;
}
}
}
if (hasCellElement) {
ec.merge(row, row + rowSpan - 1, column, column + columnSpan - 1);
} else {
ec.addCellElement(DefaultThemedTemplateCellElementCase.createInstance(column, row, columnSpan, rowSpan, null), true);
}
return true;
}

BIN
designer-realize/src/main/resources/com/fr/design/images/splash.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 297 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 KiB

After

Width:  |  Height:  |  Size: 946 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 298 KiB

BIN
designer-realize/src/main/resources/com/fr/design/images/splash_en@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 911 KiB

After

Width:  |  Height:  |  Size: 949 KiB

Loading…
Cancel
Save