951 * VERTICAL: 0 952 * 1 953 * 2 954 * 3 955 * 4 956 * 957 * HORIZONTAL_WRAP: 0 1 2 958 * 3 4 959 * 960 * VERTICAL_WRAP: 0 3 961 * 1 4 962 * 2 963 * </pre> 964 * <p> 965 * A description of these layouts follows: 966 * 967 * <table class="striped"> 968 * <caption>Describes layouts VERTICAL,HORIZONTAL_WRAP, and VERTICAL_WRAP 969 * </caption> 970 * <thead> 971 * <tr><th>Value</th><th>Description</th></tr> 972 * </thead> 973 * <tbody> 974 * <tr><td><code>VERTICAL</code> 975 * <td>Cells are layed out vertically in a single column. 976 * <tr><td><code>HORIZONTAL_WRAP</code> 977 * <td>Cells are layed out horizontally, wrapping to a new row as 978 * necessary. If the {@code visibleRowCount} property is less than 979 * or equal to zero, wrapping is determined by the width of the 980 * list; otherwise wrapping is done in such a way as to ensure 981 * {@code visibleRowCount} rows in the list. 982 * <tr><td><code>VERTICAL_WRAP</code> 983 * <td>Cells are layed out vertically, wrapping to a new column as 984 * necessary. If the {@code visibleRowCount} property is less than 985 * or equal to zero, wrapping is determined by the height of the 986 * list; otherwise wrapping is done at {@code visibleRowCount} rows. 987 * </tbody> 988 * </table> 989 * <p> 990 * The default value of this property is <code>VERTICAL</code>. 991 * 992 * @param layoutOrientation the new layout orientation, one of: 993 * {@code VERTICAL}, {@code HORIZONTAL_WRAP} or {@code VERTICAL_WRAP} 994 * @see #getLayoutOrientation 995 * @see #setVisibleRowCount 996 * @see #getScrollableTracksViewportHeight 997 * @see #getScrollableTracksViewportWidth 998 * @throws IllegalArgumentException if {@code layoutOrientation} isn't one of the 999 * allowable values 1000 * @since 1.4 1001 */ 1002 @BeanProperty(visualUpdate = true, enumerationValues = { 1003 "JList.VERTICAL", 1004 "JList.HORIZONTAL_WRAP", 1005 "JList.VERTICAL_WRAP"}, description 1006 = "Defines the way list cells are layed out.") 1007 public void setLayoutOrientation(int layoutOrientation) { 1008 int oldValue = this.layoutOrientation; 1009 switch (layoutOrientation) { | 951 * VERTICAL: 0 952 * 1 953 * 2 954 * 3 955 * 4 956 * 957 * HORIZONTAL_WRAP: 0 1 2 958 * 3 4 959 * 960 * VERTICAL_WRAP: 0 3 961 * 1 4 962 * 2 963 * </pre> 964 * <p> 965 * A description of these layouts follows: 966 * 967 * <table class="striped"> 968 * <caption>Describes layouts VERTICAL,HORIZONTAL_WRAP, and VERTICAL_WRAP 969 * </caption> 970 * <thead> 971 * <tr> 972 * <th scope="col">Value 973 * <th scope="col">Description 974 * </thead> 975 * <tbody> 976 * <tr> 977 * <th scope="row">{@code VERTICAL} 978 * <td>Cells are layed out vertically in a single column. 979 * <tr> 980 * <th scope="row">{@code HORIZONTAL_WRAP} 981 * <td>Cells are layed out horizontally, wrapping to a new row as 982 * necessary. If the {@code visibleRowCount} property is less than or 983 * equal to zero, wrapping is determined by the width of the list; 984 * otherwise wrapping is done in such a way as to ensure 985 * {@code visibleRowCount} rows in the list. 986 * <tr> 987 * <th scope="row">{@code VERTICAL_WRAP} 988 * <td>Cells are layed out vertically, wrapping to a new column as 989 * necessary. If the {@code visibleRowCount} property is less than or 990 * equal to zero, wrapping is determined by the height of the list; 991 * otherwise wrapping is done at {@code visibleRowCount} rows. 992 * </tbody> 993 * </table> 994 * 995 * The default value of this property is <code>VERTICAL</code>. 996 * 997 * @param layoutOrientation the new layout orientation, one of: 998 * {@code VERTICAL}, {@code HORIZONTAL_WRAP} or {@code VERTICAL_WRAP} 999 * @see #getLayoutOrientation 1000 * @see #setVisibleRowCount 1001 * @see #getScrollableTracksViewportHeight 1002 * @see #getScrollableTracksViewportWidth 1003 * @throws IllegalArgumentException if {@code layoutOrientation} isn't one of the 1004 * allowable values 1005 * @since 1.4 1006 */ 1007 @BeanProperty(visualUpdate = true, enumerationValues = { 1008 "JList.VERTICAL", 1009 "JList.HORIZONTAL_WRAP", 1010 "JList.VERTICAL_WRAP"}, description 1011 = "Defines the way list cells are layed out.") 1012 public void setLayoutOrientation(int layoutOrientation) { 1013 int oldValue = this.layoutOrientation; 1014 switch (layoutOrientation) { |