mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
method size() with single parameter
This commit is contained in:
@@ -35,6 +35,10 @@ public class JBUI {
|
||||
return new JBDimension(width, height);
|
||||
}
|
||||
|
||||
public static JBDimension size(int widthAndHeight) {
|
||||
return new JBDimension(widthAndHeight, widthAndHeight);
|
||||
}
|
||||
|
||||
public static JBDimension size(Dimension size) {
|
||||
return size instanceof JBDimension ? ((JBDimension)size) : new JBDimension(size.width, size.height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user