1 package com.folioreader.model.quickaction;
3 import android.graphics.Bitmap;
4 import android.graphics.drawable.Drawable;
7 * Action item, displayed as menu with mIcon and text.
9 * @author Lorensius. W. L. T <lorenz@londatiga.net>
12 * - Kevin Peck <kevinwpeck@gmail.com>
14 public class ActionItem {
15 private Drawable mIcon;
16 private Bitmap mThumb;
17 private String mTitle;
18 private int mActionId = -1;
19 private boolean mSelected;
20 private boolean mSticky;
25 * @param mActionId Action id for case statements
27 * @param mIcon Icon to use
29 public ActionItem(int mActionId, String mTitle, Drawable mIcon) {
32 this.mActionId = mActionId;
45 * @param mActionId Action id of the item
46 * @param mTitle Text to show for the item
48 public ActionItem(int mActionId, String mTitle) {
49 this(mActionId, mTitle, null);
55 * @param mIcon {@link Drawable} action mIcon
57 public ActionItem(Drawable mIcon) {
58 this(-1, null, mIcon);
64 * @param mActionId Action ID of item
65 * @param mIcon {@link Drawable} action mIcon
67 public ActionItem(int mActionId, Drawable mIcon) {
68 this(mActionId, null, mIcon);
74 * @param mTitle action mTitle
76 public void setTitle(String mTitle) {
83 * @return action mTitle
85 public String getTitle() {
92 * @param mIcon {@link Drawable} action mIcon
94 public void setIcon(Drawable mIcon) {
101 * @return {@link Drawable} action mIcon
103 public Drawable getIcon() {
110 * @param mActionId Action id for this action
112 public void setActionId(int mActionId) {
113 this.mActionId = mActionId;
117 * @return Our action id
119 public int getActionId() {
124 * Set mSticky status of button
126 * @param mSticky true for mSticky, pop up sends event but does not disappear
128 public void setSticky(boolean mSticky) {
129 this.mSticky = mSticky;
133 * @return true if button is mSticky, menu stays visible after press
135 public boolean isSticky() {
140 * Set mSelected flag;
142 * @param mSelected Flag to indicate the item is mSelected
144 public void setSelected(boolean mSelected) {
145 this.mSelected = mSelected;
149 * Check if item is mSelected
151 * @return true or false
153 public boolean isSelected() {
154 return this.mSelected;
160 * @param mThumb Thumb image
162 public void setThumb(Bitmap mThumb) {
163 this.mThumb = mThumb;
169 * @return Thumb image
171 public Bitmap getThumb() {