1 package org.tanukisoftware.wrapper.event; 2 3 27 28 64 public class WrapperControlEvent 65 extends WrapperEvent 66 { 67 68 private int m_controlEvent; 69 70 71 private String m_controlEventName; 72 73 74 private boolean m_consumed; 75 76 79 85 public WrapperControlEvent( int controlEvent, String controlEventName ) 86 { 87 m_controlEvent = controlEvent; 88 m_controlEventName = controlEventName; 89 } 90 91 94 105 public long getFlags() 106 { 107 return super.getFlags() | WrapperEventListener.EVENT_FLAG_CONTROL; 108 } 109 110 113 123 public int getControlEvent() 124 { 125 return m_controlEvent; 126 } 127 128 133 public String getControlEventName() 134 { 135 return m_controlEventName; 136 } 137 138 146 public void consume() 147 { 148 m_consumed = true; 149 } 150 151 156 public boolean isConsumed() 157 { 158 return m_consumed; 159 } 160 161 166 public String toString() 167 { 168 return "WrapperControlEvent[controlEvent=" + getControlEvent() 169 + ", controlEventName=" + getControlEventName() + ", consumed=" + isConsumed() + "]"; 170 } 171 } 172 | Popular Tags |