Skip to content

Commit 4841329

Browse files
committed
Update ToM_ui.groovy
1 parent ee76cc8 commit 4841329

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class ToM_ui{
212212
return sp
213213
}
214214

215-
def static createPageTitlePane(String htmlMsg, bttnText1, bttnToolTip1,bttnAction1,bttnText2,bttnToolTip2,bttnAction2){
215+
def static createPageTitlePane(String htmlMsg, botones){
216216
def panel = swing.panel() {
217217
borderLayout()
218218
editorPane(
@@ -225,21 +225,26 @@ class ToM_ui{
225225
constraints : CENTER,
226226
clientProperties: [(JEditorPane.HONOR_DISPLAY_PROPERTIES):true]
227227
)
228-
vbox(constraints:WEST) {
229-
button(
230-
label : bttnText1,
231-
// constraints : WEST,
232-
// margin : new Insets(10,15,10,15),
233-
toolTipText : bttnToolTip1,
234-
actionPerformed : bttnAction1,
235-
)
236-
button(
237-
label : bttnText2,
238-
// constraints : EAST,
239-
// margin : new Insets(10,15,10,15),
240-
toolTipText : bttnToolTip2,
241-
actionPerformed : bttnAction2,
242-
)
228+
if(botones.size()>0){
229+
vbox(constraints:WEST) {
230+
botones.each{b ->
231+
button(
232+
label : b[0],
233+
// constraints : WEST,
234+
margin : new Insets(0,2,0,2),
235+
toolTipText : b[1],
236+
actionPerformed : b[2],
237+
icon : b[3],
238+
)
239+
}
240+
// button(
241+
// label : bttnText2,
242+
// // constraints : EAST,
243+
// // margin : new Insets(10,15,10,15),
244+
// toolTipText : bttnToolTip2,
245+
// actionPerformed : bttnAction2,
246+
// )
247+
}
243248
}
244249
}
245250
return panel

0 commit comments

Comments
 (0)