|
|
@ -17,6 +17,8 @@ import java.awt.Toolkit; |
|
|
|
import java.awt.event.AWTEventListener; |
|
|
|
import java.awt.event.AWTEventListener; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static com.fine.theme.utils.FineUIScale.scale; |
|
|
|
|
|
|
|
|
|
|
|
//august:
|
|
|
|
//august:
|
|
|
|
public class FormWidgetPopWindow extends JWindow { |
|
|
|
public class FormWidgetPopWindow extends JWindow { |
|
|
|
private WidgetOption[] options; |
|
|
|
private WidgetOption[] options; |
|
|
@ -127,8 +129,8 @@ public class FormWidgetPopWindow extends JWindow { |
|
|
|
public Dimension preferredLayoutSize(Container parent) { |
|
|
|
public Dimension preferredLayoutSize(Container parent) { |
|
|
|
Insets insets = parent.getInsets(); |
|
|
|
Insets insets = parent.getInsets(); |
|
|
|
int nmembers = parent.getComponentCount(); |
|
|
|
int nmembers = parent.getComponentCount(); |
|
|
|
return new Dimension(maxLine * 28 + insets.left + insets.right + right + left, (nmembers / maxLine + 1) |
|
|
|
return new Dimension(maxLine * scale(28) + insets.left + insets.right + scale(right) + scale(left), |
|
|
|
* 24 + insets.top + insets.bottom + top + bottom); |
|
|
|
(int) Math.ceil((float) nmembers / maxLine) * scale(26) + insets.top + insets.bottom + scale(top) + scale(bottom)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|