equal
deleted
inserted
replaced
128 |
128 |
129 /* timing threshold */ |
129 /* timing threshold */ |
130 |
130 |
131 private var timing_threshold = PIDE.options.real("jedit_timing_threshold") |
131 private var timing_threshold = PIDE.options.real("jedit_timing_threshold") |
132 |
132 |
133 private val threshold_label = new Label("Threshold: ") |
133 private val threshold_tooltip = "Threshold for timing display (seconds)" |
|
134 |
|
135 private val threshold_label = new Label("Threshold: ") { |
|
136 tooltip = threshold_tooltip |
|
137 } |
134 |
138 |
135 private val threshold_value = new TextField(Time.print_seconds(timing_threshold)) { |
139 private val threshold_value = new TextField(Time.print_seconds(timing_threshold)) { |
136 reactions += { |
140 reactions += { |
137 case _: ValueChanged => |
141 case _: ValueChanged => |
138 text match { |
142 text match { |
139 case Properties.Value.Double(x) if x >= 0.0 => timing_threshold = x |
143 case Properties.Value.Double(x) if x >= 0.0 => timing_threshold = x |
140 case _ => |
144 case _ => |
141 } |
145 } |
142 handle_update() |
146 handle_update() |
143 } |
147 } |
144 tooltip = "Threshold for timing display (seconds)" |
148 tooltip = threshold_tooltip |
145 verifier = ((s: String) => |
149 verifier = ((s: String) => |
146 s match { case Properties.Value.Double(x) => x >= 0.0 case _ => false }) |
150 s match { case Properties.Value.Double(x) => x >= 0.0 case _ => false }) |
147 } |
151 } |
148 |
152 |
149 private val controls = new FlowPanel(FlowPanel.Alignment.Right)(threshold_label, threshold_value) |
153 private val controls = new FlowPanel(FlowPanel.Alignment.Right)(threshold_label, threshold_value) |