pan class="lineno" id="221"> 221 } 222 super.__uiTextChanged(); 223 revalidate(); 224 } 225 226 private function __uiTextScrolled():Void{ 227 if(viewportSizeTesting){ 228 return; 229 } 230 var t:TextField = getTextField(); 231 var newViewPos:Point = new Point(t.hscroll, t.scroll-1); 232 var isDiff:Boolean = Math.abs(viewPos.y-newViewPos.y)>=1 || Math.abs(viewPos.x - newViewPos.x) >= 1; 233 if(isDiff){ 234 viewPos.setLocation(newViewPos); 235 //notify scroll bar to syn 236 fireStateChanged(); 237 } 238 super.__uiTextScrolled(); 239 } 240 241 //---------------------------implementation of Viewportable--------------------------------- 242 243 /** 244 * the <code>Viewportable</code> state change listener adding method implementation. 245 */ 246 public function addChangeListener(func:Function, obj:Object):Object{ 247 return addEventListener(ON_STATE_CHANGED, func, obj); 248 } 249 250 /** 251 * Returns the unit value for the Vertical scrolling. 252 */ 253 public function getVerticalUnitIncrement():Number{ 254 return 1; 255 } 256 257 /** 258 * Return the block value for the Vertical scrolling. 259 */ 260 public function getVerticalBlockIncrement():Number{ 261 return 10; 262 } 263 264 /** 265 * Returns the unit value for the HoriÀ;9˜oM