1194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy/*
2194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * Copyright (C) 2011 The Android Open Source Project
3194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy *
4194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * Licensed under the Apache License, Version 2.0 (the "License");
5194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * you may not use this file except in compliance with the License.
6194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * You may obtain a copy of the License at
7194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy *
8194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy *      http://www.apache.org/licenses/LICENSE-2.0
9194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy *
10194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * Unless required by applicable law or agreed to in writing, software
11194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * distributed under the License is distributed on an "AS IS" BASIS,
12194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * See the License for the specific language governing permissions and
14194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * limitations under the License.
15194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy */
16194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy
17194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedypackage com.android.ex.chips.recipientchip;
18194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy
19194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedyimport android.graphics.Canvas;
20194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedyimport android.graphics.Rect;
21194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy
22194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy/**
23194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * RecipientChip defines a drawable object that contains information relevant to a
24194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy * particular recipient.
25194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy */
26194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedypublic interface DrawableRecipientChip extends BaseRecipientChip {
27194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy    /**
28194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy     * Get the bounds of the chip; may be 0,0 if it is not visibly rendered.
29194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy     */
30194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy    Rect getBounds();
31194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy
32194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy    /**
33e2348bfcd0a710201ba98cd5642cc1e3b5fa6465Joseph Moghadam     * Gets the bounds of the warning icon on the chip; may be 0,0 if not visibly rendered or if
34e2348bfcd0a710201ba98cd5642cc1e3b5fa6465Joseph Moghadam     * there is no warning icon.
35e2348bfcd0a710201ba98cd5642cc1e3b5fa6465Joseph Moghadam     */
36e2348bfcd0a710201ba98cd5642cc1e3b5fa6465Joseph Moghadam    Rect getWarningIconBounds();
37e2348bfcd0a710201ba98cd5642cc1e3b5fa6465Joseph Moghadam
38e2348bfcd0a710201ba98cd5642cc1e3b5fa6465Joseph Moghadam    /**
39194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy     * Draw the chip.
40194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy     */
41194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy    void draw(Canvas canvas);
42194d427ebcfc2133bda410e0e4c399250d9a6066Scott Kennedy}
43