merged tag ooo/DEV300_m102
[LibreOffice.git] / toolkit / test / accessibility / TableEventHandler.java
blob7655d3a1359948d4dab615ccbf712a18ba143937
1 import com.sun.star.accessibility.XAccessible;
2 import com.sun.star.accessibility.AccessibleEventObject;
3 import com.sun.star.accessibility.AccessibleEventId;
4 import com.sun.star.accessibility.AccessibleTableModelChange;
5 import com.sun.star.uno.UnoRuntime;
7 import java.io.PrintStream;
9 class TableEventHandler
10 extends EventHandler
12 public TableEventHandler (AccessibleEventObject aEvent, AccessibilityTreeModel aTreeModel)
14 super (aEvent, aTreeModel);
17 public void PrintOldAndNew (PrintStream out)
19 switch (mnEventId)
21 case AccessibleEventId.TABLE_MODEL_CHANGED:
22 AccessibleTableModelChange aModelChange =
23 (AccessibleTableModelChange)maEvent.NewValue;
24 out.println( "Range: StartRow " + aModelChange.FirstRow +
25 " StartColumn " + aModelChange.FirstColumn +
26 " EndRow " + aModelChange.LastRow +
27 " EndColumn " + aModelChange.LastColumn +
28 " Id " + aModelChange.Type);
29 break;
30 default:
31 super.PrintOldAndNew (out);
35 public void Process ()
37 maTreeModel.updateNode (mxEventSource, AccessibleTableHandler.class);
41 private XAccessible mxOldChild;
42 private XAccessible mxNewChild;