From: PHO Date: Thu, 2 Oct 2014 09:09:48 +0000 (+0900) Subject: wip X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=task-reporter.git;a=commitdiff_plain;h=f35a6ee198f3f2dba8dc60ae969c4ce1c5c8c22b wip --- diff --git a/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala b/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala index 24b6004..3759437 100644 --- a/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala +++ b/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala @@ -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 }