Object

jswing

JUtils

Related Doc: package jswing

Permalink

object JUtils

General utilities for Java Swing. It provide functions to pick color, run actions on java swing thread, run actions periodically or with delay and etc.

Source
jswing.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def getColor(color: String): Option[Color]

    Permalink
  11. def getColorOrNull(color: String): Color

    Permalink
  12. def getScreenShot(component: Component): BufferedImage

    Permalink

    Get screenshot of jswing component such as JFrame

  13. def getScreenSize(): (Double, Double)

    Permalink

    Returns screen dimensions in pixels width x height

  14. def getScriptName(): String

    Permalink

    Get the name of current scala script being run as $ scala /path/script.scala.

    Get the name of current scala script being run as $ scala /path/script.scala. It will return /path/script.scala

  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def invokeAndWait(handler: ⇒ Unit): Unit

    Permalink
  17. def invokeLater(handler: ⇒ Unit): Unit

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def openFile(file: String): Unit

    Permalink

    Open file with default desktop application.

    Open file with default desktop application.

    Example: It will open this PDF file with default system application.

    scala> jswing.JUtils.openFile("/home/archbox/Desktop/functional-gui.pdf")
  23. def openUrl(uri: String): Unit

    Permalink

    Open URL with default browser.

    Open URL with default browser.

    Example:

    scala> jswing.JUtils.openUrl("http://www.yandex.com")
  24. def readResourceFile(file: String): String

    Permalink

    Read resource file

  25. def runDelay(delay: Int)(action: ⇒ Unit): () ⇒ Unit

    Permalink

    Run an action a single-time after a milliseconds delay with java swing Timer.

    Run an action a single-time after a milliseconds delay with java swing Timer.

    delay

    - Period in milliseconds (seconds x 1000)

    action

    - Code block that will be run after a delay.

    returns

    - Function that when executed stops the timer.

  26. def runEvery(period: Int)(action: ⇒ Unit): () ⇒ Unit

    Permalink

    Run an action every a milliseconds period with java swing Timer.

    Run an action every a milliseconds period with java swing Timer.

    period

    - Period in milliseconds (seconds x 1000)

    action

    - Code block that will be run periodically.

    returns

    - Function that when executed stops the timer.

  27. def saveScreenShot(component: Component, file: String): Unit

    Permalink

    Save a screenshot of jswing component such as JFrame to a PNG file.

  28. def saveScreenShotArgs(comp: Component, file: String = null)(args: Array[String]): Unit

    Permalink
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped