001package armyc2.c5isr.renderer.utilities; 002 003import android.graphics.Paint; 004import android.graphics.PointF; 005import android.graphics.Rect; 006import android.graphics.RectF; 007import android.graphics.drawable.shapes.Shape; 008 009/** 010 * @deprecated 011 */ 012public class ModifierInfo { 013 014 private String _key = null; 015 private String _text = null; 016 private PointF _drawPoint = null; 017 private RectF _bounds = null; 018 private Paint _paint = null; 019 private Shape _shape = null; 020 021 /** 022 * 023 * @param text 024 * @param key like Modifiers, MilStdAttributes 025 * @param drawPoint 026 * @param paint 027 */ 028 public ModifierInfo(String text, String key, PointF drawPoint, Paint paint) 029 { 030 _key = key; 031 _text = text; 032 _drawPoint = drawPoint; 033 _paint = paint; 034 Rect rTemp = new Rect(); 035 paint.getTextBounds(text, 0, text.length(), rTemp); 036 _bounds = new RectF(rTemp.left,rTemp.top,rTemp.width(),rTemp.height()); 037 } 038 039 public ModifierInfo(Shape shape, String key, Paint paint, RectF bounds) 040 { 041 _shape = shape; 042 _key = key; 043 _paint = paint; 044 if(bounds != null) 045 _bounds = bounds; 046 else 047 _bounds = new RectF(0,0,shape.getWidth(),shape.getWidth()); 048 } 049 050 public Paint getPaint() 051 { 052 return _paint; 053 } 054 055 public Shape getShape() 056 { 057 return _shape; 058 } 059 060 public String getKey() 061 { 062 return _key; 063 } 064 065 public String getText() 066 { 067 return _text; 068 } 069 070 public RectF getBounds() 071 { 072 return _bounds; 073 } 074 075 public PointF getDrawPoint() 076 { 077 return _drawPoint; 078 } 079 080 public void setDrawPoint(PointF value) 081 { 082 _drawPoint = value; 083 } 084}