Browse Source

CHART-19104 鼠标的click事件不能稳定触发,改为change事件

feature/10.0
白岳 4 years ago
parent
commit
bf16dad6e4
  1. 32
      designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java

32
designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java

@ -12,13 +12,12 @@ import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.text.Format;
import java.util.Map;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Point; import java.awt.Point;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.text.Format;
import java.util.Map;
/** /**
* Created by Mitisky on 16/2/23. * Created by Mitisky on 16/2/23.
@ -54,32 +53,7 @@ public abstract class VanChartFormatPaneWithCheckBox extends JPanel{
this.add(formatButton, BorderLayout.EAST); this.add(formatButton, BorderLayout.EAST);
initFormatListener(); initFormatListener();
isSelectedBox.addMouseListener(new MouseListener() { isSelectedBox.addChangeListener((e)-> isDirty = true);
@Override
public void mouseClicked(MouseEvent e) {
isDirty = true;
}
@Override
public void mousePressed(MouseEvent e) {
}
@Override
public void mouseReleased(MouseEvent e) {
}
@Override
public void mouseEntered(MouseEvent e) {
}
@Override
public void mouseExited(MouseEvent e) {
}
});
} }
protected abstract String getCheckBoxText(); protected abstract String getCheckBoxText();

Loading…
Cancel
Save