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

📄 item.java

📁 J2me唆哈的代码
💻 JAVA
字号:
/*
 * Created on 2005-8-18 by pcy
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package javax.microedition.lcdui;

import a.a.a.midp.lcdui.*;
/**
 * @author pcy
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public abstract class Item {
    
    protected BQItem instance;

    public final static int LAYOUT_DEFAULT = 0;

    public final static int LAYOUT_LEFT = 1;

    public final static int LAYOUT_RIGHT = 2;

    public final static int LAYOUT_CENTER = 3;

    public final static int LAYOUT_TOP = 0x10;

    public final static int LAYOUT_BOTTOM = 0x20;

    public final static int LAYOUT_VCENTER = 0x30;

    public final static int LAYOUT_NEWLINE_BEFORE = 0x100;

    public final static int LAYOUT_NEWLINE_AFTER = 0x200;

    public final static int LAYOUT_SHRINK = 0x400;

    public final static int LAYOUT_EXPAND = 0x800;

    public final static int LAYOUT_VSHRINK = 0x1000;

    public final static int LAYOUT_VEXPAND = 0x2000;

    public static final int LAYOUT_2 = 0x4000;

    public final static int PLAIN = 0;

    public final static int HYPERLINK = 1;

    public final static int BUTTON = 2;
    
    

    Item(String label) {

    }
        
    public void setLabel(String label){
        instance.setLabel(label);
    }

    public String getLabel(){
        return instance.getLabel();
    }
    public int getLayout(){
        return instance.getMLayout();
    }
    public void setLayout(int layout){
        instance.setLayout(layout);
    }
    public void addCommand(Command cmd){
        instance.addCommand(cmd.getBQCommand());
    }
    
    public void removeCommand(Command cmd){
        instance.removeCommand(cmd.getBQCommand());
    }
    
    public void setDefaultCommand(Command cmd){
        instance.setDefaultCommand(cmd.getBQCommand());
    }
    
    public void setItemCommandListener(ItemCommandListener l){
        instance.setItemCommandListener(l);
    }
    
    public int getPreferredWidth(){
        return instance.getPreferredWidth();
    }
    
    public int getPreferredHeight(){
        return instance.getPreferredHeight();
    }
    
    public void setPreferredSize(int width, int height){
        instance.setPreferredSize(width,height);
    }
    
    public int getMinimumWidth(){
        return instance.getMinimumWidth();
    }
    
    public int getMinimumHeight(){
        return instance.getMinimumHeight();
    }
    
    public void notifyStateChanged(){
        instance.notifyStateChanged();
    }

    public BQItem getBQItem(){
        return instance;
    }
}

⌨️ 快捷键说明

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