Still updating pit-swing.
This commit is contained in:
@ -15,8 +15,7 @@ dialog = dialog(title: 'New Task...', modal: true, pack: true,
|
||||
insets: [5, 5, 0, 5], fill: GBC.HORIZONTAL))
|
||||
titleTextField = textField(
|
||||
constraints: gbc(gridx: 0, gridy: 1, gridwidth: 3,
|
||||
insets: [0, 10, 0, 5], fill: GBC.HORIZONTAL),
|
||||
keyTyped: { model.text = titleTextField.text })
|
||||
insets: [0, 10, 0, 5], fill: GBC.HORIZONTAL))
|
||||
|
||||
label('Category:',
|
||||
constraints: gbc(gridx: 0, gridy: 2, insets: [5, 5, 0, 0],
|
||||
@ -26,7 +25,7 @@ dialog = dialog(title: 'New Task...', modal: true, pack: true,
|
||||
fill: GBC.HORIZONTAL),
|
||||
model: new DefaultComboBoxModel(Category.values()),
|
||||
editable: false,
|
||||
itemStateChanged: { model.category = categoryComboBox.selectedValue })
|
||||
itemStateChanged: { model.category = categoryComboBox.selectedItem })
|
||||
|
||||
label('Status:',
|
||||
constraints: gbc(gridx: 0, gridy: 3, insets: [5, 5, 0, 0],
|
||||
@ -36,7 +35,7 @@ dialog = dialog(title: 'New Task...', modal: true, pack: true,
|
||||
fill: GBC.HORIZONTAL),
|
||||
model: new DefaultComboBoxModel(Status.values()),
|
||||
editable: false,
|
||||
itemStateChanged: { model.status = statusComboBox.selectedValue })
|
||||
itemStateChanged: { model.status = statusComboBox.selectedItem })
|
||||
|
||||
label('Priority (0-9, 0 is highest priority):',
|
||||
constraints: gbc(gridx: 0, gridy: 4, insets: [5, 5, 0, 0],
|
||||
@ -56,6 +55,7 @@ dialog = dialog(title: 'New Task...', modal: true, pack: true,
|
||||
anchor: GBC.EAST))
|
||||
button('Create Issue',
|
||||
actionPerformed: {
|
||||
model.text = titleTextField.text
|
||||
model.accept = true
|
||||
dialog.visible = false
|
||||
},
|
||||
|
@ -26,6 +26,13 @@ actions {
|
||||
closure: controller.openProject
|
||||
)
|
||||
|
||||
action(
|
||||
id: 'closeProject',
|
||||
name: 'Close',
|
||||
enabled: bind { projectPanelMVCs.size() > 0 },
|
||||
closure: controller.closeProject
|
||||
)
|
||||
|
||||
action(
|
||||
id: 'shutdown',
|
||||
name: 'Exit',
|
||||
@ -62,6 +69,8 @@ frame = application(title:'Personal Issue Tracker',
|
||||
menuBar() {
|
||||
menu("File") {
|
||||
menuItem(openProject)
|
||||
menuItem(closeProject)
|
||||
separator()
|
||||
menuItem(shutdown)
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ actions {
|
||||
id: 'deleteProject',
|
||||
name: 'Delete Project',
|
||||
closure: controller.deleteProject,
|
||||
enabled: bind {model.selectedProject != null }
|
||||
enabled: bind { model.selectedProject != null }
|
||||
)
|
||||
|
||||
action (
|
||||
@ -47,6 +47,7 @@ actions {
|
||||
closure: controller.deleteProject,
|
||||
enabled: bind { model.popupProject != null }
|
||||
)
|
||||
|
||||
action (
|
||||
id: 'deleteIssue',
|
||||
name: 'Delete Issue',
|
||||
@ -75,7 +76,7 @@ issuePopupMenu = popupMenu() {
|
||||
menuItem(deleteIssuePop)
|
||||
separator()
|
||||
|
||||
menu('Change Category') {
|
||||
menu('Change Category', enabled: bind { model.popupIssue != null }) {
|
||||
Category.values().each { category ->
|
||||
menuItem(category.toString(),
|
||||
icon: model.mainMVC.model.categoryIcons[(category)],
|
||||
@ -88,7 +89,7 @@ issuePopupMenu = popupMenu() {
|
||||
}
|
||||
}
|
||||
|
||||
menu('Change Status') {
|
||||
menu('Change Status', enabled: bind { model.popupIssue != null }) {
|
||||
Status.values().each { status ->
|
||||
menuItem(status.toString(),
|
||||
icon: model.mainMVC.model.statusIcons[(status)],
|
||||
@ -122,6 +123,7 @@ issuePopupMenu = popupMenu() {
|
||||
// main split view
|
||||
panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
|
||||
// dividerLocation: bind(source: model.mainModel, property: dividerLocation),
|
||||
oneTouchExpandable: true,
|
||||
constraints: gbc(fill: GBC.BOTH, insets: [10,10,10,10],
|
||||
weightx: 2, weighty: 2)) {
|
||||
|
||||
@ -161,9 +163,6 @@ panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
|
||||
evt.x, evt.y)
|
||||
}
|
||||
})
|
||||
projectTree.model = new DefaultTreeModel(
|
||||
new DefaultMutableTreeNode())
|
||||
projectTree.rootVisible = false
|
||||
|
||||
projectTree.selectionModel.selectionMode =
|
||||
TreeSelectionModel.SINGLE_TREE_SELECTION
|
||||
@ -217,6 +216,7 @@ panel = splitPane(orientation: JSplitPane.HORIZONTAL_SPLIT,
|
||||
sourceValue: { issueList.selectedValue != null }))
|
||||
|
||||
}
|
||||
|
||||
scrollPane(constraints: "bottom") {
|
||||
issueTextArea = textArea(
|
||||
wrapStyleWord: true,
|
||||
|
Reference in New Issue
Block a user