ElementControllerImpl

blockudoku.controllers.mediatorImpl.ElementControllerImpl
class ElementControllerImpl(random: Random, focusManager: FocusManager) extends ElementController

Attributes

Graph
Supertypes
trait Observable
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

case class ElementControllerSnapshot(selectedElement: Option[Element], elements: List[Element])

Attributes

Inherited from:
ElementController
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def regenerate(slot: Int): Element

Generates a new Element for the given slot.

Generates a new Element for the given slot.

Value parameters

slot

The slot to generate the Element for. Must be in the range of 0 to elementCount.

Attributes

Returns

The generated Element.

def selectElement(element: Element): Unit

Selects the given Element.

Selects the given Element.

Value parameters

element

Element to select.

Attributes

Inherited methods

def addObserver(observer: Observer): Unit

Adds an observer to the list of observers.

Adds an observer to the list of observers.

Value parameters

observer

The observer to add.

Attributes

Inherited from:
Observable
def createSnapshot(): Unit

Creates a snapshot of the current state.

Creates a snapshot of the current state.

Attributes

Inherited from:
ElementController
override def getElements: List[Element]

Gets all selectable Element.

Gets all selectable Element.

Attributes

Returns

a list of Elements.

Definition Classes
Inherited from:
ElementController
override def getSelectedElement: Option[Element]

Gets the currently selected Element.

Gets the currently selected Element.

Attributes

Returns

an Element if any is selected, None otherwise.

Definition Classes
Inherited from:
ElementController
def loadElements(newElements: List[Element]): Unit

Attributes

Inherited from:
ElementController
def notifyObservers(): Unit

Invokes the update method of all observers.

Invokes the update method of all observers.

Attributes

Inherited from:
Observable
def resetSelectedElement(): Unit

Deselects the currently selected Element.

Deselects the currently selected Element.

Attributes

Inherited from:
ElementController
def revertSnapshot(): Unit

Reverts the state to the most recent snapshot.

Reverts the state to the most recent snapshot.

Attributes

Inherited from:
ElementController

Concrete fields

val elementCount: Int

How many Elements are selectable at once.

How many Elements are selectable at once.

Attributes

var elements: List[Element]

The currently selectable Elements.

The currently selectable Elements.

Attributes

val maxElementLength: Int

The maximum length (in tiles) of an element.

The maximum length (in tiles) of an element.

Attributes

Inherited fields

var selectedElement: Option[Element]

The currently selected Element.

The currently selected Element.

Attributes

Inherited from:
ElementController

Recorded snapshots with the most recent snapshot at the top.

Recorded snapshots with the most recent snapshot at the top.

Attributes

Inherited from:
Snapshotable