X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=task-reporter.git;a=blobdiff_plain;f=src%2Fmain%2Fscala%2Fjp%2Fymir%2FtaskReporter%2Fui%2FMainFrame.scala;fp=src%2Fmain%2Fscala%2Fjp%2Fymir%2FtaskReporter%2Fui%2FMainFrame.scala;h=3759437c664d32886a537faa6705fe0b79fdae03;hp=24b60046b12b120358104e5dfb13d985e54041a6;hb=f35a6ee198f3f2dba8dc60ae969c4ce1c5c8c22b;hpb=8bb945088ae66f9687f1fd5aa72a1440aba54466 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 }