1 15 package org.apache.tapestry.contrib.tree.model; 16 17 20 public class TreeStateEvent { 21 public static final int SELECTED_NODE_CHANGED = 1; 22 public static final int NODE_EXPANDED = 2; 23 public static final int NODE_COLLAPSED = 4; 24 25 private int m_nEventType; 26 private transient ITreeStateModel m_objTreeStateModel = null; 27 private transient Object m_objNodeUID = null; 28 29 32 public TreeStateEvent(int nEventType, Object objNodeUID, ITreeStateModel objTreeStateModel) { 33 super(); 34 m_nEventType = nEventType; 35 m_objNodeUID = objNodeUID; 36 m_objTreeStateModel = objTreeStateModel; 37 } 38 39 43 public int getEventType() { 44 return m_nEventType; 45 } 46 47 public boolean isEvent(int nEventType){ 48 return (getEventType() & nEventType) > 0; 49 } 50 51 public Object getNodeUID() { 52 return m_objNodeUID; 53 } 54 55 public ITreeStateModel getTreeStateModel() { 56 return m_objTreeStateModel; 57 } 58 } 59 | Popular Tags |