public void setStartDate ( Date dateStart ) { try { // NOTE: I ignore dateStart and use the date as it appears on the screen dateStart = m_productItem . getStartDate ( ) ; // Date as it appears on the screen Date timeNew = m_productItem . setRemoteStartDate ( dateStart ) ; if ( ! timeNew . equals ( dateStart ) ) { Date timeEnd = m_productItem . getRemoteEndDate ( ) ; // ((TourLineItem)lineItem).getEndDate(); String strDescription = m_productItem . getRemoteDescription ( ) ; // lineItem.getItem().getDescription(); String [ ] rgstrMeals = m_productItem . getMealCache ( timeNew , timeEnd ) ; m_productItem . setCacheData ( timeNew , timeEnd , strDescription , rgstrMeals ) ; // Usually, you would have to update the data, but removing the icon in the next step will do this. } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } try { Thread . sleep ( 2000 ) ; // Sleep for 2 seconds } catch ( InterruptedException e ) { } m_productItem . setStatus ( m_productItem . getStatus ( ) & ~ ( 1 << 1 ) ) ; }
Set the new start date for the remote item .