Trying to add FEST-Swing tests.
This commit is contained in:
@ -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') {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user