use of org.apache.pivot.wtk.content.TableViewRowEditor in project pivot by apache.
the class TableViewTest2 method startup.
@Override
public void startup(final Display display, final Map<String, String> properties) throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
System.out.println("Double Click on Table elements to open the Row Editor");
window = (Window) bxmlSerializer.readObject(TableViewTest2.class, "table_view_test2.bxml");
tableView = (TableView) bxmlSerializer.getNamespace().get("tableView");
menu = (Window) bxmlSerializer.readObject(TableViewTest2.class, "context_menus.bxml");
tableView.setMenuHandler(new ContextMenusSampleMenuHandlerAdapter());
System.out.println("Right Click on Table elements to display Contextual Menu: " + menu);
TableViewRowEditor tableViewRowEditor = new TableViewRowEditor();
tableViewRowEditor.setEditEffect(CardPaneSkin.SelectionChangeEffect.HORIZONTAL_SLIDE);
tableView.setRowEditor(tableViewRowEditor);
TextArea textArea = new TextArea();
textArea.setTextKey("value");
tableViewRowEditor.getCellEditors().put("value", textArea);
window.open(display);
}
Aggregations