Skip to content

addresses table sorting issues #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ scalaModuleSettings

name := "scala-swing"

version := "2.0.3-SNAPSHOT"
version := "2.0.4-SNAPSHOT"

scalacOptions ++= Seq("-deprecation", "-feature")

// Map[JvmMajorVersion, List[(ScalaVersion, UseForPublishing)]]
scalaVersionsByJvm in ThisBuild := Map(
8 -> List("2.11.12", "2.12.4", "2.13.0-M3").map(_ -> true)
8 -> List("2.11.12", "2.12.6", "2.13.0-M3").map(_ -> true)
)

OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}")
Expand All @@ -28,15 +28,15 @@ lazy val swing = project.in(file("."))
}
)

lazy val examples = project.in( file("examples") )
lazy val examples = project.in(file("examples"))
.dependsOn(swing)
.settings(
scalaVersion := (scalaVersion in swing).value,
fork in run := true,
fork := true
)

lazy val uitest = project.in( file("uitest") )
lazy val uitest = project.in(file("uitest"))
.dependsOn(swing)
.settings(
scalaVersion := (scalaVersion in swing).value,
Expand Down
61 changes: 61 additions & 0 deletions src/main/scala/scala/swing/Font.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */

package scala.swing

import java.awt.{Font => JFont}

object Font {
def apply(name: String, style: Style.Value, size: Int): Font =
new JFont(name, style.id, size)

/** A String constant for the canonical family name of the
* logical font "Dialog". It is useful in Font construction
* to provide compile-time verification of the name.
*/
val Dialog: String = JFont.DIALOG

/** A String constant for the canonical family name of the
* logical font "DialogInput". It is useful in Font construction
* to provide compile-time verification of the name.
*/
val DialogInput: String = JFont.DIALOG_INPUT

/** A String constant for the canonical family name of the
* logical font "SansSerif". It is useful in Font construction
* to provide compile-time verification of the name.
*/
val SansSerif: String = JFont.SANS_SERIF

/** A String constant for the canonical family name of the
* logical font "Serif". It is useful in Font construction
* to provide compile-time verification of the name.
*/
val Serif: String = JFont.SERIF

/** A String constant for the canonical family name of the
* logical font "Monospaced". It is useful in Font construction
* to provide compile-time verification of the name.
*/
val Monospaced: String = JFont.MONOSPACED

// Constants to be used for styles. Can be combined to mix styles.

object Style extends Enumeration {
val Plain : Style.Value = Value(JFont.PLAIN)
val Bold : Style.Value = Value(JFont.BOLD)
val Italic : Style.Value = Value(JFont.ITALIC)
val BoldItalic: Style.Value = Value(JFont.BOLD | JFont.ITALIC)
}

// for convenience, have these values also directly in the `Font` name space
val Plain : Style.Value = Style.Plain
val Bold : Style.Value = Style.Bold
val Italic : Style.Value = Style.Italic
val BoldItalic: Style.Value = Style.BoldItalic
}
Loading