1 package com.actionbarsherlock.internal.view.menu;
3 import android.content.Intent;
4 import android.graphics.drawable.Drawable;
5 import android.view.ActionProvider;
6 import android.view.MenuItem;
7 import android.view.SubMenu;
8 import android.view.View;
9 import android.view.ContextMenu.ContextMenuInfo;
11 /** Used to carry an instance of our version of MenuItem through a native channel. */
12 public class MenuItemMule implements MenuItem {
13 private static final String ERROR = "Cannot interact with object designed for temporary "
14 + "instance passing. Make sure you using both SherlockFragmentActivity and "
15 + "SherlockFragment.";
18 private final com.actionbarsherlock.view.MenuItem mItem;
20 public MenuItemMule(com.actionbarsherlock.view.MenuItem item) {
24 public com.actionbarsherlock.view.MenuItem unwrap() {
30 public boolean collapseActionView() {
31 throw new IllegalStateException(ERROR);
35 public boolean expandActionView() {
36 throw new IllegalStateException(ERROR);
40 public ActionProvider getActionProvider() {
41 throw new IllegalStateException(ERROR);
45 public View getActionView() {
46 throw new IllegalStateException(ERROR);
50 public char getAlphabeticShortcut() {
51 throw new IllegalStateException(ERROR);
55 public int getGroupId() {
56 throw new IllegalStateException(ERROR);
60 public Drawable getIcon() {
61 throw new IllegalStateException(ERROR);
65 public Intent getIntent() {
66 throw new IllegalStateException(ERROR);
70 public int getItemId() {
71 throw new IllegalStateException(ERROR);
75 public ContextMenuInfo getMenuInfo() {
76 throw new IllegalStateException(ERROR);
80 public char getNumericShortcut() {
81 throw new IllegalStateException(ERROR);
85 public int getOrder() {
86 throw new IllegalStateException(ERROR);
90 public SubMenu getSubMenu() {
91 throw new IllegalStateException(ERROR);
95 public CharSequence getTitle() {
96 throw new IllegalStateException(ERROR);
100 public CharSequence getTitleCondensed() {
101 return mItem.getTitleCondensed();
102 //throw new IllegalStateException(ERROR);
106 public boolean hasSubMenu() {
107 throw new IllegalStateException(ERROR);
111 public boolean isActionViewExpanded() {
112 throw new IllegalStateException(ERROR);
116 public boolean isCheckable() {
117 throw new IllegalStateException(ERROR);
121 public boolean isChecked() {
122 throw new IllegalStateException(ERROR);
126 public boolean isEnabled() {
127 throw new IllegalStateException(ERROR);
131 public boolean isVisible() {
132 throw new IllegalStateException(ERROR);
136 public MenuItem setActionProvider(ActionProvider arg0) {
137 throw new IllegalStateException(ERROR);
141 public MenuItem setActionView(View arg0) {
142 throw new IllegalStateException(ERROR);
146 public MenuItem setActionView(int arg0) {
147 throw new IllegalStateException(ERROR);
151 public MenuItem setAlphabeticShortcut(char arg0) {
152 throw new IllegalStateException(ERROR);
156 public MenuItem setCheckable(boolean arg0) {
157 throw new IllegalStateException(ERROR);
161 public MenuItem setChecked(boolean arg0) {
162 throw new IllegalStateException(ERROR);
166 public MenuItem setEnabled(boolean arg0) {
167 throw new IllegalStateException(ERROR);
171 public MenuItem setIcon(Drawable arg0) {
172 throw new IllegalStateException(ERROR);
176 public MenuItem setIcon(int arg0) {
177 throw new IllegalStateException(ERROR);
181 public MenuItem setIntent(Intent arg0) {
182 throw new IllegalStateException(ERROR);
186 public MenuItem setNumericShortcut(char arg0) {
187 throw new IllegalStateException(ERROR);
191 public MenuItem setOnActionExpandListener(OnActionExpandListener arg0) {
192 throw new IllegalStateException(ERROR);
196 public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener arg0) {
197 throw new IllegalStateException(ERROR);
201 public MenuItem setShortcut(char arg0, char arg1) {
202 throw new IllegalStateException(ERROR);
206 public void setShowAsAction(int arg0) {
207 throw new IllegalStateException(ERROR);
211 public MenuItem setShowAsActionFlags(int arg0) {
212 throw new IllegalStateException(ERROR);
216 public MenuItem setTitle(CharSequence arg0) {
217 throw new IllegalStateException(ERROR);
221 public MenuItem setTitle(int arg0) {
222 throw new IllegalStateException(ERROR);
226 public MenuItem setTitleCondensed(CharSequence arg0) {
227 throw new IllegalStateException(ERROR);
231 public MenuItem setVisible(boolean arg0) {
232 throw new IllegalStateException(ERROR);