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