FieldFocus.java
Go to the documentation of this file.
00001 /*
00002 copyright 2014 UNL Nimbus Lab 
00003 
00004   Licensed under the Apache License, Version 2.0 (the "License");
00005      you may not use this file except in compliance with the License.
00006     You may obtain a copy of the License at
00007   
00008         http://www.apache.org/licenses/LICENSE-2.0
00009   
00010     Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013    See the License for the specific language governing permissions and
00014   limitations under the License.
00015 */
00016 package edu.nimbus.glass.screens;
00017 
00018 import android.graphics.Canvas;
00019 import android.text.TextPaint;
00020 import android.util.Log;
00021 import edu.nimbus.glass.TopicManager;
00022 
00023 
00027 public class FieldFocus implements Screen{
00028 
00029         private String field;
00030         
00031         public FieldFocus(String field){
00032                 this.field = field;
00033         }
00034 
00035         @Override
00036         public void draw(TopicManager tm, TextPaint mTopicPaint, Canvas canvas, int width, int height) {
00037                 String load = tm.getField(field);
00038                 mTopicPaint.setTextSize((float)100);
00039                 if(load.contains(".")){
00040                         load = load.substring(0, load.indexOf(".")+5);
00041                 }
00042                 canvas.drawText(load, 30, (float) 100, mTopicPaint);
00043         }               
00044 }


ros_glass_tools
Author(s):
autogenerated on Thu Aug 27 2015 14:47:21