<commit_before>package tuner.gui

import scala.swing.Alignment
import scala.swing.TabbedPane
import scala.swing.event.ValueChanged

import java.awt.Dimension

import tuner.Config
import tuner.Project

class ControlPanel(project:Project) extends TabbedPane {
  
  val dims = new Dimension(Int.MaxValue, Config.controlPanelHeight)

  tabPlacement(Alignment.Top)
  maximumSize = new Dimension(Int.MaxValue, Config.controlPanelHeight)

  val infoTab = new InfoPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val localTab = new LocalPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val controlsTab = new PlotControlsPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val candidatesTab = new CandidatesPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val historyTab = new HistoryPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }

  pages += new TabbedPane.Page("Info", infoTab)
  pages += new TabbedPane.Page("Local", localTab)
  pages += new TabbedPane.Page("Controls", controlsTab)
  pages += new TabbedPane.Page("Candidates", candidatesTab)
  pages += new TabbedPane.Page("History", historyTab)

  // We need to update the info panel when the slice changes
  controlsTab.sliceSliders.values.foreach {slider =>
    listenTo(slider)
  }<commit_msg>don't show candidates panel right now since its useless<commit_after>package tuner.gui

import scala.swing.Alignment
import scala.swing.TabbedPane
import scala.swing.event.ValueChanged

import java.awt.Dimension

import tuner.Config
import tuner.Project

class ControlPanel(project:Project) extends TabbedPane {
  
  val dims = new Dimension(Int.MaxValue, Config.controlPanelHeight)

  tabPlacement(Alignment.Top)
  maximumSize = new Dimension(Int.MaxValue, Config.controlPanelHeight)

  val infoTab = new InfoPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val localTab = new LocalPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val controlsTab = new PlotControlsPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val candidatesTab = new CandidatesPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }
  val historyTab = new HistoryPanel(project) {
    preferredSize = dims
    maximumSize = dims
  }

  pages += new TabbedPane.Page("Info", infoTab)
  pages += new TabbedPane.Page("Local", localTab)
  pages += new TabbedPane.Page("Controls", controlsTab)
  //pages += new TabbedPane.Page("Candidates", candidatesTab)
  pages += new TabbedPane.Page("History", historyTab)

  // We need to update the info panel when the slice changes
  controlsTab.sliceSliders.values.foreach {slider =>
    listenTo(slider)
  }
{'fraction_non_alphanumeric': 0.0886214442013129, 'fraction_numerical': 0.0, 'mean_word_length': 4.146341463414634, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3303090', 'n_tokens_mistral': 832, 'n_tokens_neox': 829, 'n_words': 212}