1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            Portions ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 
  8 
  9 /**
 10   @class
 11 
 12   Displays a horizontal or vertical separator line.  Simply create one of 
 13   these views and configure the layout direction and layout frame.
 14   
 15   @extends SC.View
 16   @since SproutCore 1.0
 17 */
 18 SC.SeparatorView = SC.View.extend(
 19 /** @scope SC.SeparatorView.prototype */ {
 20 
 21   /**
 22     @type Array
 23     @default ['sc-separator-view']
 24     @see SC.View#classNames
 25   */
 26   classNames: ['sc-separator-view'],
 27   
 28   /**
 29     @type String
 30     @default 'span'
 31     @see SC.View#tagName
 32   */
 33   tagName: 'span',
 34 
 35   /** 
 36     Select the direction of the separator line. Possible values:
 37     
 38       - SC.LAYOUT_VERTICAL
 39       - SC.LAYOUT_HORIZONTAL
 40     
 41     @type String
 42     @default SC.LAYOUT_HORIZONTAL
 43   */
 44   layoutDirection: SC.LAYOUT_HORIZONTAL,
 45 
 46   /** @private */
 47   render: function(context, firstTime) {
 48     if(firstTime) context.push('<span></span>');
 49     context.addClass(this.get('layoutDirection'));
 50   }
 51 
 52 });
 53