Browse Source

REPORT-92147 REPORT-92159问题修复

newui
obo 2 years ago
parent
commit
765d0e7b1c
  1. 2
      designer-base/src/main/java/com/fr/design/constants/UIConstants.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
  4. 8
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java
  5. 7
      designer-base/src/main/java/com/fr/design/icon/WarningIcon.java
  6. 2
      designer-base/src/main/resources/com/fr/design/standard/bias/bias_normal.svg
  7. 9
      designer-base/src/main/resources/com/fr/design/standard/warning.svg

2
designer-base/src/main/java/com/fr/design/constants/UIConstants.java

@ -55,7 +55,7 @@ public interface UIConstants {
* Cell default cursor. * Cell default cursor.
*/ */
public static final Cursor CELL_DEFAULT_CURSOR = Toolkit.getDefaultToolkit().createCustomCursor( public static final Cursor CELL_DEFAULT_CURSOR = Toolkit.getDefaultToolkit().createCustomCursor(
SVGLoader.load("/com/fr/design/standard/cell_default_normal.svg"), IOUtils.readImage("/com/fr/base/images/cell/cursor/cell_default.png"),
new Point(16, 16), "CellDefaultCursor"); new Point(16, 16), "CellDefaultCursor");
public static final Cursor DRAW_CURSOR = Toolkit.getDefaultToolkit().createCustomCursor( public static final Cursor DRAW_CURSOR = Toolkit.getDefaultToolkit().createCustomCursor(
IOUtils.readImage("/com/fr/base/images/cell/cursor/cursor_draw.png"), IOUtils.readImage("/com/fr/base/images/cell/cursor/cursor_draw.png"),

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java

@ -27,7 +27,7 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper {
public Icon getIcon() { public Icon getIcon() {
if (tabledata instanceof DBTableData) { if (tabledata instanceof DBTableData) {
if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) {
return new WarningIcon(BaseUtils.readImage("/com/fr/design/images/gui/warning.png")); return new WarningIcon(SVGLoader.load("/com/fr/design/standard/server_database_normal.svg"));
} }
else { else {
return IconUtils.readIcon("/com/fr/design/standard/server_database"); return IconUtils.readIcon("/com/fr/design/standard/server_database");

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java

@ -59,7 +59,7 @@ public abstract class TableDataFactory {
defaultMap.put(ClassTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/class_table_data_normal.svg", ClassTableData.class, ClassTableDataPane.class)); defaultMap.put(ClassTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/class_table_data_normal.svg", ClassTableData.class, ClassTableDataPane.class));
defaultMap.put(EmbeddedTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/data_table_normal.svg", EmbeddedTableData.class, EmbeddedTableDataPane.class)); defaultMap.put(EmbeddedTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/data_table_normal.svg", EmbeddedTableData.class, EmbeddedTableDataPane.class));
defaultMap.put(DecoratedTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", DecoratedTableData.class, DecoratedTableDataPane.class)); defaultMap.put(DecoratedTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", DecoratedTableData.class, DecoratedTableDataPane.class));
defaultMap.put(StoreProcedure.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/images/data/store_procedure.png", StoreProcedure.class, ProcedureDataPane.class)); defaultMap.put(StoreProcedure.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/store_procedure_normal.svg", StoreProcedure.class, ProcedureDataPane.class));
defaultMap.put(MultiTDTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", MultiTDTableData.class, MultiTDTableDataPane.class)); defaultMap.put(MultiTDTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/multi_normal.svg", MultiTDTableData.class, MultiTDTableDataPane.class));
defaultMap.put(FileTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/file_normal.svg", FileTableData.class, FileTableDataPane.class)); defaultMap.put(FileTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/file_normal.svg", FileTableData.class, FileTableDataPane.class));
defaultMap.put(RecursionTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/tree_normal.svg", RecursionTableData.class, TreeTableDataPane.class)); defaultMap.put(RecursionTableData.class.getName(), new TableDataNameObjectCreator(null, "/com/fr/design/standard/tree_normal.svg", RecursionTableData.class, TreeTableDataPane.class));

8
designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -410,13 +410,11 @@ public class UIResizableContainer extends JPanel {
Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS); Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS);
Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS); Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS);
int width = getWidth();
int height = getHeight();
g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null); g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null);
SvgPaintUtils.beforePaint((Graphics2D) g); SvgPaintUtils.beforePaint((Graphics2D) g);
g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, this); g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, null);
g.drawImage(upButton, ARROW_MARGIN, 1, this); g.drawImage(upButton, ARROW_MARGIN, 1, null);
g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 1, this); g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 1, null);
SvgPaintUtils.afterPaint((Graphics2D) g); SvgPaintUtils.afterPaint((Graphics2D) g);
} }
} }

7
designer-base/src/main/java/com/fr/design/icon/WarningIcon.java

@ -1,6 +1,7 @@
package com.fr.design.icon; package com.fr.design.icon;
import com.fr.base.BaseUtils; import com.fr.base.svg.SVGLoader;
import com.fr.design.utils.SvgPaintUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import javax.swing.GrayFilter; import javax.swing.GrayFilter;
@ -18,7 +19,7 @@ public class WarningIcon extends ImageIcon {
protected final static Component component = new Component() { protected final static Component component = new Component() {
}; };
protected final static MediaTracker tracker = new MediaTracker(component); protected final static MediaTracker tracker = new MediaTracker(component);
private final static Image warnighImage = BaseUtils.readImage("/com/fr/design/images/gui/warning.png"); private final static Image warnighImage = SVGLoader.load("/com/fr/design/standard/warning.svg");
private Image mainImage = null; private Image mainImage = null;
private ImageObserver imageObserver; private ImageObserver imageObserver;
@ -35,12 +36,14 @@ public class WarningIcon extends ImageIcon {
@Override @Override
public synchronized void paintIcon(Component c, Graphics g, int x, int y) { public synchronized void paintIcon(Component c, Graphics g, int x, int y) {
SvgPaintUtils.beforePaint((Graphics2D) g);
if (mainImage != null) { if (mainImage != null) {
g.drawImage(mainImage, x, y, c); g.drawImage(mainImage, x, y, c);
} }
if (warnighImage != null) { if (warnighImage != null) {
g.drawImage(warnighImage, x, y, c); g.drawImage(warnighImage, x, y, c);
} }
SvgPaintUtils.afterPaint((Graphics2D) g);
} }
/** /**

2
designer-base/src/main/resources/com/fr/design/standard/bias/bias_normal.svg

@ -2,6 +2,6 @@
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon_斜线_normal</title> <title>icon_斜线_normal</title>
<g id="icon_斜线_normal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="icon_斜线_normal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<polygon id="Page-1" fill="#757575" points="1 1.000525 8.99925 14.5744 9.75 14.12465 3.296 3.1259 14.608875 8.61915 15 7.836025"></polygon> <polygon id="Page-1" fill="#333334" points="1 1.000525 8.99925 14.5744 9.75 14.12465 3.296 3.1259 14.608875 8.61915 15 7.836025"></polygon>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 481 B

9
designer-base/src/main/resources/com/fr/design/standard/warning.svg

@ -0,0 +1,9 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.98042 15.975C6.2925 15.975 6.01125 15.4846 6.35521 14.8856L10.3746 7.88272C10.7185 7.28356 11.2815 7.28356 11.6252 7.88272L15.6448 14.8856C15.9888 15.4846 15.7075 15.975 15.0196 15.975H6.98042Z" fill="#FBB03B"/>
<mask id="mask0_3826_46126" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="7" width="10" height="10">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.20831 16.0861H15.7916V7.54443H6.20831V16.0861Z" fill="white"/>
</mask>
<g mask="url(#mask0_3826_46126)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5833 14.7251H11.4167V13.8917H10.5833V14.7251ZM11.625 10.1417L11.4167 13.4751H10.5833L10.375 10.1417H11.625Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 825 B

Loading…
Cancel
Save