Browse Source

Pull request #11743: REPORT-92147&REPORT-92159&REPORT-82787回退补充繁中图片,修复两个问题

Merge in DESIGN/design from ~OBO/design:release/11.0 to release/11.0

* commit '1a040cf5cd0d008f5c13206a7f597f254833960d':
  常量命名规范修复
  REPORT-82787回退
  REPORT-92147 REPORT-92159问题修复
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
newui
Obo-王学仁 2 years ago committed by Bruce.Deng-邓铖臻
parent
commit
427454af12
  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. 27
      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.
*/
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");
public static final Cursor DRAW_CURSOR = Toolkit.getDefaultToolkit().createCustomCursor(
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() {
if (tabledata instanceof DBTableData) {
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 {
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(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(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(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));

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 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);
SvgPaintUtils.beforePaint((Graphics2D) g);
g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, this);
g.drawImage(upButton, ARROW_MARGIN, 1, this);
g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 1, this);
g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, null);
g.drawImage(upButton, ARROW_MARGIN, 1, null);
g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 1, null);
SvgPaintUtils.afterPaint((Graphics2D) g);
}
}

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

@ -1,6 +1,7 @@
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 javax.swing.GrayFilter;
@ -15,10 +16,10 @@ import java.awt.image.ImageObserver;
* @since 2012-3-28下午10:20:29
*/
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);
private final static Image warnighImage = BaseUtils.readImage("/com/fr/design/images/gui/warning.png");
protected final static MediaTracker TRACKER = new MediaTracker(COMPONENT);
private final static Image WARNING_IMAGE = SVGLoader.load("/com/fr/design/standard/warning.svg");
private Image mainImage = null;
private ImageObserver imageObserver;
@ -35,12 +36,14 @@ public class WarningIcon extends ImageIcon {
@Override
public synchronized void paintIcon(Component c, Graphics g, int x, int y) {
SvgPaintUtils.beforePaint((Graphics2D) g);
if (mainImage != null) {
g.drawImage(mainImage, x, y, c);
}
if (warnighImage != null) {
g.drawImage(warnighImage, x, y, c);
if (WARNING_IMAGE != null) {
g.drawImage(WARNING_IMAGE, x, y, c);
}
SvgPaintUtils.afterPaint((Graphics2D) g);
}
/**
@ -50,17 +53,17 @@ public class WarningIcon extends ImageIcon {
* the image
*/
protected void loadImage(Image image) {
synchronized (tracker) {
tracker.addImage(image, 0);
synchronized (TRACKER) {
TRACKER.addImage(image, 0);
try {
tracker.waitForID(0, 0);
TRACKER.waitForID(0, 0);
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
}
tracker.statusID(0, false);
tracker.removeImage(image, 0);
TRACKER.statusID(0, false);
TRACKER.removeImage(image, 0);
width = image.getWidth(imageObserver);
height = image.getHeight(imageObserver);
@ -101,6 +104,6 @@ public class WarningIcon extends ImageIcon {
}
{
loadImage(warnighImage);
loadImage(WARNING_IMAGE);
}
}

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">
<title>icon_斜线_normal</title>
<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>
</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