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.ex.chips.recipientchip; 18 19 import android.graphics.Canvas; 20 import android.graphics.Rect; 21 22 /** 23 * RecipientChip defines a drawable object that contains information relevant to a 24 * particular recipient. 25 */ 26 public interface DrawableRecipientChip extends BaseRecipientChip { 27 /** 28 * Get the bounds of the chip; may be 0,0 if it is not visibly rendered. 29 */ getBounds()30 Rect getBounds(); 31 32 /** 33 * Gets the bounds of the warning icon on the chip; may be 0,0 if not visibly rendered or if 34 * there is no warning icon. 35 */ getWarningIconBounds()36 Rect getWarningIconBounds(); 37 38 /** 39 * Draw the chip. 40 */ draw(Canvas canvas)41 void draw(Canvas canvas); 42 } 43