Skip to content
/ migpanel Public

A tiny Scala wrapper for the Swing Mig Layout Manager

Notifications You must be signed in to change notification settings

tbje/migpanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

##MigPanel:## MigPanel is a thin scala wrapper for the MigLayout. Use of this wrapper allows type checking the MigLayout constraints.

Usage:

	object MyPanel extends MigPanel {
			add(new Label("Hello"), Span >> AlignX(10 cm) >> GapBottom(10))
			add(new Label("MigLayout"), Skip(2) >> GapLeft(10 px))
			add(new Label("Wrapper"), Span >> AlignX(10 cm) >> GapBottom(10))
	}

Supported constraints:

  • Wrap
  • Span
  • Skip
  • GapTop
  • GapBottom
  • GapLeft
  • GapRight
  • AlignX
  • AlignY
  • X
  • X2
  • Y
  • Y2
  • RawConstraint
  • Empty

Specifying unsupported constraints can be done using RawConstraint. There is an implicit conversion from String to RawConstraint allowing:

	add(new Label("Hello"), Span >> "shrinkprio 50"))

Credits:

Credits to hotzen for writing the initial MigPanel which this tiny DSL was built on top of.

About

A tiny Scala wrapper for the Swing Mig Layout Manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages