diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-10 11:14:46 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-10 11:14:46 -0800 |
commit | f40541788957c257ee8b4035e0063a8a48945c11 (patch) | |
tree | df574bd0aefe1e809fb890e42cdf2bf189659cfa /docs/examples/swing/GridBagDemo.scala | |
parent | 0c927046dc5df974e6c39187107cf3548825282b (diff) | |
parent | 27a38602decb891399fc9868b4dd7135f6e1ec2c (diff) | |
download | scala-f40541788957c257ee8b4035e0063a8a48945c11.tar.gz scala-f40541788957c257ee8b4035e0063a8a48945c11.tar.bz2 scala-f40541788957c257ee8b4035e0063a8a48945c11.zip |
Merge pull request #3248 from adriaanm/dist-cleanup-licenses
Clean up Scala distribution a bit.
Diffstat (limited to 'docs/examples/swing/GridBagDemo.scala')
-rw-r--r-- | docs/examples/swing/GridBagDemo.scala | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/docs/examples/swing/GridBagDemo.scala b/docs/examples/swing/GridBagDemo.scala deleted file mode 100644 index 60cfc13acb..0000000000 --- a/docs/examples/swing/GridBagDemo.scala +++ /dev/null @@ -1,64 +0,0 @@ -package examples.swing - -import swing._ -import swing.event._ -import GridBagPanel._ -import java.awt.Insets - -object GridBagDemo extends SimpleSwingApplication { - lazy val ui = new GridBagPanel { - val c = new Constraints - val shouldFill = true - if (shouldFill) { - c.fill = Fill.Horizontal - } - - val button1 = new Button("Button 1") - - c.weightx = 0.5 - - c.fill = Fill.Horizontal - c.gridx = 0; - c.gridy = 0; - layout(button1) = c - - val button2 = new Button("Button 2") - c.fill = Fill.Horizontal - c.weightx = 0.5; - c.gridx = 1; - c.gridy = 0; - layout(button2) = c - - val button3 = new Button("Button 3") - c.fill = Fill.Horizontal - c.weightx = 0.5; - c.gridx = 2; - c.gridy = 0; - layout(button3) = c - - val button4 = new Button("Long-Named Button 4") - c.fill = Fill.Horizontal - c.ipady = 40; //make this component tall - c.weightx = 0.0; - c.gridwidth = 3; - c.gridx = 0; - c.gridy = 1; - layout(button4) = c - - val button5 = new Button("5") - c.fill = Fill.Horizontal - c.ipady = 0; //reset to default - c.weighty = 1.0; //request any extra vertical space - c.anchor = Anchor.PageEnd - c.insets = new Insets(10,0,0,0); //top padding - c.gridx = 1; //aligned with button 2 - c.gridwidth = 2; //2 columns wide - c.gridy = 2; //third row - layout(button5) = c - } - - def top = new MainFrame { - title = "GridBag Demo" - contents = ui - } -} |