diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index ac0bfcb577..e93f0023bc 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -25,17 +25,19 @@ import com.fr.stable.AssistUtils; import com.fr.stable.StringUtils; import javax.swing.JPanel; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; /** * 图表 属性表, 类型选择 界面. @@ -99,6 +101,19 @@ public class ChartTypePane extends AbstractChartAttrPane { buttonPane.setEditingChartPane(chartTypeComBox); + buttonPane.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + buttonPane.requestFocus(); + } + }); + + chartTypeComBox.addMouseListener(new MouseAdapter() { + @Override + public void mouseReleased(MouseEvent e) { + content.requestFocus(); + } + }); return content; } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java index 584d7fd1d6..e8ef8714da 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java @@ -72,6 +72,7 @@ public class ChartImagePane extends ChartSelectDemoPane { }else{ this.isDoubleClicked = false; } + this.requestFocus(); super.mouseClicked(e); }