Browse Source

局部变量不行..还是改回去吧

master
hzzz 8 years ago
parent
commit
e959791ed3
  1. 9
      designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java

9
designer_base/src/com/fr/design/gui/autocomplete/AutoCompletePopupWindow.java

@ -387,16 +387,15 @@ class AutoCompletePopupWindow extends JWindow implements CaretListener,
// Try to position to the right first (LTR) // Try to position to the right first (LTR)
int x; int x;
int dis = 5;
if (ac.getTextComponentOrientation().isLeftToRight()) { if (ac.getTextComponentOrientation().isLeftToRight()) {
x = getX() + getWidth() + dis; x = getX() + getWidth() + 5;
if (x + descWindow.getWidth() > screenBounds.x + screenBounds.width) { // doesn't fit if (x + descWindow.getWidth() > screenBounds.x + screenBounds.width) { // doesn't fit
x = getX() - dis - descWindow.getWidth(); x = getX() - 5 - descWindow.getWidth();
} }
} else { // RTL } else { // RTL
x = getX() - dis - descWindow.getWidth(); x = getX() - 5 - descWindow.getWidth();
if (x < screenBounds.x) { // Doesn't fit if (x < screenBounds.x) { // Doesn't fit
x = getX() + getWidth() + dis; x = getX() + getWidth() + 5;
} }
} }

Loading…
Cancel
Save