From 5915b71c94e9d49236b65db3002b9861ee0c8438 Mon Sep 17 00:00:00 2001 From: Dareg Date: Fri, 14 Oct 2016 13:48:50 +0200 Subject: [PATCH] Border.Label -> BorderLabel --- _example/tabs.go | 4 ++-- _example/theme.go | 14 +++++++------- _example/ttop.go | 4 ++-- barchart.go | 2 +- gauge.go | 2 +- linechart.go | 2 +- list.go | 2 +- mbarchart.go | 2 +- par.go | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/_example/tabs.go b/_example/tabs.go index 1bfe3d5..7a8908e 100644 --- a/_example/tabs.go +++ b/_example/tabs.go @@ -31,7 +31,7 @@ func main() { par2.Height = 5 par2.Width = 37 par2.Y = 0 - par2.Border.Label = "Keys" + par2.BorderLabel = "Keys" par2.Border.FgColor = termui.ColorYellow tab1.AddBlocks(par2) @@ -39,7 +39,7 @@ func main() { bc := termui.NewBarChart() data := []int{3, 2, 5, 3, 9, 5, 3, 2, 5, 8, 3, 2, 4, 5, 3, 2, 5, 7, 5, 3, 2, 6, 7, 4, 6, 3, 6, 7, 8, 3, 6, 4, 5, 3, 2, 4, 6, 4, 8, 5, 9, 4, 3, 6, 5, 3, 6} bclabels := []string{"S0", "S1", "S2", "S3", "S4", "S5"} - bc.Border.Label = "Bar Chart" + bc.BorderLabel = "Bar Chart" bc.Data = data bc.Width = 26 bc.Height = 10 diff --git a/_example/theme.go b/_example/theme.go index 0c36cec..8cc565e 100644 --- a/_example/theme.go +++ b/_example/theme.go @@ -23,12 +23,12 @@ func main() { p := ui.NewPar(":PRESS q TO QUIT DEMO") p.Height = 3 p.Width = 50 - p.Border.Label = "Text Box" + p.BorderLabel = "Text Box" strs := []string{"[0] gizak/termui", "[1] editbox.go", "[2] iterrupt.go", "[3] keyboard.go", "[4] output.go", "[5] random_out.go", "[6] dashboard.go", "[7] nsf/termbox-go"} list := ui.NewList() list.Items = strs - list.Border.Label = "List" + list.BorderLabel = "List" list.Height = 7 list.Width = 25 list.Y = 4 @@ -38,7 +38,7 @@ func main() { g.Width = 50 g.Height = 3 g.Y = 11 - g.Border.Label = "Gauge" + g.BorderLabel = "Gauge" spark := ui.NewSparkline() spark.Title = "srv 0:" @@ -52,7 +52,7 @@ func main() { sp := ui.NewSparklines(spark, spark1) sp.Width = 25 sp.Height = 7 - sp.Border.Label = "Sparkline" + sp.BorderLabel = "Sparkline" sp.Y = 4 sp.X = 25 @@ -66,7 +66,7 @@ func main() { return ps })() - lc.Border.Label = "Line Chart" + lc.BorderLabel = "Line Chart" lc.Data = sinps lc.Width = 50 lc.Height = 11 @@ -77,7 +77,7 @@ func main() { bc := ui.NewBarChart() bcdata := []int{3, 2, 5, 3, 9, 5, 3, 2, 5, 8, 3, 2, 4, 5, 3, 2, 5, 7, 5, 3, 2, 6, 7, 4, 6, 3, 6, 7, 8, 3, 6, 4, 5, 3, 2, 4, 6, 4, 8, 5, 9, 4, 3, 6, 5, 3, 6} bclabels := []string{"S0", "S1", "S2", "S3", "S4", "S5"} - bc.Border.Label = "Bar Chart" + bc.BorderLabel = "Bar Chart" bc.Width = 26 bc.Height = 10 bc.X = 51 @@ -85,7 +85,7 @@ func main() { bc.DataLabels = bclabels lc1 := ui.NewLineChart() - lc1.Border.Label = "Line Chart" + lc1.BorderLabel = "Line Chart" rndwalk := (func() []float64 { n := 150 d := make([]float64, n) diff --git a/_example/ttop.go b/_example/ttop.go index 73c9b85..bb69d77 100644 --- a/_example/ttop.go +++ b/_example/ttop.go @@ -212,7 +212,7 @@ func NewCpuTabElems(width int) *CpuTabElems { lc.Height = 12 lc.X = 0 lc.Mode = "dot" - lc.Border.Label = "CPU" + lc.BorderLabel = "CPU" return &CpuTabElems{GMap: make(map[string]*termui.Gauge), LChart: lc} } @@ -222,7 +222,7 @@ func (cte *CpuTabElems) AddGauge(key string, Y int, width int) *termui.Gauge { cte.GMap[key].Width = width cte.GMap[key].Height = 3 cte.GMap[key].Y = Y - cte.GMap[key].Border.Label = key + cte.GMap[key].BorderLabel = key cte.GMap[key].Percent = 0 //int(val.user + val.nice + val.system) return cte.GMap[key] } diff --git a/barchart.go b/barchart.go index 55ce9d1..9e2a106 100644 --- a/barchart.go +++ b/barchart.go @@ -11,7 +11,7 @@ import "fmt" bc := termui.NewBarChart() data := []int{3, 2, 5, 3, 9, 5} bclabels := []string{"S0", "S1", "S2", "S3", "S4", "S5"} - bc.Border.Label = "Bar Chart" + bc.BorderLabel = "Bar Chart" bc.Data = data bc.Width = 26 bc.Height = 10 diff --git a/gauge.go b/gauge.go index 244d299..01af0ea 100644 --- a/gauge.go +++ b/gauge.go @@ -16,7 +16,7 @@ import ( g.Percent = 40 g.Width = 50 g.Height = 3 - g.Border.Label = "Slim Gauge" + g.BorderLabel = "Slim Gauge" g.BarColor = termui.ColorRed g.PercentColor = termui.ColorBlue */ diff --git a/linechart.go b/linechart.go index bf84718..43b57e1 100644 --- a/linechart.go +++ b/linechart.go @@ -39,7 +39,7 @@ var rSingleBraille = [4]rune{'\u2880', '⠠', '⠐', '⠈'} // because one braille char can represent two data points. /* lc := termui.NewLineChart() - lc.Border.Label = "braille-mode Line Chart" + lc.BorderLabel = "braille-mode Line Chart" lc.Data = [1.2, 1.3, 1.5, 1.7, 1.5, 1.6, 1.8, 2.0] lc.Width = 50 lc.Height = 12 diff --git a/list.go b/list.go index 670015f..0029d26 100644 --- a/list.go +++ b/list.go @@ -24,7 +24,7 @@ import "strings" ls := termui.NewList() ls.Items = strs ls.ItemFgColor = termui.ColorYellow - ls.Border.Label = "List" + ls.BorderLabel = "List" ls.Height = 7 ls.Width = 25 ls.Y = 0 diff --git a/mbarchart.go b/mbarchart.go index 231de27..6828e65 100644 --- a/mbarchart.go +++ b/mbarchart.go @@ -16,7 +16,7 @@ import ( data[0] := []int{3, 2, 5, 7, 9, 4} data[1] := []int{7, 8, 5, 3, 1, 6} bclabels := []string{"S0", "S1", "S2", "S3", "S4", "S5"} - bc.Border.Label = "Bar Chart" + bc.BorderLabel = "Bar Chart" bc.Data = data bc.Width = 26 bc.Height = 10 diff --git a/par.go b/par.go index beaafbb..78bffd0 100644 --- a/par.go +++ b/par.go @@ -9,7 +9,7 @@ package termui par := termui.NewPar("Simple Text") par.Height = 3 par.Width = 17 - par.Border.Label = "Label" + par.BorderLabel = "Label" */ type Par struct { Block