|
|
@ -27,7 +27,6 @@ import com.fr.design.gui.itextfield.UITextField; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
|
|
|
import com.fr.design.style.color.ColorCell; |
|
|
|
import com.fr.design.style.color.ColorCell; |
|
|
|
import com.fr.design.style.color.ColorFactory; |
|
|
|
import com.fr.design.style.color.ColorFactory; |
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
|
import com.fr.design.style.color.ColorSelectBox; |
|
|
@ -398,16 +397,12 @@ public final class GUICoreUtils { |
|
|
|
Dimension size = popup.getPreferredSize(); |
|
|
|
Dimension size = popup.getPreferredSize(); |
|
|
|
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); |
|
|
|
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); |
|
|
|
screen.setSize(screen.getSize().width, screen.height - HEIGHT_GAP); |
|
|
|
screen.setSize(screen.getSize().width, screen.height - HEIGHT_GAP); |
|
|
|
//父元素右边界的坐标
|
|
|
|
|
|
|
|
int parentComponentRightBorderPosition = parentComponent.getLocationOnScreen().x + parentComponent.getWidth(); |
|
|
|
int showOnScreenX = Math.min(screen.width, parentComponent.getLocationOnScreen().x + parentComponent.getWidth()); |
|
|
|
//设计器右边界的坐标
|
|
|
|
|
|
|
|
Rectangle rectangle = DesignerContext.getDesignerFrame().getBounds(); |
|
|
|
|
|
|
|
int designerRightBorderPosition = rectangle.x + rectangle.width; |
|
|
|
|
|
|
|
rectangle = SwingUtilities.getWindowAncestor(parentComponent).getBounds(); |
|
|
|
|
|
|
|
designerRightBorderPosition = Math.max(designerRightBorderPosition, rectangle.x + rectangle.width); |
|
|
|
|
|
|
|
// peter:调整X的高度.
|
|
|
|
// peter:调整X的高度.
|
|
|
|
if (point.x + size.width > designerRightBorderPosition && size.width < designerRightBorderPosition) { |
|
|
|
if (point.x + size.width > showOnScreenX && size.width < showOnScreenX) { |
|
|
|
x += (parentComponentRightBorderPosition - point.x - size.width); |
|
|
|
x += (showOnScreenX - point.x - size.width); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// peter:调整y高度.
|
|
|
|
// peter:调整y高度.
|
|
|
|