< prev index next >

src/java.desktop/share/classes/javax/swing/SizeSequence.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 120,130 **** */ public class SizeSequence { private static int[] emptyArray = new int[0]; ! private int a[]; /** * Creates a new <code>SizeSequence</code> object * that contains no entries. To add entries, you * can use <code>insertEntries</code> or <code>setSizes</code>. --- 120,130 ---- */ public class SizeSequence { private static int[] emptyArray = new int[0]; ! private int[] a; /** * Creates a new <code>SizeSequence</code> object * that contains no entries. To add entries, you * can use <code>insertEntries</code> or <code>setSizes</code>.
*** 358,368 **** * @exception ArrayIndexOutOfBoundsException if the parameters * are outside of the range: * (<code>0 &lt;= start &lt; (getSizes().length)) AND (length &gt;= 0)</code> */ public void insertEntries(int start, int length, int value) { ! int sizes[] = getSizes(); int end = start + length; int n = a.length + length; a = new int[n]; for (int i = 0; i < start; i++) { a[i] = sizes[i] ; --- 358,368 ---- * @exception ArrayIndexOutOfBoundsException if the parameters * are outside of the range: * (<code>0 &lt;= start &lt; (getSizes().length)) AND (length &gt;= 0)</code> */ public void insertEntries(int start, int length, int value) { ! int[] sizes = getSizes(); int end = start + length; int n = a.length + length; a = new int[n]; for (int i = 0; i < start; i++) { a[i] = sizes[i] ;
*** 388,398 **** * * @param start the index of the first entry to be removed * @param length the number of entries to be removed */ public void removeEntries(int start, int length) { ! int sizes[] = getSizes(); int end = start + length; int n = a.length - length; a = new int[n]; for (int i = 0; i < start; i++) { a[i] = sizes[i] ; --- 388,398 ---- * * @param start the index of the first entry to be removed * @param length the number of entries to be removed */ public void removeEntries(int start, int length) { ! int[] sizes = getSizes(); int end = start + length; int n = a.length - length; a = new int[n]; for (int i = 0; i < start; i++) { a[i] = sizes[i] ;
< prev index next >