1 /* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Eclipse Public License, Version 1.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.eclipse.org/org/documents/epl-v10.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.ide.eclipse.adt.internal.editors.uimodel; 18 19 20 /** 21 * Listen to update notifications in UI nodes. 22 */ 23 public interface IUiUpdateListener { 24 25 /** Update state of the UI node */ 26 public enum UiUpdateState { 27 /** The node's attributes have been updated. They may or may not actually have changed. */ 28 ATTR_UPDATED, 29 /** The node sub-structure (i.e. child nodes) has changed */ 30 CHILDREN_CHANGED, 31 /** The XML counterpart for the UI node has just been created. */ 32 CREATED, 33 /** The XML counterpart for the UI node has just been deleted. 34 * Note that mandatory UI nodes are never actually deleted. */ 35 DELETED 36 } 37 38 /** 39 * Indicates that an UiElementNode has been updated. 40 * <p/> 41 * This happens when an {@link UiElementNode} is refreshed to match the 42 * XML model. The actual UI element node may or may not have changed. 43 * 44 * @param ui_node The {@link UiElementNode} being updated. 45 */ uiElementNodeUpdated(UiElementNode ui_node, UiUpdateState state)46 public void uiElementNodeUpdated(UiElementNode ui_node, UiUpdateState state); 47 } 48