--- old/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java 2018-04-01 22:04:29.000000000 -0700 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java 2018-04-01 22:04:29.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -212,54 +212,32 @@ hsb.setValues(0, 0, 0, 0, HORIZ_SCROLL_AMT, HORIZ_SCROLL_AMT); } - /* New method name for 1.1 */ public void add(String item, int index) { addItem(item, index); } - /* New method name for 1.1 */ public void removeAll() { clear(); maxLength = 0; } - /* New method name for 1.1 */ public void setMultipleMode (boolean b) { setMultipleSelections(b); } - /* New method name for 1.1 */ - public Dimension getPreferredSize(int rows) { - return preferredSize(rows); - } - - /* New method name for 1.1 */ - public Dimension getMinimumSize(int rows) { - return minimumSize(rows); - } - - /** - * Minimum size. - */ - public Dimension minimumSize() { - return minimumSize(DEFAULT_VISIBLE_ROWS); + public Dimension getMinimumSize() { + return getMinimumSize(DEFAULT_VISIBLE_ROWS); } - /** - * return the preferredSize - */ - public Dimension preferredSize(int v) { - return minimumSize(v); + public Dimension getPreferredSize(int rows) { + return getMinimumSize(rows); } - /** - * return the minimumsize - */ - public Dimension minimumSize(int v) { + public Dimension getMinimumSize(int rows) { FontMetrics fm = getFontMetrics(getFont()); initFontMetrics(); return new Dimension(20 + fm.stringWidth("0123456789abcde"), - getItemHeight() * v + (2*MARGIN)); + getItemHeight() * rows + (2*MARGIN)); } /**