All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.swm.commons.mobile.client.widgets.tree.TreeChangedEvent Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2011 SWM Services GmbH.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package de.swm.commons.mobile.client.widgets.tree;

import com.google.gwt.event.shared.GwtEvent;

/**
 * Dieses event wird geworfen, sobald sich die Baumstruktur geaendert hat.
 * 
 * @author wiese.daniel, vilbig.alexander 
* copyright (C) 2012, SWM Services GmbH * */ public class TreeChangedEvent extends GwtEvent { /** * GWT Event type system. */ public static final Type TYPE = new Type(); private final ITree newRoot; private final EventType type; /** * Unterevent-Typ. * * @author wiese.daniel
* copyright (C) 2012, SWM Services GmbH * */ public enum EventType { /** Unter-Event typ. **/ INIT_COMPLETE, CHILD_SELECTED, BACK_EVENT } /** * Default constructor. * * @param newRoot * das neue root element des baumes (das ausgewaehlte element) * @param eventType * der typ des Events */ public TreeChangedEvent(ITree newRoot, EventType eventType) { this.newRoot = newRoot; this.type = eventType; } /** * Returns the newRoot. * * @return the newRoot */ public ITree getNewRoot() { return newRoot; } /** * Returns the type. * * @return the type */ public EventType getType() { return type; } @Override public com.google.gwt.event.shared.GwtEvent.Type getAssociatedType() { return TYPE; } @Override protected void dispatch(TreeChangedHandler handler) { handler.onTreeChanged(this); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy