Browse Source

Merge branch 'feature/10.0' of ssh://code.fineres.com:7999/~tommy/design into feature/10.0

feature/10.0
kuangshuai 3 years ago
parent
commit
d357671ce5
  1. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  2. 4
      designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java
  3. 7
      designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java
  4. 3
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java

3
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -515,8 +515,9 @@ public class JDBCDefPane extends JPanel {
refreshDriverManage(true); refreshDriverManage(true);
this.driverManageBox.setSelectedItem(Toolkit.i18nText("Fine-Design_Driver_Manage_Self_Define")); this.driverManageBox.setSelectedItem(Toolkit.i18nText("Fine-Design_Driver_Manage_Self_Define"));
String represent = getRepresent(jdbcDatabase.getDriver(), jdbcDatabase.getDriverSource()); String represent = getRepresent(jdbcDatabase.getDriver(), jdbcDatabase.getDriverSource());
this.driverLoaderBox.removeItem(represent); if (!nameAndRepresent.containsValue(represent)) {
this.driverLoaderBox.addItem(represent); this.driverLoaderBox.addItem(represent);
}
this.driverLoaderBox.setSelectedItem(represent); this.driverLoaderBox.setSelectedItem(represent);
} }
this.urlTextField.setText(jdbcDatabase.getURL()); this.urlTextField.setText(jdbcDatabase.getURL());

4
designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java

@ -24,6 +24,7 @@ import java.awt.Cursor;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Point; import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
@ -183,6 +184,9 @@ public class StateModel {
FormSelectionUtils.rebuildSelection(designer); FormSelectionUtils.rebuildSelection(designer);
designer.getEditListenerTable().fireCreatorModified( designer.getEditListenerTable().fireCreatorModified(
selectionModel.getSelection().getSelectedCreator(), DesignerEvent.CREATOR_ADDED); selectionModel.getSelection().getSelectedCreator(), DesignerEvent.CREATOR_ADDED);
} else {
selectionModel.getSelection().setSelectionBounds(selectedPositionBackup, designer);
Toolkit.getDefaultToolkit().beep();
} }
// 取消提示 // 取消提示
designer.setPainter(null); designer.setPainter(null);

7
designer-form/src/main/java/com/fr/design/mainframe/FormSpacingLineDrawer.java

@ -17,9 +17,10 @@ import java.awt.geom.RoundRectangle2D;
public class FormSpacingLineDrawer { public class FormSpacingLineDrawer {
private static final Color LINE_COLOR = new Color(230, 82, 81); private static final Color LINE_COLOR = new Color(230, 82, 81);
private static final Color TEXT_COLOR = new Color(255, 255, 255); private static final Color TEXT_COLOR = new Color(255, 255, 255);
private static final int TEXT_PADDING_HORIZONTAL = 6; private static final int TEXT_PADDING_HORIZONTAL = 8;
private static final int TEXT_PADDING_VERTICAL = 1; private static final int TEXT_PADDING_VERTICAL = 2;
private static final int MIN_SPACING = 10; private static final int MIN_SPACING = 10;
private static final float TIP_FONT_SIZE = 10F;
private FormDesigner designer; private FormDesigner designer;
private XCreator hoverCreator = null; private XCreator hoverCreator = null;
@ -109,7 +110,7 @@ public class FormSpacingLineDrawer {
private void drawSpacingText(Graphics g, String text, int x, int y) { private void drawSpacingText(Graphics g, String text, int x, int y) {
Graphics2D g2d = (Graphics2D) g.create(); Graphics2D g2d = (Graphics2D) g.create();
g2d.setColor(LINE_COLOR); g2d.setColor(LINE_COLOR);
Font newFont = g2d.getFont().deriveFont(8F).deriveFont(Font.BOLD); Font newFont = g2d.getFont().deriveFont(TIP_FONT_SIZE).deriveFont(Font.BOLD);
g2d.setFont(newFont); g2d.setFont(newFont);
FontMetrics metrics = g2d.getFontMetrics(); FontMetrics metrics = g2d.getFontMetrics();
int lineHeight = metrics.getAscent(); // 这里由于都是数字,要居中必须忽略掉leading和descent的高度 int lineHeight = metrics.getAscent(); // 这里由于都是数字,要居中必须忽略掉leading和descent的高度

3
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.widget.ui; package com.fr.design.mainframe.widget.ui;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
@ -154,7 +155,7 @@ public class FormSingleWidgetCardPane extends FormWidgetCardPane {
private static void freshPropertyMode(XCreator xCreator) { private static void freshPropertyMode(XCreator xCreator) {
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (!(jTemplate instanceof JForm) && jTemplate.isUpMode()) { if (!(jTemplate instanceof JForm) && jTemplate.isUpMode() && !DesignModeContext.isAuthorityEditing()) {
if (xCreator instanceof XWParameterLayout) { if (xCreator instanceof XWParameterLayout) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA);
} else { } else {

Loading…
Cancel
Save