Android Open Source - Visu Bitmap Manager






From Project

Back to project page Visu.

License

The source code is released under:

Apache License

If you think the Android project Visu listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ufavaloro.android.visu.draw;
/*from  w  ww. ja v  a 2s. com*/
import com.ufavaloro.android.visu.R;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.AttributeSet;

public class BitmapManager{
  
  private int mIconsWidth;
  private int mIconsHeight;
  private int mIconsLeftPadding;
  private int mIconsUpperPadding;
  private Context mContext;
  
  public BitmapManager(Context context) {
    mContext = context;
  }

  public int getIconsWidth() {
    return mIconsWidth;
  }

  
  public void setIconsWidth(int mIconsWidth) {
    this.mIconsWidth = mIconsWidth;
  }

  public int getIconsHeight() {
    return mIconsHeight;
  }

  public void setIconsHeight(int mIconsHeight) {
    this.mIconsHeight = mIconsHeight;
  }

  public int getIconsLeftPadding() {
    return mIconsLeftPadding;
  }

  public void setIconsLeftPadding(int mIconsLeftPadding) {
    this.mIconsLeftPadding = mIconsLeftPadding;
  }

  public int getIconsUpperPadding() {
    return mIconsUpperPadding;
  }

  public void setIconsUpperPadding(int mIconsUpperPadding) {
    this.mIconsUpperPadding = mIconsUpperPadding;
  }

  public void setup() {
    // ?cono de nuevo estudio
    Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.new_study);
    setNewStudyIconX(getIconsLeftPadding());
    setNewStudyIconY(getIconsUpperPadding());
    setNewStudyIcon(Bitmap.createScaledBitmap(bitmap, getIconsWidth(), getIconsHeight(), false));

    // ?cono de configurar canales
    bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.configure_channels);
    setConfigureChannelsIconX(getIconsLeftPadding());
    setConfigureChannelsIconY(getIconsUpperPadding() + getNewStudyIconY());
    setConfigureChannelsIcon(Bitmap.createScaledBitmap(bitmap, getIconsWidth(), getIconsHeight(), false));
    
    // ?cono de parar estudio
    bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.stop_study);
    setStopStudyIcon(Bitmap.createScaledBitmap(bitmap, getIconsWidth(), getIconsHeight(), false));
    setStopStudyIconX(getIconsLeftPadding());
    setStopStudyIconY(getIconsUpperPadding() + getConfigureChannelsIconY());
  }
  
  

/*****************************************************************************************
* New Study Icon                                       *
*****************************************************************************************/
  private Bitmap mNewStudyIcon;
  private int mNewStudyIconX;
  private int mNewStudyIconY;

  public Bitmap getNewStudyIcon() {
    return mNewStudyIcon;
  }
  
  public void setNewStudyIcon(Bitmap mNewStudyIcon) {
    this.mNewStudyIcon = mNewStudyIcon;
  }
  
  public int getNewStudyIconX() {
    return mNewStudyIconX;
  }
  
  public void setNewStudyIconX(int mNewStudyIconX) {
    this.mNewStudyIconX = mNewStudyIconX;
  }
  
  public int getNewStudyIconY() {
    return mNewStudyIconY;
  }
  
  public void setNewStudyIconY(int mNewStudyIconY) {
    this.mNewStudyIconY = mNewStudyIconY;
  }

/*****************************************************************************************
* Configure Channels Icon                                   *
*****************************************************************************************/
  private Bitmap mConfigureChannelsIcon;
  private int mConfigureChannelsIconX;
  private int mConfigureChannelsIconY;

  public Bitmap getConfigureChannelsIcon() {
    return mConfigureChannelsIcon;
  }
  
  public void setConfigureChannelsIcon(Bitmap mConfigureChannelsIcon) {
    this.mConfigureChannelsIcon = mConfigureChannelsIcon;
  }
  
  public int getConfigureChannelsIconX() {
    return mConfigureChannelsIconX;
  }
  
  public void setConfigureChannelsIconX(int mConfigureChannelsIconX) {
    this.mConfigureChannelsIconX = mConfigureChannelsIconX;
  }
  
  public int getConfigureChannelsIconY() {
    return mConfigureChannelsIconY;
  }
  
  public void setConfigureChannelsIconY(int mConfigureChannelsIconY) {
    this.mConfigureChannelsIconY = mConfigureChannelsIconY;
  }

/*****************************************************************************************
* Stop Study Icon                                     *
*****************************************************************************************/
  private Bitmap mStopStudyIcon;
  private int mStopStudyIconX;
  private int mStopStudyIconY;

  public Bitmap getStopStudyIcon() {
    return mStopStudyIcon;
  }

  public void setStopStudyIcon(Bitmap mStopStudyIcon) {
    this.mStopStudyIcon = mStopStudyIcon;
  }

  public int getStopStudyIconX() {
    return mStopStudyIconX;
  }

  public void setStopStudyIconX(int mStopStudyIconX) {
    this.mStopStudyIconX = mStopStudyIconX;
  }

  public int getStopStudyIconY() {
    return mStopStudyIconY;
  }

  public void setStopStudyIconY(int mStopStudyIconY) {
    this.mStopStudyIconY = mStopStudyIconY;
  }

/*****************************************************************************************
* Background Logo                                     *
*****************************************************************************************/
  private Bitmap mBackgroundLogo;
  private int mBackgroundLogoWidth;
  private int mBackgroundLogoHeight;
  private int mBackgroundLogoX;
  private int mBackgroundLogoY;
  
  public Bitmap getBackgroundLogo() {
    return mBackgroundLogo;
  }

  public void setBackgroundLogo(Bitmap mBackgroundLogo) {
    this.mBackgroundLogo = mBackgroundLogo;
  }

  public int getBackgroundLogoWidth() {
    return mBackgroundLogoWidth;
  }

  public void setBackgroundLogoWidth(int mBackgroundLogoWidth) {
    this.mBackgroundLogoWidth = mBackgroundLogoWidth;
  }

  public int getBackgroundLogoHeight() {
    return mBackgroundLogoHeight;
  }

  public void setBackgroundLogoHeight(int mBackgroundLogoHeight) {
    this.mBackgroundLogoHeight = mBackgroundLogoHeight;
  }

  public int getBackgroundLogoX() {
    return mBackgroundLogoX;
  }

  public void setBackgroundLogoX(int mBackgroundLogoX) {
    this.mBackgroundLogoX = mBackgroundLogoX;
  }

  public int getBackgroundLogoY() {
    return mBackgroundLogoY;
  }

  public void setBackgroundLogoY(int mBackgroundLogoY) {
    this.mBackgroundLogoY = mBackgroundLogoY;
  }


}




Java Source Code List

com.samsung.sprc.fileselector.FileData.java
com.samsung.sprc.fileselector.FileListAdapter.java
com.samsung.sprc.fileselector.FileOperation.java
com.samsung.sprc.fileselector.FileSelector.java
com.samsung.sprc.fileselector.FileUtils.java
com.samsung.sprc.fileselector.OnHandleFileListener.java
com.samsung.sprc.fileselector.SaveLoadClickListener.java
com.samsung.sprc.fileselector.TextViewWithImage.java
com.ufavaloro.android.visu.UI.ChannelOptionsDialog.java
com.ufavaloro.android.visu.UI.LoadFileFromGoogleDriveDialog.java
com.ufavaloro.android.visu.UI.LoadFileFromLocalStorageDialog.java
com.ufavaloro.android.visu.UI.MainActivity.java
com.ufavaloro.android.visu.UI.MainMenuDialog.java
com.ufavaloro.android.visu.UI.NewStudyDialog.java
com.ufavaloro.android.visu.UI.OfflineChannelPropertiesDialog.java
com.ufavaloro.android.visu.UI.OnlineChannelPropertiesDialog.java
com.ufavaloro.android.visu.UI.StopStudyDialog.java
com.ufavaloro.android.visu.bluetooth.BluetoothProtocolMessage.java
com.ufavaloro.android.visu.bluetooth.BluetoothProtocol.java
com.ufavaloro.android.visu.bluetooth.BluetoothServiceMessage.java
com.ufavaloro.android.visu.bluetooth.BluetoothService.java
com.ufavaloro.android.visu.draw.BitmapManager.java
com.ufavaloro.android.visu.draw.DrawHelper.java
com.ufavaloro.android.visu.draw.RGB.java
com.ufavaloro.android.visu.draw.ReferenceMatrix.java
com.ufavaloro.android.visu.draw.TouchPointer.java
com.ufavaloro.android.visu.draw.channel.ChannelList.java
com.ufavaloro.android.visu.draw.channel.Channel.java
com.ufavaloro.android.visu.draw.channel.DrawBuffer.java
com.ufavaloro.android.visu.draw.channel.InfoBox.java
com.ufavaloro.android.visu.draw.channel.Label.java
com.ufavaloro.android.visu.draw.channel.ScreenElement.java
com.ufavaloro.android.visu.draw.channel.SignalBox.java
com.ufavaloro.android.visu.storage.DataConversion.java
com.ufavaloro.android.visu.storage.SamplesBuffer.java
com.ufavaloro.android.visu.storage.StorageHelperMessage.java
com.ufavaloro.android.visu.storage.StorageHelper.java
com.ufavaloro.android.visu.storage.StudyDataParser.java
com.ufavaloro.android.visu.storage.datatypes.AcquisitionData.java
com.ufavaloro.android.visu.storage.datatypes.AdcData.java
com.ufavaloro.android.visu.storage.datatypes.PatientData.java
com.ufavaloro.android.visu.storage.datatypes.StorageData.java
com.ufavaloro.android.visu.storage.datatypes.StudyData.java
com.ufavaloro.android.visu.storage.googledrive.GoogleDriveClientMessage.java
com.ufavaloro.android.visu.storage.googledrive.GoogleDriveClient.java
com.ufavaloro.android.visu.storage.googledrive.GoogleDriveManagerMessage.java
com.ufavaloro.android.visu.storage.googledrive.GoogleDriveManager.java
com.ufavaloro.android.visu.storage.local.LocalStorageManager.java
com.ufavaloro.android.visu.study.StudyMessage.java
com.ufavaloro.android.visu.study.StudyType.java
com.ufavaloro.android.visu.study.Study.java