<commit_before>class Panel extends JView

  constructor: (options = {}, data) ->

    options.cssClass = "panel"

    super options, data

    @headerButtons = {}
    @panes         = []

    @createHeader()
    @createHeaderHint()     if options.hint
    @createHeaderButtons()  if options.buttons?.length

    @createLayout()

    @createPanes()

  createHeader: ->
    @header     = new KDHeaderView
      cssClass: "editor-header"
      partial   : @getOptions().title

  createHeaderHint: ->
    @header.addSubView new KDCustomHTMLView
      partial   : "?"
      cssClasss : "hint"
      tooltip   :
        title   : @getOptions().hint

  createHeaderButtons: ->
    for buttonOptions in @getOptions().buttons
      buttonView = new KDButtonView buttonOptions
      @headerButtons[buttonOptions.title] = buttonView
      @header.addSubView buttonView

  createLayout: ->
    @container = new KDView
      cssClass : "panel-container"

    panesLength            = @getOptions().panes.length
    return  unless panesLength
    panelTypeByPaneLength  =
      "1"                  : "SingleLayout"
      "2"                  : "DoubleLayout"
      "3"                  : "TripleLayout"
      "4"                  : "QuadrupleLayout"
    methodName             = "create#{panelTypeByPaneLength[panesLength]}"
    do @[methodName]

  createPanes: ->
    for paneOptions, index in @getOptions().panes
      @createPane paneOptions, @getPaneByIndex index

  createPane: (paneOptions, targetContainer) ->
    paneTypesToPaneClass =
      "terminal"         : TerminalPane
      "editor"           : EditorPane
      "video"            : VideoPane
      "preview"          : PreviewPane
    PaneClass            = paneTypesToPaneClass[paneOptions.type]

    targetContainer.addSubView new PaneClass paneOptions
<commit_msg>Workspace: Css class changes for buttons.<commit_after>class Panel extends JView

  constructor: (options = {}, data) ->

    options.cssClass = "panel"

    super options, data

    @headerButtons = {}
    @panes         = []

    @createHeader()
    @createHeaderButtons()  if options.buttons?.length
    # @createHeaderHint()     if options.hint

    @createLayout()

    @createPanes()

  createHeader: ->
    @header     = new KDView
      cssClass  : "inner-header"
      partial   : """<span class="title">#{@getOptions().title}</span>"""

  createHeaderButtons: ->
    for buttonOptions in @getOptions().buttons
      buttonView = new KDButtonView buttonOptions
      @headerButtons[buttonOptions.title] = buttonView
      @header.addSubView buttonView

  createHeaderHint: ->
    @header.addSubView new KDButtonView
      cssClass  : "hint"
      iconOnly  : yes
      iconClass : "exclamation"
      tooltip   :
        title   : @getOptions().hint

  createLayout: ->
    @container = new KDView
      cssClass : "panel-container"

    panesLength            = @getOptions().panes.length
    return  unless panesLength
    panelTypeByPaneLength  =
      "1"                  : "SingleLayout"
      "2"                  : "DoubleLayout"
      "3"                  : "TripleLayout"
      "4"                  : "QuadrupleLayout"
    methodName             = "create#{panelTypeByPaneLength[panesLength]}"
    do @[methodName]

  createPanes: ->
    for paneOptions, index in @getOptions().panes
      @createPane paneOptions, @getPaneByIndex index

  createPane: (paneOptions, targetContainer) ->
    paneTypesToPaneClass =
      "terminal"         : TerminalPane
      "editor"           : EditorPane
      "video"            : VideoPane
      "preview"          : PreviewPane
    PaneClass            = paneTypesToPaneClass[paneOptions.type]

    targetContainer.addSubView new PaneClass paneOptions

{'fraction_non_alphanumeric': 0.09809702492629321, 'fraction_numerical': 0.0021441972661484857, 'mean_word_length': 2.225583405358686, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820847', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1039, 'n_words': 221}