Scaladin是Vaadin提供的Scala语言的封装版本。Scaladin为所有的UI组件提供了全新构造器,例如:
valpanel=newPanel(caption="Caption",width=200px,height=300px)示例代码:
vallayout=newVerticalLayout(width=100pct,height=100pct){add(newLabel(content="Persons",style=Reindeer.LABEL_H1))add(newTable(width=100pct,height=100pct),ratio=1)add(newHorizontalLayout(spacing=true){add(newButton("Editselected",_=>editClicked()))add(newButton("Addnew",_=>addNewClicked()))})}getMainWindow.setContent(layout)更多关于Scaladin的特性请看:https://github.com/henrikerola/scaladin/wiki/Features
评论