private void updateContext ( Container c , int maxCtx , int ctxSteps , boolean keepCustomValues ) { if ( ! keepCustomValues ) { c . removeAllItems ( ) ; } for ( Integer i : PREDEFINED_CONTEXTS ) { if ( i < maxCtx ) { c . addItem ( i ) ; } } for ( int step = ctxSteps ; step < maxCtx ; step += ctxSteps ) { c . addItem ( step ) ; } c . addItem ( maxCtx ) ; }
Updates context combo boxes .