Added NotesDialog MVC. Wired window movement. Added GUIUtil
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
package com.jdbernard.timestamper
|
||||
|
||||
import java.awt.Color
|
||||
import javax.swing.BoxLayout
|
||||
import net.miginfocom.swing.MigLayout
|
||||
|
||||
notesDialog = dialog(
|
||||
title: 'Notes',
|
||||
modal: false,
|
||||
undecorated: true,
|
||||
minimumSize: [325, 200],
|
||||
iconImage: imageIcon('/16-em-pencil.png').image,
|
||||
iconImages: [imageIcon('/16-em-pencil.png').image]
|
||||
) {
|
||||
|
||||
panel(
|
||||
border:lineBorder(color: Color.BLACK, thickness:1, parent:true),
|
||||
mousePressed: controller.&mousePressed,
|
||||
mouseDragged: controller.&mouseDragged,
|
||||
layout: new MigLayout('insets 5 5 5 5, fill')
|
||||
) {
|
||||
scrollPane(constraints: 'growx, growy') {
|
||||
notesTextArea = textArea(lineWrap: true, columns: 20, rows: 5,
|
||||
wrapStyleWord: true)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -5,7 +5,7 @@ import java.awt.Font
|
||||
import javax.swing.BoxLayout
|
||||
import net.miginfocom.swing.MigLayout
|
||||
|
||||
application(title:'TimeStamper',
|
||||
frame = application(title:'TimeStamper',
|
||||
//size:[320,480],
|
||||
pack:true,
|
||||
//location:[50,50],
|
||||
@ -17,7 +17,9 @@ application(title:'TimeStamper',
|
||||
) {
|
||||
panel(
|
||||
border:lineBorder(color:Color.BLACK, thickness:1, parent:true),
|
||||
layout: new MigLayout('insets 0 5 0 0, fill','', '[]0[]0[]')
|
||||
layout: new MigLayout('insets 0 5 0 0, fill','', '[]0[]0[]'),
|
||||
mousePressed: controller.&mousePressed,
|
||||
mouseDragged: controller.&mouseDragged
|
||||
) {
|
||||
def mainFont = new Font(Font.SANS_SERIF, Font.BOLD, 12)
|
||||
def timeFont = new Font(Font.SANS_SERIF, Font.BOLD, 14)
|
||||
@ -45,10 +47,12 @@ application(title:'TimeStamper',
|
||||
|
||||
panel(constraints: 'alignx leading, aligny top, gapright 5px, wrap') {
|
||||
boxLayout(axis: BoxLayout.X_AXIS)
|
||||
toggleButton(showNotesAction, icon: imageIcon('/16-em-pencil.png'),
|
||||
notesVisibleButton = toggleButton(showNotesAction, icon: imageIcon('/16-em-pencil.png'),
|
||||
hideActionText: true,
|
||||
border: emptyBorder(4))
|
||||
toggleButton(showPunchcardAction,
|
||||
punchcardVisibleButton = toggleButton(showPunchcardAction,
|
||||
icon: imageIcon('/16-file-archive.png'),
|
||||
hideActionText: true,
|
||||
border: emptyBorder(4))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user