1 19 20 25 26 package org.netbeans.modules.css.visual.model; 27 28 import javax.swing.DefaultComboBoxModel ; 29 30 35 public class BackgroundModel { 36 37 public DefaultComboBoxModel getBackgroundRepeatList(){ 38 39 return new BackgroundRepeatList(); 40 } 41 42 public DefaultComboBoxModel getBackgroundScrollList(){ 43 return new BackgroundScrollList(); 44 } 45 46 public DefaultComboBoxModel getBackgroundPositionList(){ 47 return new BackgroundPositionList(); 48 } 49 50 public DefaultComboBoxModel getBackgroundPositionUnitList(){ 51 return new BackgroundPositionUnitList(); 52 } 53 54 public static class BackgroundRepeatList extends DefaultComboBoxModel { 55 public BackgroundRepeatList(){ 56 String [] propValues = CssProperties.getCssPropertyValues(CssProperties.BACKGROUND_REPEAT); 57 addElement(CssStyleData.NOT_SET); 58 for(int i=0; i< propValues.length; i++){ 59 addElement(propValues[i]); 60 } 61 } 62 } 63 64 public static class BackgroundScrollList extends DefaultComboBoxModel { 65 public BackgroundScrollList(){ 66 String [] propValues = CssProperties.getCssPropertyValues(CssProperties.BACKGROUND_ATTACHMENT); 67 addElement(CssStyleData.NOT_SET); 68 for(int i=0; i< propValues.length; i++){ 69 addElement(propValues[i]); 70 } 71 } 72 } 73 74 public static class BackgroundPositionList extends DefaultComboBoxModel { 75 public BackgroundPositionList(){ 76 String [] propValues = CssProperties.getCssPropertyValues(CssProperties.BACKGROUND_POSITION); 77 addElement(CssStyleData.NOT_SET); 78 for(int i=0; i< propValues.length; i++){ 79 addElement(propValues[i]); 80 } 81 addElement(CssStyleData.VALUE); 82 } 83 } 84 85 public static class BackgroundPositionUnitList extends DefaultComboBoxModel { 86 public BackgroundPositionUnitList(){ 87 String [] unitValues = CssProperties.getCssLengthUnits(); 88 for(int i=0; i< unitValues.length; i++){ 89 addElement(unitValues[i]); 90 } 91 } 92 } 93 } 94 | Popular Tags |