mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 09:50:33 +08:00
GridBagLayout.java (getLayoutDimensions): Return array of two zero-length int arrays when layoutInfo is null.
2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com> * java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two zero-length int arrays when layoutInfo is null. (getLayoutWeights): Return array of two zero-length double arrays when layoutInfo is null. From-SVN: r73622
This commit is contained in:
parent
8ffc2e370d
commit
5c859e1034
@ -1,3 +1,10 @@
|
||||
2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two
|
||||
zero-length int arrays when layoutInfo is null.
|
||||
(getLayoutWeights): Return array of two zero-length double arrays when
|
||||
layoutInfo is null.
|
||||
|
||||
2003-11-13 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to
|
||||
|
@ -229,10 +229,15 @@ public class GridBagLayout
|
||||
*/
|
||||
public int[][] getLayoutDimensions ()
|
||||
{
|
||||
if (layoutInfo == null)
|
||||
return new int [2][];
|
||||
|
||||
int[][] result = new int [2][];
|
||||
if (layoutInfo == null)
|
||||
{
|
||||
result[0] = new int[0];
|
||||
result[1] = new int[0];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
result [0] = new int [layoutInfo.cols];
|
||||
System.arraycopy (layoutInfo.colWidths, 0, result [0], 0, layoutInfo.cols);
|
||||
result [1] = new int [layoutInfo.rows];
|
||||
@ -242,10 +247,15 @@ public class GridBagLayout
|
||||
|
||||
public double[][] getLayoutWeights ()
|
||||
{
|
||||
if (layoutInfo == null)
|
||||
return new double [2][];
|
||||
|
||||
double[][] result = new double [2][];
|
||||
if (layoutInfo == null)
|
||||
{
|
||||
result[0] = new double[0];
|
||||
result[1] = new double[0];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
result [0] = new double [layoutInfo.cols];
|
||||
System.arraycopy (layoutInfo.colWeights, 0, result [0], 0, layoutInfo.cols);
|
||||
result [1] = new double [layoutInfo.rows];
|
||||
|
Loading…
x
Reference in New Issue
Block a user