Introduction Vaadin 7.4 was recently released and it includes a new component called the GRID . It represents a 'Spreadsheet" type model from a UI perspective, however I think it lacks a lot of features you would expect from this type of component. Maybe this component will evolve over time and it will begin to have the functions that you expect from a spreadsheet. ( note: there is a commercial add on called the Spreadsheet from Vaadin ) Use Case The use case I am demonstrating below is a simple grid showing projected sales of Widgets over a five year period. Creation Creating a Grid is very simple and you have numerous options for sizing on the page. In the example below I setting it across the page. The Grid rows can be selected for editing, you can select single or multiple rows in a single action. myGrid = new Grid(); myGrid.setSizeFull(); myGrid.setSelectionMode(SelectionMode.SINGLE); Container Backing Similar to many other Vaadin componen...
A very interesting Web Cam Add On is available from the Vaadin Add On site . Here is a simple recipe for making it work. Create a split panel and add the Web Cam to the left hand side of the panel. splitPanel = new HorizontalSplitPanel(); splitPanel.setSizeFull(); VerticalLayout detailsLayout = new VerticalLayout(); detailsLayout.setSpacing(true); detailsLayout.setSizeFull(); // Create the webcam and assign a receiver. final Webcam webcam = new Webcam(); webcam.setWidth("600px"); detailsLayout.addComponent(webcam); detailsLayout.setComponentAlignment(webcam, Alignment.TOP_LEFT); Create a receiver which creates a temporary file with a jpeg extension. webcam.setReceiver(new Upload.Receiver() { @Override public OutputStream receiveUpload(String filename, String mimeType) { try { targetFile = File.createTemp...
Vaadin and a Google Map Widget One of my major irritations with Vaadin has been its lack of support for Google Maps as a standard widget. The reality is that many commercial applications require some form of mapping feature and the lack of support for a standard Google Map widget has been a major problem. However this has changed with Version 7.x of Vaadin, a new Google Map Addon has appeared and it fills a very important gap in the Vaadin feature set. How to Use It. If you use Maven in your development process then using the Addon in your Vaadin project is very easy. Just place this dependency in your POM file and make sure you have the correct repository established for the Vaadin Add On's. <dependency> <groupId>com.vaadin.tapio</groupId> <artifactId>googlemaps</artifactId> <version>0.6.2</version> </dependency> Here is some simple code to get you started. It creates a Googl...
Comments
Post a Comment