%
%  Basisklasse für alle Linien-Objekte
%
classdef ShLines < Shape
  properties (Access = protected)
    LineWidth  = 0.5;
    LineStyle  = LnStyle.solid;
    Color      = LnColor.k;
    Marker     = 'none';
  end  % properties 
    
  methods
    function obj = ShLines( posX, posY )
      obj@Shape(posX,posY); 
      obj.LineWidth = 0.5;
      obj.LineStyle = LnStyle.solid;
      obj.Color     = LnColor.k;
    end
    
    % Lines-Eigenschaften setzen
    function setLnData( obj )
      obj.setLnStyle  ( obj.LineStyle );
      obj.setLineWidth( obj.LineWidth );
      obj.setColor    ( obj.Color ); 
      obj.setMarker   ( obj.Marker ); 
    end
     
    % LineWidth für Graphic Handle hnd setzen
    function setLineWidth( obj, wid )
      if( ~isShLnObj(obj) ) return; end
      obj.LineWidth = wid;            hnd = obj.hnd;
      if( ~isMatlabHandle( obj.hnd) ) return; end
      set(  obj.hnd, 'LineWidth', wid );
    end
    
    % auch für das Setzen von außen
    function setLnStyle( obj, style )
      if( ~isShLnObj(obj) ) return; end
      obj.LineStyle = style;      
      LnStyle.set( obj.hnd, style ); 
    end
    
    function setColor( obj, col )
      if( ~isShLnObj(obj) ) return; end
      obj.Color = col;   % Daten merken für nächsten Plot 
      hnd = obj.hnd;
      LnColor.set( hnd, col );
    end    
    
     % Marker für Graphic Handle hnd setzen
    function setMarker( obj, mk )
      if( ~isShLnObj(obj) ) return; end
      obj.Marker = mk;      
      hnd = obj.hnd;
      if( ~isMatlabHandle(hnd) ) return; end
      set( hnd, 'Marker', mk );
    end   
    
  end  % methods 
  
end