⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logger.java

📁 A Java Framework for connecting to and exchanging data from GPS units to J2ME Mobile Devices. Serial
💻 JAVA
字号:
/*
 * Logger.java
 *
 * Created on 4. November 2004, 10:59
 */

package com.libGPS4j2me.devices.StdGPS.log;

import javax.microedition.lcdui.TextBox;

/**
 * Logger to enable debugging on mobile device.
 *
 * @author  Dominik Schmidt
 */
public class Logger extends TextBox {
    /**
     * Creatse new logger.
     * 
     * @param title Title to be displayed
     * @param size Size of underlaying TextBox
     * @param type Type of underlaying TextBox
     */
    public Logger(String title, int size, int type) {
        super(title, "", size, type);
    }
    
    /**
     * Appends a string to the end of the TextBox.
     * 
     * @param text String to append
     */ 
    public void appendString(String text) {
        super.setString(this.getString() + "\n" + text);
    }
    
    /**
     * Appends a single character to the end of the TextBox.
     * 
     * @param i ASCII-Code of character to append
     */
    public void appendInt(int i) {
        super.setString(this.getString() + ((char) i));// + "[" + i + "]");
    }
    
    public void setString(String text) {
        super.setString(text);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -