X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=src%2Fmain%2Fscala%2Fjp%2Fymir%2FtaskReporter%2Fui%2FMainFrame.scala;h=3878d21e65186afee95c4771c5b9208da51a416a;hb=98a5e495638e1ef4c5826e2a67bbd7a93fb8d296;hp=f8ecc2f2c6db592e1965b42c1342a689470abb5d;hpb=f6a51dbcc510104994344140fccdeaab459eb570;p=task-reporter.git diff --git a/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala b/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala index f8ecc2f..3878d21 100644 --- a/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala +++ b/src/main/scala/jp/ymir/taskReporter/ui/MainFrame.scala @@ -3,7 +3,6 @@ import java.awt.Dimension import java.awt.event.ComponentAdapter import java.awt.event.ComponentEvent import java.io._ -import javax.swing.BorderFactory import javax.swing.JOptionPane import javax.swing.JSplitPane import javax.swing.KeyStroke @@ -13,6 +12,7 @@ import javax.swing.filechooser.FileNameExtensionFilter import jp.ymir.taskReporter._ import jp.ymir.taskReporter.core._ import scala.swing._ +import scala.swing.Swing._ import scala.swing.event._ class MainFrame(reportFile: Option[File]) extends Frame { @@ -94,13 +94,10 @@ class MainFrame(reportFile: Option[File]) extends Frame { oneTouchExpandable = true resizeWeight = 0 // Let the left pane be fixed - rightComponent = new SplitPane { - peer.setOrientation(JSplitPane.VERTICAL_SPLIT) - continuousLayout = true - oneTouchExpandable = true - resizeWeight = 0.5 + rightComponent = new BoxPanel(Orientation.Vertical) { + border = EmptyBorder(5, 5, 5, 5) - leftComponent = new ScrollPane( + contents += new ScrollPane( new Table() { peer setFillsViewportHeight true listenTo(frame) @@ -128,13 +125,27 @@ class MainFrame(reportFile: Option[File]) extends Frame { } } }) - rightComponent = new TaskEditor { - border = BorderFactory.createEmptyBorder(5, 5, 5, 5) + contents += VStrut(5) + contents += new TaskEditor { + listenTo(frame) + reactions += { + case TaskSelected(t) => task = t + case TaskDeselected() => task = Task() + } + } + contents += VStrut(5) + contents += new FlowPanel(FlowPanel.Alignment.Left)() { + contents += new Button(new Action("New") { + def apply = {} // FIXME + }) + contents += new Button(new Action("Delete...") { + def apply = {} // FIXME + }) } } leftComponent = new BorderPanel { - border = BorderFactory.createEmptyBorder(5, 5, 5, 5) + border = EmptyBorder(5, 5, 5, 5) add( new ScrollPane( @@ -162,7 +173,7 @@ class MainFrame(reportFile: Option[File]) extends Frame { add( new FlowPanel(FlowPanel.Alignment.Left)() { - contents += new Button(new Action("Add") { + contents += new Button(new Action("New...") { def apply = {} // FIXME }) contents += new Button(new Action("Delete...") {