Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

newui
John.Ying-应志浩 2 years ago
parent
commit
bb694b24d6
  1. 2
      designer-base/src/main/java/com/fr/design/actions/file/LocateAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/constants/UIConstants.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java
  4. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
  5. 8
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java
  6. 27
      designer-base/src/main/java/com/fr/design/icon/WarningIcon.java
  7. 2
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  8. 3
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  9. 2
      designer-base/src/main/resources/com/fr/design/standard/bias/bias_normal.svg
  10. 15
      designer-base/src/main/resources/com/fr/design/standard/locate/locate_disabled.svg
  11. 0
      designer-base/src/main/resources/com/fr/design/standard/locate/locate_normal.svg
  12. 9
      designer-base/src/main/resources/com/fr/design/standard/warning.svg

2
designer-base/src/main/java/com/fr/design/actions/file/LocateAction.java

@ -28,7 +28,7 @@ public class LocateAction extends UpdateAction {
public LocateAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Locate"));
this.setSmallIcon("/com/fr/design/standard/locate", false);
this.setSmallIcon("/com/fr/design/standard/locate/locate");
}
@Override

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/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -452,7 +452,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public SwitchAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Search"));
this.setMnemonic('S');
this.setSmallIcon("/com/fr/design/standard/search_normal");
this.setSmallIcon("/com/fr/design/standard/search", false);
}
@Override

3
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
import com.fr.base.TRL;
import com.fr.base.extension.FileExtension;
@ -1425,7 +1424,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public Icon getPreviewLargeIcon() {
PreviewProvider provider = getPreviewType();
String iconPath = provider.iconPathForLarge();
return BaseUtils.readIcon(iconPath);
return IconUtils.readIcon(iconPath);
}
/**

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

15
designer-base/src/main/resources/com/fr/design/standard/locate/locate_disabled.svg

@ -0,0 +1,15 @@
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2163_45508)">
<circle cx="8" cy="8" r="6" stroke="#C2C2C2" stroke-width="1.2"/>
<circle cx="8" cy="8" r="2.5" fill="#C2C2C2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.5 8.5C2.5 8.77614 2.27614 9 2 9L0.5 9C0.223858 9 -9.78513e-09 8.77614 -2.18557e-08 8.5L-6.55671e-08 7.5C-7.76376e-08 7.22386 0.223858 7 0.5 7L2 7C2.27614 7 2.5 7.22386 2.5 7.5L2.5 8.5Z" fill="#C2C2C2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 2.5C7.22386 2.5 7 2.27614 7 2V0.5C7 0.223858 7.22386 0 7.5 0H8.5C8.77614 0 9 0.223858 9 0.5V2C9 2.27614 8.77614 2.5 8.5 2.5H7.5Z" fill="#C2C2C2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 16C7.22386 16 7 15.7761 7 15.5V14C7 13.7239 7.22386 13.5 7.5 13.5H8.5C8.77614 13.5 9 13.7239 9 14V15.5C9 15.7761 8.77614 16 8.5 16H7.5Z" fill="#C2C2C2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 8.5C16 8.77614 15.7761 9 15.5 9L14 9C13.7239 9 13.5 8.77614 13.5 8.5L13.5 7.5C13.5 7.22386 13.7239 7 14 7L15.5 7C15.7761 7 16 7.22386 16 7.5L16 8.5Z" fill="#C2C2C2"/>
</g>
<defs>
<clipPath id="clip0_2163_45508">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

0
designer-base/src/main/resources/com/fr/design/standard/locate_normal.svg → designer-base/src/main/resources/com/fr/design/standard/locate/locate_normal.svg

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

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