Skip to content

Commit

Permalink
Fixed to compile with 7.4.0.rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Kerola committed Feb 11, 2015
1 parent 6d3f25a commit 629e994
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 26 deletions.
7 changes: 1 addition & 6 deletions addon/src/main/scala/vaadin/scala/Grid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ object Grid {

def renderer: Renderer[_] = p.getRenderer match {
case r: RendererMixin => wrapperFor[Renderer[_]](r).get
case tr: com.vaadin.ui.renderer.TextRenderer => {
case tr: com.vaadin.ui.renderers.TextRenderer => {
// Assuming that using the default TextRenderer,
// setting a wrapped TextRenderer as a side-effect
// Not really other place to do this.
Expand Down Expand Up @@ -384,13 +384,8 @@ class Grid(override val p: VaadinGrid with GridMixin)

def editorActive: Boolean = p.isEditorActive

def getEditorRowField(propertyId: Any): Field[_] = wrapperFor(p.getEditorField(propertyId)).get

def editItem(itemId: Any): Unit = p.editItem(itemId)

def setEditorField(propertyId: Any, field: Field[_]): Unit =
p.setEditorField(propertyId, field.p)

def saveEditor(): Unit = p.saveEditor()

def cancelEditor(): Unit = p.cancelEditor()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package vaadin.scala.internal

import com.vaadin.ui.renderer.ClickableRenderer.RendererClickEvent
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent
import vaadin.scala.Grid
import vaadin.scala.renderer.ClickableRenderer

Expand All @@ -9,7 +9,7 @@ import vaadin.scala.renderer.ClickableRenderer
* @author Henri Kerola / Vaadin
*/
class RendererClickListener(val action: ClickableRenderer.RendererClickEvent => Unit)
extends com.vaadin.ui.renderer.ClickableRenderer.RendererClickListener with Listener {
extends com.vaadin.ui.renderers.ClickableRenderer.RendererClickListener with Listener {

override def click(event: RendererClickEvent): Unit = {
val grid = wrapperFor[Grid](event.getSource).get
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package vaadin.scala.renderer

import com.vaadin.ui.renderer.{ ButtonRenderer => VaadinButtonRenderer }
import com.vaadin.ui.renderers.{ ButtonRenderer => VaadinButtonRenderer }
import vaadin.scala.renderer.mixins.ButtonRendererMixin

package mixins {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package vaadin.scala.renderer

import com.vaadin.ui.renderer.{ ClickableRenderer => VaadinClickableRenderer }
import com.vaadin.ui.renderers.{ ClickableRenderer => VaadinClickableRenderer }
import vaadin.scala.renderer.ClickableRenderer.RendererClickEvent
import vaadin.scala.{ ListenersSet, Grid }
import vaadin.scala.event.ComponentEvent
Expand All @@ -26,7 +26,7 @@ class ClickableRenderer[T](override val p: VaadinClickableRenderer[T] with Click

lazy val clickListeners: ListenersSet[RendererClickEvent => Unit] =
new ListenersTrait[RendererClickEvent, RendererClickListener] {
override def listeners = p.getListeners(classOf[com.vaadin.ui.renderer.ClickableRenderer.RendererClickEvent])
override def listeners = p.getListeners(classOf[com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent])
override def addListener(elem: RendererClickEvent => Unit) = p.addClickListener(new RendererClickListener(elem))
override def removeListener(elem: RendererClickListener) = p.removeClickListener(elem)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package vaadin.scala.renderer
import java.text.DateFormat
import java.util.{ Locale, Date }

import com.vaadin.ui.renderer.{ DateRenderer => VaadinDateRenderer }
import com.vaadin.ui.renderers.{ DateRenderer => VaadinDateRenderer }
import vaadin.scala.renderer.mixins.DateRendererMixin

package mixins {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package vaadin.scala.renderer

import com.vaadin.ui.renderer.{ HtmlRenderer => VaadinHtmlRenderer }
import com.vaadin.ui.renderers.{ HtmlRenderer => VaadinHtmlRenderer }
import vaadin.scala.renderer.mixins.HtmlRendererMixin

package mixins {
Expand Down
2 changes: 1 addition & 1 deletion addon/src/main/scala/vaadin/scala/renderer/Renderer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package mixins {
*/
trait Renderer[T] extends Wrapper {

def p: com.vaadin.ui.renderer.Renderer[T] with RendererMixin
def p: com.vaadin.ui.renderers.Renderer[T] with RendererMixin

def presentationType: Class[T] = p.getPresentationType
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package vaadin.scala.renderer

import com.vaadin.ui.renderer.{ TextRenderer => VaadinTextRenderer }
import com.vaadin.ui.renderers.{ TextRenderer => VaadinTextRenderer }
import vaadin.scala.renderer.mixins.TextRendererMixin

package mixins {
Expand Down
12 changes: 2 additions & 10 deletions addon/src/test/scala/vaadin/scala/tests/GridTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class GridTests extends ScaladinTestSuite {
assert(column.renderer.isInstanceOf[TextRenderer])

val textRenderer = new TextRenderer
assert(textRenderer.p.isInstanceOf[com.vaadin.ui.renderer.TextRenderer])
assert(textRenderer.p.isInstanceOf[com.vaadin.ui.renderers.TextRenderer])
column.renderer = textRenderer

assert(textRenderer == column.renderer)
Expand All @@ -168,7 +168,7 @@ class GridTests extends ScaladinTestSuite {
val column = grid.addColumn[String]("myColumn")

val htmlRenderer = new HtmlRenderer
assert(htmlRenderer.p.isInstanceOf[com.vaadin.ui.renderer.HtmlRenderer])
assert(htmlRenderer.p.isInstanceOf[com.vaadin.ui.renderers.HtmlRenderer])

column.renderer = htmlRenderer

Expand Down Expand Up @@ -624,14 +624,6 @@ class GridTests extends ScaladinTestSuite {
Mockito.verify(spy).isEditorActive
}

ignore("getEditorRowField") {
val myGrid = new Grid()

myGrid.addColumn("propertyId")

myGrid.getEditorRowField("propertyId")
}

test("editItem") {
val itemId = grid.addRow()
grid.editorEnabled = true
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbt._

object Dependencies {

private val vaadinVersion = "7.4-SNAPSHOT"
private val vaadinVersion = "7.4.0.rc1"
private val jettyVersion = "7.3.0.v20110203"
private val scalaTestVersion = "2.2.0"
private val mockitoVersion = "1.9.5"
Expand Down

0 comments on commit 629e994

Please sign in to comment.