Search in sources :

Example 1 with TableViewRowEditor

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);
}
Also used : TableViewRowEditor(org.apache.pivot.wtk.content.TableViewRowEditor) TextArea(org.apache.pivot.wtk.TextArea) BXMLSerializer(org.apache.pivot.beans.BXMLSerializer)

Aggregations

BXMLSerializer (org.apache.pivot.beans.BXMLSerializer)1 TextArea (org.apache.pivot.wtk.TextArea)1 TableViewRowEditor (org.apache.pivot.wtk.content.TableViewRowEditor)1