Iterative development on GUI

This commit is contained in:
Jonathan Bernard 2009-12-18 16:15:14 -06:00
parent 612234b345
commit f1ab340b11
25 changed files with 59 additions and 24 deletions

View File

@ -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
)

View File

@ -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'

View File

@ -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 ->
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

View File

@ -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])
}
}

Binary file not shown.