TwoLineIconViewWrapper.java :  » Chat-Messenger » sofurry-android-app » com » sofurry » viewwrappers » Android Open Source

Android Open Source » Chat Messenger » sofurry android app 
sofurry android app » com » sofurry » viewwrappers » TwoLineIconViewWrapper.java
/*
 * @(#)ListItemTwoLineIconViewWrapper.java   2010-12-21
 *
 * Copyright (c) 2010 Blazing Skies
 */



package com.sofurry.viewwrappers;

//~--- non-JDK imports --------------------------------------------------------

import com.sofurry.R;

import android.view.View;

import android.widget.ImageView;
import android.widget.TextView;


//~--- classes ----------------------------------------------------------------

/**
 * Functions as a ViewWrapper for the ListItemTwoLineIcon layout, as required
 * by the Holder pattern for list adapters.
 *
 *
 * @author AngelOD
 */
public class TwoLineIconViewWrapper {
    private ImageView icon_;
    private TextView  bottomText_;
    private TextView  centerText_;
    private TextView  topText_;
    private View      base_;


    //~--- constructors -------------------------------------------------------

    /**
     * Constructs ...
     *
     *
     * @param base
     */
    public TwoLineIconViewWrapper(View base) {
        base_ = base;
    }

    //~--- get methods --------------------------------------------------------

    /**
     * Method description
     *
     *
     * @return
     */
    public TextView getBottomText() {
      if (bottomText_ == null) {
        bottomText_ = (TextView)base_.findViewById(R.id.bottomtext);
      }
      
        return bottomText_;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public TextView getCenterText() {
      if (centerText_ == null) {
        centerText_ = (TextView)base_.findViewById(R.id.centertext);
      }
      
        return centerText_;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public ImageView getIcon() {
      if (icon_ == null) {
        icon_ = (ImageView)base_.findViewById(R.id.icon);
      }
      
        return icon_;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public TextView getTopText() {
      if (topText_ == null) {
        topText_ = (TextView)base_.findViewById(R.id.toptext);
      }
      
        return topText_;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.