90 Insets i = c.getInsets();
91 if (i!=null) {
92 d.width += i.left + i.right;
93 }
94 if (border != null) {
95 i = border.getBorderInsets(c);
96 d.width += i.left + i.right;
97 }
98
99 return d;
100 }
101 return null;
102 }
103
104 protected ChangeListener createChangeListener(JPopupMenu m) {
105 return new ChangeListener() {
106 public void stateChanged(ChangeEvent e) {}
107 };
108 }
109
110 public boolean isPopupTrigger(MouseEvent e) {
111 return ((e.getID()==MouseEvent.MOUSE_PRESSED)
112 && ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0));
113 }
114 }
|
90 Insets i = c.getInsets();
91 if (i!=null) {
92 d.width += i.left + i.right;
93 }
94 if (border != null) {
95 i = border.getBorderInsets(c);
96 d.width += i.left + i.right;
97 }
98
99 return d;
100 }
101 return null;
102 }
103
104 protected ChangeListener createChangeListener(JPopupMenu m) {
105 return new ChangeListener() {
106 public void stateChanged(ChangeEvent e) {}
107 };
108 }
109
110 @SuppressWarnings("deprecation")
111 public boolean isPopupTrigger(MouseEvent e) {
112 return ((e.getID()==MouseEvent.MOUSE_PRESSED)
113 && ((e.getModifiers() & MouseEvent.BUTTON3_MASK)!=0));
114 }
115 }
|