1 19 package org.openharmonise.swing.datefield; 20 21 33 public class DateFormatBlock { 34 35 38 private String m_sFormat = null; 39 40 43 private boolean m_bIsActiveBlock = false; 44 45 48 private int m_nInputLength = -1; 49 50 53 private int m_nStartPosition = -1; 54 55 58 private String m_sClearedValue = null; 59 60 63 private int m_nCalendarField = -1; 64 65 68 private String m_sEntryFormat = null; 69 70 81 public DateFormatBlock(String sFormat, boolean bIsActiveBlock, int nStartPosition, int nInputLength, String sClearedValue, int nCalendarField, String sEntryFormat) { 82 super(); 83 this.m_sFormat = sFormat; 84 this.m_bIsActiveBlock = bIsActiveBlock; 85 this.m_nStartPosition = nStartPosition; 86 this.m_nInputLength = nInputLength; 87 this.m_sClearedValue = sClearedValue; 88 this.m_nCalendarField = nCalendarField; 89 this.m_sEntryFormat = sEntryFormat; 90 } 91 92 98 public int getCalendarField() { 99 return this.m_nCalendarField; 100 } 101 102 107 public String getClearedValue() { 108 return this.m_sClearedValue; 109 } 110 111 116 public void setClearedValue(String sClearedValue) { 117 this.m_sClearedValue = sClearedValue; 118 } 119 120 125 public String getFormat() { 126 return this.m_sFormat; 127 } 128 129 134 public int getInputLength() { 135 return m_nInputLength; 136 } 137 138 143 public int getStartPosition() { 144 return this.m_nStartPosition; 145 } 146 147 152 public boolean isActiveBlock() { 153 return this.m_bIsActiveBlock; 154 } 155 156 161 public String getEntryFormat() { 162 return this.m_sEntryFormat; 163 } 164 165 168 public String toString() { 169 StringBuffer sBuff = new StringBuffer ("[\""); 170 sBuff.append(this.m_sFormat) 171 .append("\"(") 172 .append(m_bIsActiveBlock) 173 .append(")]"); 174 return sBuff.toString(); 175 } 176 } 177 | Popular Tags |