-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit 7d62518
In the board/library manager, create the description component only once
Previously,`makeNewDescription` was called in the constructor and then
again later in the `update` method (board manager) or later in the
constructor (library manager) to recreate the description JTextPane so
it can be filled with text. In all cases, the pane would be created
equal, so there is no point in recreating it.
Now, it is created only once and stored in an instance variable for
later reference. Additionally, `makeNewDescription` now only creates the
JTextPane, the constructor handles adding it (like for other
components).
This change slightly simplifies code, but also prepares for allowing
to change the description text color externally in a later commit.
For the library manager it is not currently strictly needed to have an
instance variable (since the description is only used inside the
constructor), but the instance variable is added for consistency and to
prepare for this same upcoming change.1 parent 778f681 commit 7d62518
File tree
2 files changed
+6
-13
lines changed- app/src/cc/arduino/contributions
- libraries/ui
- packages/ui
2 files changed
+6
-13
lines changedLines changed: 3 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 | + | ||
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
| |||
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
71 | - | ||
72 | + | ||
73 | + | ||
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
| |||
112 | 114 |
| |
113 | 115 |
| |
114 | 116 |
| |
115 | - | ||
116 | 117 |
| |
117 | 118 |
| |
118 | 119 |
| |
| |||
231 | 232 |
| |
232 | 233 |
| |
233 | 234 |
| |
234 | - | ||
235 | - | ||
236 | - | ||
237 | 235 |
| |
238 | 236 |
| |
239 | 237 |
| |
| |||
259 | 257 |
| |
260 | 258 |
| |
261 | 259 |
| |
262 | - | ||
263 | 260 |
| |
264 | 261 |
| |
265 | 262 |
| |
|
Lines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 | + | ||
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| |||
108 | 109 |
| |
109 | 110 |
| |
110 | 111 |
| |
111 | - | ||
112 | + | ||
113 | + | ||
112 | 114 |
| |
113 | 115 |
| |
114 | 116 |
| |
| |||
178 | 180 |
| |
179 | 181 |
| |
180 | 182 |
| |
181 | - | ||
182 | - | ||
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
| |||
273 | 273 |
| |
274 | 274 |
| |
275 | 275 |
| |
276 | - | ||
277 | - | ||
278 | - | ||
279 | 276 |
| |
280 | 277 |
| |
281 | 278 |
| |
| |||
299 | 296 |
| |
300 | 297 |
| |
301 | 298 |
| |
302 | - | ||
303 | 299 |
| |
304 | 300 |
| |
305 | 301 |
| |
|
0 commit comments