Search in sources :

Example 6 with EventData

use of org.eclipse.nebula.widgets.nattable.dataset.EventData in project nebula.widgets.nattable by eclipse.

the class CrossValidationDialogErrorHandling method createEventData.

private List<EventData> createEventData() {
    List<EventData> result = new ArrayList<>();
    EventData ed = new EventData();
    ed.setTitle("My correct event");
    ed.setDescription("My event that validates correctly");
    ed.setWhere("Somewhere");
    ed.setFromDate(new GregorianCalendar(2013, 2, 1).getTime());
    ed.setToDate(new GregorianCalendar(2013, 2, 3).getTime());
    result.add(ed);
    ed = new EventData();
    ed.setTitle("My wrong event");
    ed.setDescription("My event where validation fails");
    ed.setWhere("Somewhere else");
    ed.setFromDate(new GregorianCalendar(2013, 2, 3).getTime());
    ed.setToDate(new GregorianCalendar(2013, 2, 1).getTime());
    result.add(ed);
    return result;
}
Also used : ArrayList(java.util.ArrayList) GregorianCalendar(java.util.GregorianCalendar) EventData(org.eclipse.nebula.widgets.nattable.dataset.EventData)

Aggregations

EventData (org.eclipse.nebula.widgets.nattable.dataset.EventData)6 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 GregorianCalendar (java.util.GregorianCalendar)2 HashMap (java.util.HashMap)2 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)2 ConfigRegistry (org.eclipse.nebula.widgets.nattable.config.ConfigRegistry)2 DefaultNatTableStyleConfiguration (org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration)2 IConfigRegistry (org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)2 IRowDataProvider (org.eclipse.nebula.widgets.nattable.data.IRowDataProvider)2 ValidationFailedException (org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException)2 DefaultGridLayer (org.eclipse.nebula.widgets.nattable.grid.layer.DefaultGridLayer)2 DataLayer (org.eclipse.nebula.widgets.nattable.layer.DataLayer)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Composite (org.eclipse.swt.widgets.Composite)2