public boolean addBusItinerary ( BusItinerary busItinerary ) { if ( busItinerary == null ) { return false ; } if ( this . itineraries . indexOf ( busItinerary ) != - 1 ) { return false ; } if ( ! this . itineraries . add ( busItinerary ) ) { return false ; } final boolean isValidItinerary = busItinerary . isValidPrimitive ( ) ; busItinerary . setEventFirable ( isEventFirable ( ) ) ; busItinerary . setContainer ( this ) ; if ( isEventFirable ( ) ) { fireShapeChanged ( new BusChangeEvent ( this , BusChangeEventType . ITINERARY_ADDED , busItinerary , this . itineraries . size ( ) - 1 , "shape" , //$NON-NLS-1$ null , null ) ) ; if ( ! isValidItinerary ) { revalidate ( ) ; } else { checkPrimitiveValidity ( ) ; } } return true ; }
Add a bus itinerary inside the bus line .