Iterative development on GUI
@ -0,0 +1,11 @@
|
||||
package com.jdbernard.timestamper
|
||||
|
||||
gracefulExitAction = action (
|
||||
name: 'Graceful Exit',
|
||||
closure: controller.&exitGracefully
|
||||
)
|
||||
|
||||
toolsMenuAction = action (
|
||||
name: 'Show Tools Menu',
|
||||
closure: controller.&showToolsMenu
|
||||
)
|
@ -11,6 +11,7 @@ application {
|
||||
mvcGroups {
|
||||
// MVC Group for "com.jdbernard.timestamper.TimeStamperMain"
|
||||
'TimeStamperMain' {
|
||||
actions = 'com.jdbernard.timestamper.TimeStamperMainActions'
|
||||
model = 'com.jdbernard.timestamper.TimeStamperMainModel'
|
||||
controller = 'com.jdbernard.timestamper.TimeStamperMainController'
|
||||
view = 'com.jdbernard.timestamper.TimeStamperMainView'
|
||||
|
@ -9,8 +9,11 @@ class TimeStamperMainController {
|
||||
// this method is called after model and view are injected
|
||||
}
|
||||
|
||||
/*
|
||||
def action = { evt = null ->
|
||||
def exitGracefully = { evt = null ->
|
||||
app.shutdown()
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
def showToolsMenu = { evt = null ->
|
||||
|
||||
}
|
||||
}
|
||||
|
BIN
griffon-app/resources/12-em-cross.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
griffon-app/resources/16-em-cross-hover.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
griffon-app/resources/16-em-cross.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
griffon-app/resources/16-em-pencil.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
griffon-app/resources/16-file-archive.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
griffon-app/resources/16-square-green-add.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
griffon-app/resources/16-square-red-delete.png
Normal file
After Width: | Height: | Size: 321 B |
BIN
griffon-app/resources/16-tool-a-hover.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
griffon-app/resources/16-tool-a.png
Normal file
After Width: | Height: | Size: 275 B |
BIN
griffon-app/resources/24-em-cross.png
Normal file
After Width: | Height: | Size: 626 B |
BIN
griffon-app/resources/24-message-info.png
Normal file
After Width: | Height: | Size: 746 B |
BIN
griffon-app/resources/document-open-16x16.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
griffon-app/resources/document-save-16x16.png
Normal file
After Width: | Height: | Size: 911 B |
BIN
griffon-app/resources/document-save-as-16x16.png
Normal file
After Width: | Height: | Size: 866 B |
BIN
griffon-app/resources/media-playback-reverse.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
griffon-app/resources/media-playback-start.png
Normal file
After Width: | Height: | Size: 660 B |
BIN
griffon-app/resources/media-seek-backward.png
Normal file
After Width: | Height: | Size: 764 B |
BIN
griffon-app/resources/media-seek-forward.png
Normal file
After Width: | Height: | Size: 782 B |
BIN
griffon-app/resources/media-skip-backward.png
Normal file
After Width: | Height: | Size: 770 B |
BIN
griffon-app/resources/media-skip-forward.png
Normal file
After Width: | Height: | Size: 771 B |
@ -1,7 +1,9 @@
|
||||
package com.jdbernard.timestamper
|
||||
|
||||
import java.awt.Color
|
||||
import java.awt.GridBagConstraints
|
||||
import java.awt.Font
|
||||
import javax.swing.BoxLayout
|
||||
import net.miginfocom.swing.MigLayout
|
||||
|
||||
application(title:'TimeStamper',
|
||||
//size:[320,480],
|
||||
@ -14,27 +16,45 @@ application(title:'TimeStamper',
|
||||
imageIcon('/appointment-new-16x16.png').image]
|
||||
) {
|
||||
panel(
|
||||
border:lineBorder(color:Color.BLACK, thickness:2, parent:true)
|
||||
border:lineBorder(color:Color.BLACK, thickness:1, parent:true),
|
||||
layout: new MigLayout('insets 0 5 0 0, fill','', '[]0[]0[]')
|
||||
) {
|
||||
vbox() {
|
||||
hbox() {
|
||||
label("Current task started at ")
|
||||
label("00:00:00")
|
||||
hglue()
|
||||
button("Menu")
|
||||
button("Exit")
|
||||
}
|
||||
panel () {
|
||||
gridBagLayout()
|
||||
def mainFont = new Font(Font.SANS_SERIF, Font.BOLD, 12)
|
||||
def timeFont = new Font(Font.SANS_SERIF, Font.BOLD, 14)
|
||||
label("Current task started at ", font: mainFont)
|
||||
label("00:00:00", constraints: 'align leading',
|
||||
font: timeFont, foreground: [0, 102, 102])
|
||||
|
||||
textField("Task name", constraints:gbc(gridx:0, gridy:0,
|
||||
gridwidth:2, fill:GridBagConstraints.HORIZONTAL))
|
||||
button("Notes", constraints:gbc(gridx:2, gridy:0,
|
||||
fill:GridBagConstraints.NONE))
|
||||
button("Timeline", constraints:gbc(gridx:3, gridy:0,
|
||||
fill:GridBagConstraints.NONE))
|
||||
label("12:34:56", constraints:gbc(gridx:0, gridy:1))
|
||||
}
|
||||
panel( constraints: 'alignx trailing, aligny top, wrap') {
|
||||
boxLayout(axis: BoxLayout.X_AXIS)
|
||||
button(toolsMenuAction,
|
||||
icon: imageIcon('/16-tool-a.png'),
|
||||
rolloverIcon: imageIcon('/16-tool-a-hover.png'),
|
||||
border: emptyBorder(0),
|
||||
contentAreaFilled: false,
|
||||
hideActionText: true)
|
||||
button(gracefulExitAction,
|
||||
icon: imageIcon('/16-em-cross.png'),
|
||||
rolloverIcon: imageIcon('/16-em-cross-hover.png'),
|
||||
border: emptyBorder(0),
|
||||
contentAreaFilled: false,
|
||||
hideActionText: true)
|
||||
}
|
||||
|
||||
textField("Task name", constraints: "growx, span 2, w 250::")
|
||||
|
||||
panel(constraints: 'alignx leading, aligny top, gapright 5px, wrap') {
|
||||
boxLayout(axis: BoxLayout.X_AXIS)
|
||||
toggleButton(icon: imageIcon('/16-em-pencil.png'),
|
||||
border: emptyBorder(4))
|
||||
toggleButton(icon: imageIcon('/16-file-archive.png'),
|
||||
border: emptyBorder(4))
|
||||
}
|
||||
|
||||
label("2hr 18min 56sec", constraints: 'alignx leading', font: timeFont,
|
||||
foreground: [0, 153, 0])
|
||||
|
||||
label("00:00:00", constraints: 'align trailing', font: timeFont,
|
||||
foreground: [204, 0, 0])
|
||||
}
|
||||
}
|
||||
|