]> gitweb @ CieloNegro.org - task-reporter.git/commitdiff
wip
authorPHO <pho@cielonegro.org>
Thu, 2 Oct 2014 09:09:48 +0000 (18:09 +0900)
committerPHO <pho@cielonegro.org>
Thu, 2 Oct 2014 09:09:48 +0000 (18:09 +0900)
src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala

index 24b60046b12b120358104e5dfb13d985e54041a6..3759437c664d32886a537faa6705fe0b79fdae03 100644 (file)
@@ -4,6 +4,7 @@ import java.awt.event.ComponentAdapter
 import java.awt.event.ComponentEvent
 import java.io._
 import javax.swing.JOptionPane
+import javax.swing.JSplitPane
 import javax.swing.KeyStroke
 import javax.swing.event.MenuListener
 import javax.swing.event.MenuEvent
@@ -104,7 +105,7 @@ class MainFrame(reportFile: Option[File]) extends Frame {
 
       val miSave = new MenuItem(new Action("Save") {
         accelerator = Some(KeyStroke.getKeyStroke("control S"));
-        def apply { save }
+        def apply = save
       })
       contents += miSave
 
@@ -112,7 +113,7 @@ class MainFrame(reportFile: Option[File]) extends Frame {
 
       contents += new MenuItem(new Action("Quit") {
         accelerator = Some(KeyStroke.getKeyStroke("control Q"))
-        def apply { closeOperation }
+        def apply = closeOperation
       })
 
       peer.addMenuListener(new MenuListener {
@@ -131,5 +132,27 @@ class MainFrame(reportFile: Option[File]) extends Frame {
     }
   }
 
+  contents = new SplitPane {
+    peer.setOrientation(JSplitPane.HORIZONTAL_SPLIT)
+    resizeWeight = 0.3
+
+    leftComponent = new BorderPanel {
+      val title = new Label("Report date") {
+        horizontalAlignment = Alignment.Leading
+      }
+      layout(title) = BorderPanel.Position.North
+
+      val scroll = new ScrollPane {
+        horizontalScrollBarPolicy = ScrollPane.BarPolicy.Never
+        verticalScrollBarPolicy   = ScrollPane.BarPolicy.Always
+        contents = new ListView[String] {
+          // FIXME
+          // listData =
+        }
+      }
+      layout(scroll) = BorderPanel.Position.Center
+    }
+  }
+
   visible = true
 }