• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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.chimpchat.core;
18 
19 import com.android.chimpchat.ChimpManager;
20 
21 import java.util.List;
22 
23 /**
24  * An interface for view introspection.
25  */
26 public interface IChimpView {
27 
28     /**
29      * Set the manager for this view to communicate through.
30      */
setManager(ChimpManager manager)31     void setManager(ChimpManager manager);
32 
33     /**
34      * Obtain the class of the view as a string
35      */
getViewClass()36     String getViewClass();
37 
38     /**
39      * Obtain the text contained in the view
40      */
getText()41     String getText();
42 
43     /**
44      * Obtain the location of the view on the device screen
45      */
getLocation()46     ChimpRect getLocation();
47 
48     /**
49      * Obtain the checked status of this view.
50      */
getChecked()51     boolean getChecked();
52 
53     /**
54      * Obtain the enabled status of this view.
55      */
getEnabled()56     boolean getEnabled();
57 
58     /**
59      * Obtain the selected status of this view.
60      */
getSelected()61     boolean getSelected();
62 
63     /**
64      * Set the selected status of the this  view
65      */
setSelected(boolean selected)66     void setSelected(boolean selected);
67 
68     /**
69      * Obtain the focused status of this view.
70      */
getFocused()71     boolean getFocused();
72 
73     /**
74      * Set the focused status of this view.
75      */
setFocused(boolean focused)76     void setFocused(boolean focused);
77 
78     /**
79      * Retrieve the parent of this view if it has one.
80      */
getParent()81     IChimpView getParent();
82 
83     /**
84      * Get the children of this view as a list of IChimpViews.
85      */
getChildren()86     List<IChimpView> getChildren();
87 
88     /**
89      * Get the accessibility ids of this view.
90      */
getAccessibilityIds()91     int[] getAccessibilityIds();
92 }
93