1 19 20 25 26 package org.netbeans.modules.css.visual.model; 27 28 import javax.swing.text.JTextComponent ; 29 30 35 public class CssRuleData { 36 CssStyleData cssStyleData = null; 37 String cssRule = null; 38 39 int cssRuleOffset; 40 41 private JTextComponent cssTextComponent; 42 43 44 public CssRuleData() { 45 } 46 47 48 public CssRuleData(String rule, CssStyleData styleData) { 49 cssRule = rule.trim(); 50 cssStyleData = styleData; 51 } 52 53 public CssRuleData(JTextComponent comp, String rule, int offset){ 54 cssTextComponent = comp; 55 cssRule = rule.trim(); 56 cssRuleOffset = offset; 57 } 58 59 62 public void setRule(String rule){ 63 if(rule != null){ 64 cssRule = rule.trim(); 65 } 66 } 67 68 71 public String getRule(){ 72 return cssRule; 73 } 74 75 public void setTextComponent(JTextComponent comp){ 76 cssTextComponent = comp; 77 } 78 79 public JTextComponent getTextComponent(){ 80 return cssTextComponent; 81 } 82 83 86 public void setOffset(int offset){ 87 cssRuleOffset = offset; 88 } 89 90 93 public int getOffset(){ 94 return cssRuleOffset; 95 } 96 97 public void setCssStyleData(CssStyleData styleData){ 98 cssStyleData = styleData; 99 } 100 101 public CssStyleData getCssStyleData(){ 102 return cssStyleData; 103 } 104 } 105 | Popular Tags |