|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|