classdef TxtWeight

  enumeration
    light, 
    normal,
    demi, 
    bold
  end
   
  methods (Static) 
    % FontWeight für Graphic Handle obj setzen
    function set( hnd, wgt )
      if( ~isMatlabHandle(hnd) ) return; end
      switch( wgt )
        case TxtWeight.light
          sw = 'light';
         case TxtWeight.normal
          sw = 'normal';
        case TxtWeight.demi
          sw = 'demi';
        case TxtWeight.bold
          sw = 'bold';
        otherwise
          return;
      end
      set( hnd, 'FontWeight', sw );      
    end   
  end  % methods (Static)  
end 