Packages

  • package root
    Definition Classes
    root
  • package o1

    O1Library is a toolkit designed for the course Programming 1 (a.k.a. O1) at Aalto University.

    O1Library is a toolkit designed for the course Programming 1 (a.k.a. O1) at Aalto University. It contains an assortment of tools; most prominently, it provides a framework for simple graphical programming and utilities for playing sound.

    This is the front page of O1Library’s documentation. However, this is probably not the best place to start learning about O1Library as a student. That’s because the relevant content of this library is introduced bit by bit in the chapters of O1’s custom ebook alongside the associated programming concepts and assignments.

    You may still find this documentation useful as a reference. You can also find some optional content here that you may wish to try.

    This front page lists the content available in the top-level package called simply o1. These tools are available with the simple command import o1._ in your Scala programs. Some of them you’ll use a lot; some of them you won’t necessarily need at all.

    The tools listed here are actually implemented in a number of subpackages (o1.gui, o1.sound, etc.); what you see here are just “shortcut aliases” to those actual implementations. The aliases are here to make that convenient import command work and to provide you with this list of links to some of the more commonly used tools in O1Library. The subpackages also contain additional content not listed here.

    O1Library has been developed by Aleksi Lukkarinen and Juha Sorva. Several of the key components in o1.gui and o1.world are built upon Aleksi’s Scala Media Computation Library. Some parts of O1Library draw inspiration from the “teachpacks” of the Racket programming language.

    We are grateful to Riku Autio, Joonatan Honkamaa, Juhani Numminen, Leo Varis, Veera Kahva, and anonymous students for bug reports and fixes. We thank Otto Seppälä for helpful discussions.

    Definition Classes
    root
  • package gui

    This package contains tools for building simple GUIs.

    This package contains tools for building simple GUIs. The toolkit is particularly well suited to constructing GUIs that display information as 2D images and/or geometric shapes. It is not designed for demanding graphical needs that call for high efficiency. Some of the tools in this package are built on the Swing GUI library, and the two libraries can be used in combination.

    Some of the types in this package have aliases in the top-level package o1, so they are accessible to students simply via import o1._. Some of the package contents are not available in the top-level package or included in this documentation.

    Please note: One of this package’s key components (views) comes in multiple varieties, which which are defined in the subpackages o1.gui.mutable and o1.gui.immutable and not listed below. The View that is most commonly used in O1 (and aliased as o1.View in the top-level package) is o1.gui.mutable.ViewFrame.

    Definition Classes
    o1
  • package layout

    The package o1.gui.layout contains utilities that make it more convenient to lay out components in simple GridBagPanels from Scala's Swing library.

    The package o1.gui.layout contains utilities that make it more convenient to lay out components in simple GridBagPanels from Scala's Swing library. These utilities are used internally by some of the given GUIs in O1.

    NOTE TO STUDENTS: In this course, you don't need to understand how this package works or can be used.

    Definition Classes
    gui
  • EasyLayout
  • EasyPanel
t

o1.gui.layout

EasyPanel

trait EasyPanel extends GridBagPanel with EasyLayout

Linear Supertypes
EasyLayout, GridBagPanel, LayoutContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EasyPanel
  2. EasyLayout
  3. GridBagPanel
  4. LayoutContainer
  5. Panel
  6. Wrapper
  7. Container
  8. Component
  9. UIElement
  10. LazyPublisher
  11. Publisher
  12. Reactor
  13. Proxy
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class Constraints extends Proxy
    Definition Classes
    GridBagPanel
  2. class Content extends BufferWrapper[Component]
    Attributes
    protected
    Definition Classes
    Wrapper
  3. trait SuperMixin extends JComponent
    Attributes
    protected
    Definition Classes
    Component

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val _contents: Content
    Attributes
    protected
    Definition Classes
    Wrapper
  5. def add(c: Component, l: Constraints): Unit
    Attributes
    protected
    Definition Classes
    GridBagPanel → LayoutContainer
  6. def areValid(c: Constraints): (Boolean, String)
    Attributes
    protected
    Definition Classes
    GridBagPanel → LayoutContainer
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def background: scala.swing.Color
    Definition Classes
    UIElement
  9. def background_=(c: scala.swing.Color): Unit
    Definition Classes
    UIElement
  10. def border: Border
    Definition Classes
    Component
  11. def border_=(b: Border): Unit
    Definition Classes
    Component
  12. def bounds: Rectangle
    Definition Classes
    UIElement
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  14. def componentOrientation: ComponentOrientation
    Definition Classes
    UIElement
  15. def componentOrientation_=(x: ComponentOrientation): Unit
    Definition Classes
    UIElement
  16. def constraintsFor(component: Component, xy: (Int, Int), size: (Int, Int), anchor: Anchor, fill: Fill, border: (Int, Int, Int, Int)): Constraints
    Definition Classes
    EasyPanelEasyLayout
  17. def constraintsFor(comp: Component): Constraints
    Attributes
    protected
    Definition Classes
    GridBagPanel → LayoutContainer
  18. def contents: Seq[Component]
    Definition Classes
    Wrapper → Container
  19. def cursor: Cursor
    Definition Classes
    UIElement
  20. def cursor_=(c: Cursor): Unit
    Definition Classes
    UIElement
  21. def deafTo(ps: Publisher*): Unit
    Definition Classes
    Reactor
  22. def displayable: Boolean
    Definition Classes
    UIElement
  23. def enabled: Boolean
    Definition Classes
    Component
  24. def enabled_=(b: Boolean): Unit
    Definition Classes
    Component
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(that: Any): Boolean
    Definition Classes
    Proxy → Any
  27. def focusable: Boolean
    Definition Classes
    Component
  28. def focusable_=(b: Boolean): Unit
    Definition Classes
    Component
  29. def font: Font
    Definition Classes
    UIElement
  30. def font_=(f: Font): Unit
    Definition Classes
    UIElement
  31. def foreground: scala.swing.Color
    Definition Classes
    UIElement
  32. def foreground_=(c: scala.swing.Color): Unit
    Definition Classes
    UIElement
  33. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. def hasFocus: Boolean
    Definition Classes
    Component
  35. def hashCode(): Int
    Definition Classes
    Proxy → Any
  36. def ignoreRepaint: Boolean
    Definition Classes
    UIElement
  37. def ignoreRepaint_=(b: Boolean): Unit
    Definition Classes
    UIElement
  38. def inputVerifier: (Component) => Boolean
    Definition Classes
    Component
  39. def inputVerifier_=(v: (Component) => Boolean): Unit
    Definition Classes
    Component
  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. def layout: Map[Component, Constraints]
    Definition Classes
    LayoutContainer
  42. def listenTo(ps: Publisher*): Unit
    Definition Classes
    Reactor
  43. val listeners: RefSet[Reaction]
    Attributes
    protected
    Definition Classes
    Publisher
  44. def locale: Locale
    Definition Classes
    UIElement
  45. def location: Point
    Definition Classes
    UIElement
  46. def locationOnScreen: Point
    Definition Classes
    UIElement
  47. def maximumSize: Dimension
    Definition Classes
    UIElement
  48. def maximumSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  49. def minimumSize: Dimension
    Definition Classes
    UIElement
  50. def minimumSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  51. def name: String
    Definition Classes
    Component
  52. def name_=(s: String): Unit
    Definition Classes
    Component
  53. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  55. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  56. def onFirstSubscribe(): Unit
    Attributes
    protected
    Definition Classes
    Component → UIElement → LazyPublisher
  57. def onLastUnsubscribe(): Unit
    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  58. def opaque: Boolean
    Definition Classes
    Component
  59. def opaque_=(b: Boolean): Unit
    Definition Classes
    Component
  60. def paint(g: Graphics2D): Unit
    Definition Classes
    Component
  61. def paintBorder(g: Graphics2D): Unit
    Attributes
    protected
    Definition Classes
    Component
  62. def paintChildren(g: Graphics2D): Unit
    Attributes
    protected
    Definition Classes
    Component
  63. def paintComponent(g: Graphics2D): Unit
    Attributes
    protected
    Definition Classes
    Component
  64. implicit def pair2Constraints(p: (Int, Int)): Constraints
    Definition Classes
    GridBagPanel
  65. lazy val peer: JPanel with SuperMixin
    Definition Classes
    GridBagPanel → Panel → Wrapper → Component → UIElement
  66. def place(component: Component, xy: (Int, Int), size: (Int, Int), anchor: Anchor, fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  67. def placeC(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  68. def placeE(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  69. def placeN(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  70. def placeNE(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  71. def placeNW(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  72. def placeS(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  73. def placeSE(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  74. def placeSW(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  75. def placeW(component: Component, xy: (Int, Int), size: (Int, Int), fill: Fill, border: (Int, Int, Int, Int)): Unit
    Definition Classes
    EasyLayout
  76. def preferredSize: Dimension
    Definition Classes
    UIElement
  77. def preferredSize_=(x: Dimension): Unit
    Definition Classes
    UIElement
  78. def publish(e: Event): Unit
    Definition Classes
    Publisher
  79. val reactions: Reactions
    Definition Classes
    Reactor
  80. def repaint(rect: Rectangle): Unit
    Definition Classes
    UIElement
  81. def repaint(): Unit
    Definition Classes
    UIElement
  82. def requestFocus(): Unit
    Definition Classes
    Component
  83. def requestFocusInWindow(): Boolean
    Definition Classes
    Component
  84. def revalidate(): Unit
    Definition Classes
    Component
  85. def self: Any
    Definition Classes
    UIElement → Proxy
  86. def showing: Boolean
    Definition Classes
    UIElement
  87. def size: Dimension
    Definition Classes
    UIElement
  88. def subscribe(listener: Reaction): Unit
    Definition Classes
    LazyPublisher → Publisher
  89. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  90. def toString: String
    Definition Classes
    Component → Proxy → AnyRef → Any
  91. def toolkit: Toolkit
    Definition Classes
    UIElement
  92. def tooltip: String
    Definition Classes
    Component
  93. def tooltip_=(t: String): Unit
    Definition Classes
    Component
  94. def unsubscribe(listener: Reaction): Unit
    Definition Classes
    LazyPublisher → Publisher
  95. def validate(): Unit
    Definition Classes
    UIElement
  96. def visible: Boolean
    Definition Classes
    UIElement
  97. def visible_=(b: Boolean): Unit
    Definition Classes
    UIElement
  98. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  99. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  100. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  101. def xLayoutAlignment: Double
    Definition Classes
    Component
  102. def xLayoutAlignment_=(x: Double): Unit
    Definition Classes
    Component
  103. def yLayoutAlignment: Double
    Definition Classes
    Component
  104. def yLayoutAlignment_=(y: Double): Unit
    Definition Classes
    Component
  105. object keys extends Publisher
    Definition Classes
    Component
  106. object mouse
    Definition Classes
    Component

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from EasyLayout

Inherited from GridBagPanel

Inherited from LayoutContainer

Inherited from Panel

Inherited from Wrapper

Inherited from Container

Inherited from Component

Inherited from UIElement

Inherited from LazyPublisher

Inherited from Publisher

Inherited from Reactor

Inherited from Proxy

Inherited from AnyRef

Inherited from Any

Ungrouped