]> gitweb @ CieloNegro.org - task-reporter.git/blobdiff - src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala
wip
[task-reporter.git] / src / main / scala / jp / ymir / taskReporter / ui / MainFrame.scala
index d59493b8f93b33020b282f8ace109bd3ca82a329..f8ecc2f2c6db592e1965b42c1342a689470abb5d 100644 (file)
@@ -128,44 +128,47 @@ class MainFrame(reportFile: Option[File]) extends Frame {
               }
           }
         })
+      rightComponent = new TaskEditor {
+        border = BorderFactory.createEmptyBorder(5, 5, 5, 5)
+      }
     }
 
     leftComponent = new BorderPanel {
       border = BorderFactory.createEmptyBorder(5, 5, 5, 5)
 
-      val reportsScroll = new ScrollPane(
-        new Table() {
-          peer setFillsViewportHeight true
-          peer setModel reportSet
-          listenTo(frame)
-          reactions += {
-            case FileOpened(f) =>
-              if (rowCount > 0) {
-                selection.rows += rowCount - 1 // Select the last report
-              }
-          }
-          selection.reactions += {
-            case TableRowsSelected(_, _, false) =>
-              selection.rows.size match {
-                case 1 =>
-                  val report = reportSet(selection.rows.head)
-                  frame publish ReportSelected(report)
-                case _ =>
-                  frame publish ReportDeselected()
-              }
-          }
-        })
-      layout(reportsScroll) = BorderPanel.Position.Center
-
-      val buttons = new FlowPanel(FlowPanel.Alignment.Left)() {
-        contents += new Button(new Action("Add") {
-          def apply = {} // FIXME
-        })
-        contents += new Button(new Action("Delete...") {
-          def apply = {} // FIXME
-        })
-      }
-      layout(buttons) = BorderPanel.Position.South
+      add(
+        new ScrollPane(
+          new Table() {
+            peer setFillsViewportHeight true
+            peer setModel reportSet
+            listenTo(frame)
+            reactions += {
+              case FileOpened(f) =>
+                if (rowCount > 0) {
+                  selection.rows += rowCount - 1 // Select the last report
+                }
+            }
+            selection.reactions += {
+              case TableRowsSelected(_, _, false) =>
+                selection.rows.size match {
+                  case 1 =>
+                    val report = reportSet(selection.rows.head)
+                    frame publish ReportSelected(report)
+                  case _ =>
+                    frame publish ReportDeselected()
+                }
+            }
+          }), BorderPanel.Position.Center)
+
+      add(
+        new FlowPanel(FlowPanel.Alignment.Left)() {
+          contents += new Button(new Action("Add") {
+            def apply = {} // FIXME
+          })
+          contents += new Button(new Action("Delete...") {
+            def apply = {} // FIXME
+          })
+        }, BorderPanel.Position.South)
 
       preferredSize = minimumSize
     }