public void setLayer ( VectorLayer layer ) { this . layer = layer ; if ( layer == null ) { clear ( ) ; } else { empty ( ) ; updateFields ( ) ; } }
Apply a new layer onto the grid . This means that the table header will immediately take on the attributes of this new layer .