Browse Source

REPORT-51315 保存中的模板,标签的图标遗漏加载动效

feature/10.0
hades 4 years ago
parent
commit
27df4e1d74
  1. 9
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  2. BIN
      designer-base/src/main/resources/com/fr/design/images/file/grey_saving_close.gif
  3. BIN
      designer-base/src/main/resources/com/fr/design/images/file/white_saving_close.gif

9
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

@ -26,6 +26,7 @@ import com.fr.third.javax.annotation.Nonnull;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ButtonModel; import javax.swing.ButtonModel;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JMenu; import javax.swing.JMenu;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
@ -69,6 +70,8 @@ public class MutilTempalteTabPane extends JComponent {
private static Icon CLOSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); private static Icon CLOSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png");
private static Icon MOUSE_OVER_CLOSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/mouseoverclose icon.png"); private static Icon MOUSE_OVER_CLOSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/mouseoverclose icon.png");
private static Icon MOUSE_PRESS_CLOSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/pressclose icon.png"); private static Icon MOUSE_PRESS_CLOSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/pressclose icon.png");
private static final Icon WHITE_SAVING_CLOSE_ICON = new ImageIcon(MutilTempalteTabPane.class.getResource("/com/fr/design/images/file/white_saving_close.gif"));
private static final Icon GREY_SAVING_CLOSE_ICON = new ImageIcon(MutilTempalteTabPane.class.getResource("/com/fr/design/images/file/grey_saving_close.gif"));
private static final String ELLIPSIS = "..."; private static final String ELLIPSIS = "...";
private static final int GAP = 5; private static final int GAP = 5;
private static final int SMALLGAP = 3; private static final int SMALLGAP = 3;
@ -386,8 +389,14 @@ public class MutilTempalteTabPane extends JComponent {
selectedIcon = CLOSE; selectedIcon = CLOSE;
} }
if (i == selectedIndex) { if (i == selectedIndex) {
if (template.isSaving()) {
selectedIcon = WHITE_SAVING_CLOSE_ICON;
}
startX[i - minPaintIndex] = paintSelectedTab(g2d, icon, templateStartX, name, selectedIcon); startX[i - minPaintIndex] = paintSelectedTab(g2d, icon, templateStartX, name, selectedIcon);
} else { } else {
if (template.isSaving()) {
selectedIcon = GREY_SAVING_CLOSE_ICON;
}
boolean isLeft = i < selectedIndex; boolean isLeft = i < selectedIndex;
startX[i - minPaintIndex] = paintUnSelectedTab(g2d, icon, templateStartX, name, selectedIcon, isLeft, mouseOveredIndex, i); startX[i - minPaintIndex] = paintUnSelectedTab(g2d, icon, templateStartX, name, selectedIcon, isLeft, mouseOveredIndex, i);
} }

BIN
designer-base/src/main/resources/com/fr/design/images/file/grey_saving_close.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/file/white_saving_close.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Loading…
Cancel
Save