Skip to content

Commit

Permalink
#59: Changed Grid.Column from trait to class
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Kerola committed Jan 13, 2015
1 parent abd4e63 commit cad4820
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions addon/src/main/scala/vaadin/scala/Grid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ object Grid {
val End = Value(END.ordinal)
}

trait Column extends Wrapper { column =>

val p: com.vaadin.ui.Grid.Column
class Column(val p: com.vaadin.ui.Grid.Column) extends Wrapper {

def propertyId: Any = p.getPropertyId

Expand Down Expand Up @@ -236,9 +234,7 @@ class Grid(override val p: VaadinGrid with GridMixin)
def container: Container.Indexed = wrapperFor(p.getContainerDataSource).get
def container_=(container: Container.Indexed) { p.setContainerDataSource(container.p) }

private[this] def wrapColumn(vaadinColumn: com.vaadin.ui.Grid.Column) = new Column {
override val p = vaadinColumn
}
private[this] def wrapColumn(vaadinColumn: com.vaadin.ui.Grid.Column) = new Column(vaadinColumn)

def getColumn(propertyId: Any): Option[Column] = Option(p.getColumn(propertyId)).map(wrapColumn(_))

Expand Down

0 comments on commit cad4820

Please sign in to comment.