Package org.zkoss.zul.event

Examples of org.zkoss.zul.event.TreeDataListener


   * Initial Tree data listener
   * <p>Author: jeffliu
   */
  private void initDataListener() {
    if (_dataListener == null)
      _dataListener = new TreeDataListener() {
        public void onChange(TreeDataEvent event) {
          onTreeDataChange(event);
        }
      };

View Full Code Here


    @Test
    public void addingTriggersEvent() {
        MutableTreeModel<Prueba> model = MutableTreeModel.create(Prueba.class);
        final ArrayList<TreeDataEvent> eventsFired = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                eventsFired.add(event);
            }
View Full Code Here

    @Test
    public void canAddSeveral() {
        MutableTreeModel<Prueba> model = MutableTreeModel.create(Prueba.class);
        final ArrayList<TreeDataEvent> eventsFired = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                eventsFired.add(event);
            }
View Full Code Here

    public void canAddSeveralAtPositionSendEventsWithCorrectValue() {
        MutableTreeModel<Prueba> model = MutableTreeModel.create(Prueba.class);
        Prueba p1 = new Prueba();
        model.add(model.getRoot(), p1);
        final ArrayList<TreeDataEvent> eventsFired = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                eventsFired.add(event);
            }
View Full Code Here

    @Test
    public void addingAnEmptyListOfElementsDontDoNothing() {
        MutableTreeModel<Prueba> model = MutableTreeModel.create(Prueba.class);
        final List<TreeDataEvent> events = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                events.add(event);
            }
View Full Code Here

        MutableTreeModel<Prueba> model = MutableTreeModel.create(Prueba.class);
        final Prueba newlyAdded = new Prueba();
        final Prueba child1 = new Prueba();
        final Prueba child2 = new Prueba();
        final List<TreeDataEvent> eventsFired = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                eventsFired.add(event);
            }
View Full Code Here

    @Test
    public void removingANodeTriggersEvent() {
        final MutableTreeModel<Prueba> model = MutableTreeModel
                .create(Prueba.class);
        final List<TreeDataEvent> removeEventsFired = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                if (event.getType() == TreeDataEvent.INTERVAL_REMOVED) {
                    removeEventsFired.add(event);
View Full Code Here

        Prueba prueba2 = new Prueba();
        model.addToRoot(prueba2);
        Prueba prueba3 = new Prueba();
        model.addToRoot(prueba3);
        final ArrayList<TreeDataEvent> eventsFired = new ArrayList<TreeDataEvent>();
        model.addTreeDataListener(new TreeDataListener() {

            @Override
            public void onChange(TreeDataEvent event) {
                eventsFired.add(event);
            }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.event.TreeDataListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.