diff --git a/designer-base/src/main/java/com/fr/base/svg/SVGLoader.java b/designer-base/src/main/java/com/fr/base/svg/SVGLoader.java
index 53d105aef..5f4f9e5dc 100644
--- a/designer-base/src/main/java/com/fr/base/svg/SVGLoader.java
+++ b/designer-base/src/main/java/com/fr/base/svg/SVGLoader.java
@@ -75,7 +75,7 @@ public class SVGLoader {
@Nullable
public static Image load(@NotNull String url, float width, float height) {
try {
- String svgUri = url.toString();
+ String svgUri = IOUtils.getResource(url, SVGLoader.class).toString();
TranscoderInput input = new TranscoderInput(svgUri);
return SVGTranscoder.createImage(SVGIcon.SYSTEM_SCALE, input, -1, -1, width, height).getImage();
} catch (TranscoderException ignore) {
diff --git a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java
index 15a7c87c0..5bd0fa222 100644
--- a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java
+++ b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java
@@ -3,6 +3,7 @@
*/
package com.fr.design.constants;
+import com.fr.base.svg.SVGIcon;
import com.fr.general.IOUtils;
import com.fr.stable.Constants;
@@ -179,6 +180,7 @@ public interface UIConstants {
public static final Icon YES_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/yes.png");
public static final Icon CHOOSEN_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/select_item.png");
public static final Icon PRE_WIDGET_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/prewidget.png");
+ public static final Icon PRE_WIDGET_NORMAL_ICON = SVGIcon.readSVGIcon("com/fr/design/images/buttonicon/prewidget_normal.svg", 30, 20);
public static final Icon EDIT_NORMAL_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/editn.png");
public static final Icon EDIT_PRESSED_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/editp.png");
public static final Icon HIDE_NORMAL_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/hiden.png");
diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
index a273828d8..0e035bcc0 100644
--- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
+++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
@@ -1,7 +1,7 @@
package com.fr.design.mainframe;
-import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
+import com.fr.base.svg.SVGIcon;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@@ -673,9 +673,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 完整icon路径为 ICON_BASE_DIR + btnIconName + iconSuffix
private static final String ICON_BASE_DIR = "/com/fr/design/images/buttonicon/propertiestab/";
- private static final String ICON_SUFFIX_NORMAL = "_normal.png";
- private static final String ICON_SUFFIX_DISABLED = "_disabled.png";
- private static final String ICON_SUFFIX_SELECTED = "_selected.png";
+ private static final String ICON_SUFFIX_NORMAL = "_normal.svg";
+ private static final String ICON_SUFFIX_DISABLED = "_disabled.svg";
+ private static final String ICON_SUFFIX_SELECTED = "_selected.svg";
+ private static final int ICON_WIDTH = 18;
+ private static final int ICON_HEIGHT = 18;
private String btnIconName;
private String iconBaseDir;
private String iconSuffix = ICON_SUFFIX_NORMAL; // normal, diabled, selected, 三者之一
@@ -845,7 +847,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void resetButtonIcon() {
if (iconSuffix.equals(ICON_SUFFIX_SELECTED)) {
iconSuffix = ICON_SUFFIX_NORMAL;
- button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
+ button.setIcon(SVGIcon.readSVGIcon(getBtnIconUrl(), ICON_WIDTH, ICON_HEIGHT));
button.setBackground(originBtnBackground);
button.setOpaque(false);
}
@@ -854,7 +856,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void setTabButtonSelected() {
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
- button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
+ button.setIcon(SVGIcon.readSVGIcon(getBtnIconUrl(), ICON_WIDTH, ICON_HEIGHT));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
selectedItem = this;
@@ -865,7 +867,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
private void initButton() {
- button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
+ button = new UIButton(SVGIcon.readSVGIcon(getBtnIconUrl(), ICON_WIDTH, ICON_HEIGHT)) {
public Dimension getPreferredSize() {
return new Dimension(TAB_BUTTON_WIDTH, TAB_BUTTON_HEIGHT);
}
@@ -874,6 +876,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
super.paintComponent(g);
}
};
+ button.setDisabledIcon(SVGIcon.readSVGIcon(getIconBaseDir() + btnIconName + ICON_SUFFIX_DISABLED, ICON_WIDTH, ICON_HEIGHT));
button.set4LargeToolbarButton();
button.setUI(new UIButtonUI() {
@Override
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.svg
new file mode 100644
index 000000000..cd22a33fc
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.svg
new file mode 100644
index 000000000..6326e5dc5
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.svg
new file mode 100644
index 000000000..aee04091e
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.svg
new file mode 100644
index 000000000..676e2123f
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.svg
new file mode 100644
index 000000000..17c1c3ad7
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.svg
new file mode 100644
index 000000000..20ec3d345
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.svg
new file mode 100644
index 000000000..2996337a6
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.svg
new file mode 100644
index 000000000..486824f88
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.svg
new file mode 100644
index 000000000..8fd7efb32
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.svg
new file mode 100644
index 000000000..30c6ee777
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.svg
new file mode 100644
index 000000000..7d05f4183
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.svg
new file mode 100644
index 000000000..0a2896f52
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.svg
new file mode 100644
index 000000000..238d5cb3b
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.svg
new file mode 100644
index 000000000..b10014568
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.svg
new file mode 100644
index 000000000..af3a5e3a6
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.svg
new file mode 100644
index 000000000..78d8cfb9b
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.svg
new file mode 100644
index 000000000..d80ac6497
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.svg
new file mode 100644
index 000000000..c4f2503c5
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.svg
new file mode 100644
index 000000000..fbb24140c
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.svg
new file mode 100644
index 000000000..85b0fd1d4
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.svg
new file mode 100644
index 000000000..96105ce35
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.svg
new file mode 100644
index 000000000..813523a35
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.svg
new file mode 100644
index 000000000..e4e76fda3
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.svg
new file mode 100644
index 000000000..8e66ad8b1
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_disabled.svg
new file mode 100644
index 000000000..eded04289
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.svg
new file mode 100644
index 000000000..cc63ec865
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.svg
new file mode 100644
index 000000000..a5dd18b3e
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/sheet/add_polysheet_normal.svg b/designer-base/src/main/resources/com/fr/design/images/sheet/add_polysheet_normal.svg
new file mode 100644
index 000000000..581db9cfb
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/sheet/add_polysheet_normal.svg
@@ -0,0 +1,16 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/sheet/next_page_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/sheet/next_page_disabled.svg
new file mode 100644
index 000000000..4bbe1ebb4
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/sheet/next_page_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/sheet/next_page_normal.svg b/designer-base/src/main/resources/com/fr/design/images/sheet/next_page_normal.svg
new file mode 100644
index 000000000..5526b5488
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/sheet/next_page_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/sheet/polysheet_normal.svg b/designer-base/src/main/resources/com/fr/design/images/sheet/polysheet_normal.svg
new file mode 100644
index 000000000..508a3eedb
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/sheet/polysheet_normal.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/sheet/pre_page_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/sheet/pre_page_disabled.svg
new file mode 100644
index 000000000..9f8493271
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/sheet/pre_page_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/sheet/pre_page_normal.svg b/designer-base/src/main/resources/com/fr/design/images/sheet/pre_page_normal.svg
new file mode 100644
index 000000000..58c1fb016
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/sheet/pre_page_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java
index 647a0dd8a..784a8ecf5 100644
--- a/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java
+++ b/designer-form/src/main/java/com/fr/design/mainframe/FormParaPane.java
@@ -40,7 +40,7 @@ public class FormParaPane extends JPanel {
private static final int TOOLTIP_X = 5;
private static final int TOOLTIP_Y = 10;
private static Dimension originalSize;
-
+
private static volatile FormParaPane THIS;
private java.util.List predifinedwidgeList = new ArrayList();
private UIButton predefineButton;
@@ -48,25 +48,25 @@ public class FormParaPane extends JPanel {
private FormDesigner designer;
-
+
static {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
-
+
@Override
public void on(PluginEvent event) {
-
+
THIS = null;
}
}, new PluginFilter() {
-
+
@Override
public boolean accept(PluginContext context) {
-
+
return context.contain(PluginModule.ExtraDesign);
}
});
}
-
+
public static final FormParaPane getInstance(FormDesigner designer) {
if(THIS == null) {
THIS = new FormParaPane();
@@ -82,7 +82,7 @@ public class FormParaPane extends JPanel {
public FormParaPane() {
- predefineButton = new UIButton(UIConstants.PRE_WIDGET_ICON) {
+ predefineButton = new UIButton(UIConstants.PRE_WIDGET_NORMAL_ICON) {
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
index 52f1fe1f0..30d46767f 100644
--- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
+++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
@@ -24,6 +24,7 @@ import javax.swing.UIManager;
import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
+import com.fr.base.svg.SVGIcon;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants;
@@ -57,14 +58,14 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
private static final Color LINE_COLOR = new Color(0xababab);
- private static final Icon ADD_WORK_SHEET = IOUtils.readIcon("com/fr/base/images/oem/addworksheet.png");
- protected static final Icon ADD_POLY_SHEET = IOUtils.readIcon("com/fr/design/images/sheet/addpolysheet.png");
- private static final Icon WORK_SHEET_ICON = IOUtils.readIcon("com/fr/base/images/oem/worksheet.png");
- private static final Icon POLY_SHEET_ICON = IOUtils.readIcon("com/fr/design/images/sheet/polysheet.png");
- private static final Icon LEFT_ICON = IOUtils.readIcon("com/fr/design/images/sheet/left_normal@1x.png");
- private static final Icon RIGHT_ICON = IOUtils.readIcon("com/fr/design/images/sheet/right_normal@1x.png");
- private static final Icon DISABLED_LEFT_ICON = IOUtils.readIcon("com/fr/design/images/sheet/left_hover@1x.png");
- private static final Icon DISABLED_RIGHT_ICON = IOUtils.readIcon("com/fr/design/images/sheet/right_hover@1x.png");
+ private static final Icon ADD_WORK_SHEET = SVGIcon.readSVGIcon("com/fr/base/images/oem/add_worksheet_normal.svg", 22, 12);
+ protected static final Icon ADD_POLY_SHEET = SVGIcon.readSVGIcon("com/fr/design/images/sheet/add_polysheet_normal.svg", 22, 12);
+ private static final Icon WORK_SHEET_ICON = SVGIcon.readSVGIcon("com/fr/base/images/oem/worksheet_normal.svg", 12, 12);
+ private static final Icon POLY_SHEET_ICON = SVGIcon.readSVGIcon("com/fr/design/images/sheet/polysheet_normal.svg", 12, 12);
+ private static final Icon LEFT_ICON = SVGIcon.readSVGIcon("com/fr/design/images/sheet/pre_page_normal.svg");
+ private static final Icon RIGHT_ICON = SVGIcon.readSVGIcon("com/fr/design/images/sheet/next_page_normal.svg");
+ private static final Icon DISABLED_LEFT_ICON = SVGIcon.readSVGIcon("com/fr/design/images/sheet/pre_page_disabled.svg");
+ private static final Icon DISABLED_RIGHT_ICON = SVGIcon.readSVGIcon("com/fr/design/images/sheet/next_page_disabled.svg");
private static final int NUM = 10;
private static final int ICON_SEP_DISTANCE = 8;
@@ -134,7 +135,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
* 编辑的对象实例
*/
private ReportComponentComposite reportComposite;
-
+
private int selectedIndex = -1;
private JPanel buttonPane;
@@ -332,7 +333,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
leftButton.setEnabled(buttonEnabled);
rightButton.setEnabled(buttonEnabled);
}
-
+
/**
* 抽出来方便OEM
* @return
@@ -417,10 +418,10 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
// 画两个添加sheet图标
iconLocation = isOvertakeWidth ? (int) (maxWidth) : addIconlocation + GRAP;
-
+
paintAddButton(g2d);
}
-
+
protected void paintAddButton(Graphics2D g2d){
getAddWorkSheet().paintIcon(this, g2d, iconLocation, 3);
ADD_POLY_SHEET.paintIcon(this, g2d, iconLocation + getAddWorkSheet().getIconWidth() + ICON_SEP_DISTANCE, 3);
@@ -626,7 +627,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
processRightMouseButton(evtX, evtY);
}
}
-
+
private void processRightMouseButton(int evtX, int evtY){
MenuDef def = new MenuDef();
addInsertGridShortCut(def);
@@ -636,14 +637,14 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
def.updateMenu();
GUICoreUtils.showPopupMenu(tabPop, this, evtX - 1, evtY - 1);
}
-
+
private void processLeftMouseButton(int evtX){
if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) {
firstInsertActionPerformed();
} else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) {
new PolyReportInsertAction().actionPerformed(null);
}
-
+
}
protected void addInsertGridShortCut(MenuDef def){
@@ -847,7 +848,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
}
protected class GridReportInsertAction extends SheetInsertAction {
-
+
@Override
protected TemplateReport newTemplateReport() {
return new WorkSheet();