%
%  Basisklasse für alle Linien-Objekte
%
classdef ShLines < Shape
  properties (Access = protected)
    LineWidth  = 0.5;
    LineStyle  = LnStyle.solid;
  end  % properties 
    
  methods
    function obj = ShLines( posX, posY )
      obj@Shape(posX,posY); 
      obj.LineWidth = 0.5;
      obj.LineStyle = LnStyle.solid;
    end
    
    % Lines-Eigenschaften setzen
    function setLnData( obj, varargin )
      if( nargin > 1 )
        obj1 = varargin{1};
        if( ~isa( obj1, 'ShLines' ) )
          return;
        end
      else
        obj1 = obj;
      end
      obj.setLnStyle  ( obj1.LineStyle );
      obj.setLineWidth( obj1.LineWidth );
    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
  
  end  % methods 
  
end