Browse Source

REPORT-55757 【组件背景分离】组件复用-标题图案预览图,悬浮时出现的遮罩和删除图标,鼠标如果从左边/上边滑出,则删除图标消失;但从右边/下边滑出,删除图标还在

【问题原因】
不需要在mouseExited里加多余的判断
【改动思路】
同上
final/10.0
Starryi 3 years ago
parent
commit
908e7dbfad
  1. 16
      designer-form/src/main/java/com/fr/design/gui/xpane/TitleInsetImagePane.java

16
designer-form/src/main/java/com/fr/design/gui/xpane/TitleInsetImagePane.java

@ -24,7 +24,6 @@ import com.fr.general.Background;
import com.fr.general.IOUtils;
import com.fr.general.ImageWithSuffix;
import com.fr.general.act.TitlePacker;
import com.fr.report.core.cal.Rect;
import com.fr.stable.Constants;
import javax.swing.*;
@ -151,7 +150,6 @@ public class TitleInsetImagePane extends JPanel implements UIObserver {
IOUtils.readIcon("/com/fr/design/images/buttonicon/icon_delete_inset.png"),
new Color(51, 51, 52, 178),
2);
imageDeleteButton.setEnabled(false);
imageDeleteButton.setPreferredSize(new Dimension(DELETE_BUTTON_SIZE, DELETE_BUTTON_SIZE));
imagePreviewPane = new ImagePreviewPane();
@ -213,6 +211,20 @@ public class TitleInsetImagePane extends JPanel implements UIObserver {
}).dealWithImageFile(returnVal);
}
});
this.imageDeleteButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
imagePreviewPane.setImageWithSuffix(null);
imageLocationPane.setSelectedIndex(DEFAULT_INSET_LOCATION_INDEX);
imagePaddingPane.setValue(DEFAULT_INSET_PADDING);
imagePreviewOverlayPane.setVisible(false);
imageDeleteButton.setVisible(false);
imageDeleteButton.setEnabled(false);
getComponent(1).setVisible(false);
fireStateChanged();
}
});
}
public void populateBean(TitlePacker packer) {

Loading…
Cancel
Save