Trying to add FEST-Swing tests.

This commit is contained in:
Jonathan Bernard
2010-03-23 07:53:29 -05:00
parent ec690f8a98
commit 591fb91d17
12 changed files with 202 additions and 103 deletions

View File

@ -13,6 +13,7 @@ import javax.swing.DefaultComboBoxModel
import javax.swing.DefaultListModel
import javax.swing.JDialog
import javax.swing.JFileChooser
import javax.swing.JOptionPane
import net.miginfocom.swing.MigLayout
import java.awt.Color
@ -109,6 +110,21 @@ frame = application(title:'Personal Issue Tracker',
}
}
separator()
menuItem('Detail Text Size...',
actionPerformed: {
def newSize = JOptionPane.showInputDialog(frame,
'New text size: ', 'Change Issue Detail Text Size...',
JOptionPane.QUESTION_MESSAGE)
if (!newSize.isInteger())
JOptionPane.showMessageDialog(frame,
"$newSize is not a valid size.",
'Change Issue Detail Text Size...',
JOptionPane.ERROR_MESSAGE)
model.issueDetailFont = model.issueDetailFont.deriveFont(
newSize.toInteger())
})
}
menu('Sort') {

View File

@ -217,6 +217,7 @@ panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
}
println model.mainMVC?.model?.issueDetailFont
scrollPane(constraints: "bottom") {
issueTextArea = textArea(
wrapStyleWord: true,
@ -224,7 +225,8 @@ panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
sourceProperty: 'selected'),
editable: bind( source: issueList, sourceEvent: 'valueChanged',
sourceValue: { issueList.selectedValue != null }),
font: new Font(Font.MONOSPACED, Font.PLAIN, 10),
font: bind(source: model.mainMVC.model,
property: 'issueDetailFont'),
focusGained: {},
focusLost: {
if (!issueList?.selectedValue) return