Resolves issues 0013, 0022, and 0019.

0013: Hide a new issue after a delay if does not match the viewing criteria.
0022: New 'Bugs' created are not correctly categorized.
0019: Add the ability to change the Issue text size.
This commit is contained in:
Jonathan Bernard
2010-04-20 14:02:08 -05:00
parent 591fb91d17
commit e65e2bbe47
32 changed files with 166 additions and 70 deletions

View File

@ -14,9 +14,13 @@ class NewIssueDialogController {
def show = {
view.titleTextField.text = ""
model.text = ""
view.categoryComboBox.selectedItem = Category.BUG
model.category = Category.BUG
view.statusComboBox.selectedItem = Status.NEW
model.status = Status.NEW
view.prioritySpinner.setValue(5)
model.priority = 5
view.dialog.visible = true
}
}

View File

@ -40,6 +40,12 @@ class ProjectPanelController {
void displayIssue(Issue issue) {
if (!issue) return
// hack because binding view.issueTextArea.font to
// mainMVC.mode.issueDetailFont causes problems
if (view.issueTextArea.font != model.mainMVC.model.issueDetailFont)
view.issueTextArea.font = model.mainMVC.model.issueDetailFont
view.issueTextArea.text = issue.text
view.issueTextArea.caretPosition = 0
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -117,13 +117,13 @@ frame = application(title:'Personal Issue Tracker',
def newSize = JOptionPane.showInputDialog(frame,
'New text size: ', 'Change Issue Detail Text Size...',
JOptionPane.QUESTION_MESSAGE)
if (!newSize.isInteger())
if (newSize == null || !newSize.isFloat())
JOptionPane.showMessageDialog(frame,
"$newSize is not a valid size.",
'Change Issue Detail Text Size...',
JOptionPane.ERROR_MESSAGE)
model.issueDetailFont = model.issueDetailFont.deriveFont(
newSize.toInteger())
else model.issueDetailFont = model.issueDetailFont
.deriveFont(newSize.toFloat())
})
}

View File

@ -83,8 +83,7 @@ issuePopupMenu = popupMenu() {
enabled: bind { model.popupIssue != null },
actionPerformed: {
model.popupIssue.category = category
issueList.invalidate()
issueList.repaint()
controller.refreshIssues()
})
}
}
@ -96,8 +95,7 @@ issuePopupMenu = popupMenu() {
enabled: bind { model.popupIssue != null },
actionPerformed: {
model.popupIssue.status = status
issueList.invalidate()
issueList.repaint()
controller.refreshIssues()
})
}
}
@ -115,8 +113,7 @@ issuePopupMenu = popupMenu() {
'Change Priority...', JOptionPane.ERROR_MESSAGE)
return
}
issueList.invalidate()
issueList.repaint()
controller.refreshIssues()
})
}
@ -217,7 +214,6 @@ panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
}
println model.mainMVC?.model?.issueDetailFont
scrollPane(constraints: "bottom") {
issueTextArea = textArea(
wrapStyleWord: true,
@ -225,8 +221,7 @@ panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
sourceProperty: 'selected'),
editable: bind( source: issueList, sourceEvent: 'valueChanged',
sourceValue: { issueList.selectedValue != null }),
font: bind(source: model.mainMVC.model,
property: 'issueDetailFont'),
font: model.mainMVC.model.issueDetailFont,
focusGained: {},
focusLost: {
if (!issueList?.selectedValue) return