亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? canvaselement.java

?? J2ME上的一個(gè)播放器,可以更換皮膚.開源軟件.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* 

 Represents single element in Canvas-deligated screen table
 
 */

package inline.ui.ce;

import inline.ui.*;
import inline.sys.*;
import java.util.*;
import javax.microedition.lcdui.*;

    public abstract class CanvasElement 
    {
        public static final int CENTER = -20;
        public static final int LEFT_SOFT = -21;
        public static final int RIGHT_SOFT = -22;
        public static final int MENU_SOFT = -23;
        public static final int LEFT = -2;
        public static final int RIGHT = -5;
        public static final int UP = -1;
        public static final int DOWN = -6;
        private static final int REPEAT_DELAY = 200;
        private static final int REPEAT_RATE = 50;

        private Timer scrollertimer;
        private Timer keytimer;

        private int px = 0;
        private int py = 0;
	private boolean hasborder;
	private boolean hasfocus;
        private int brdd = 0;
        private int fcsd = 0;
        private int width = 0;
        private int height = 0;
        private int rwidth = 0;
        private int rheight = 0;
        protected HostCanvas parent;
        protected Font selectedFont;
        protected int fnthei = 0;
	private int layanchor;
	private boolean layouted;
	private boolean visible;
	private int style;
	private boolean styleable;

	private int minwidth;
	private int minheight;
        
        private boolean wantKeyRepeat;
        private boolean wantRepaint;
	private int accelKey;
	private int last_rep_key;
	private int keyrepeat;

        private int BACKGROUND_COLOR;
        private int FOREGROUND_COLOR;
        private int MIDDLERAMP_COLOR;
	private int backcolor_components[];
	private int middcolor_components[];
	private int forecolor_components[];
	private int ramp_cache[];
        private boolean shown;
	
	private boolean autoscroll;
	private int autoscroller;
	private static final int SCROLL_INTERVAL = 2000;
	private static final int TIMER_AUTO_SCROLL = 0xA3994653; //what?
	private static final int TIMER_KEYREPEAT = 0x5001F791; //the heck?

	// FIGURES
	
	public final static int FIGURE_EMPTY = 0;
	public final static int FIGURE_SQUARE = 1;
	public final static int FIGURE_CIRCLE = 2;
	public final static int FIGURE_TRI_E = 3;
	public final static int FIGURE_PAUSE = 4;
	public final static int FIGURE_MENU = 5;
	public final static int FIGURE_MARKS = 6;
	public final static int FIGURE_DIGIT0 = 7;
	public final static int FIGURE_DIGIT1 = 8;
	public final static int FIGURE_DIGIT2 = 9;
	public final static int FIGURE_DIGIT3 = 10;
	public final static int FIGURE_DIGIT4 = 11;
	public final static int FIGURE_DIGIT5 = 12;
	public final static int FIGURE_DIGIT6 = 13;
	public final static int FIGURE_DIGIT7 = 14;  
	public final static int FIGURE_DIGIT8 = 15;
	public final static int FIGURE_DIGIT9 = 16;
	public final static int FIGURE_COLON_HALF = 17;
	public final static int FIGURE_RARROW = 18;
	public final static int FIGURE_NEBULA1 = 19;
	public final static int FIGURE_NEBULA2 = 20;
	public final static int FIGURE_NEBULA3 = 21;
	public final static int FIGURE_NEBULA4 = 22;
	public final static int FIGURE_SPLITRECT = 23;
	public final static int FIGURE_LOCK = 24;

	private final static byte COMMAND_END = -1;
	private final static byte COMMAND_FILL_RECT = 1;
	private final static byte COMMAND_FILL_TRI = 2;
	private final static byte COMMAND_FILL_ARC = 3;
	private final static byte COMMAND_COLOR = 4;
	private final static byte COMMAND_FILL_RECT_BOUND = 5;
	private final static byte COMMAND_COLOR_RAMP = 6;
	private final static byte COLOR_BG = -2;
	private final static byte COLOR_FG = -1;

	private static byte[] figures;
	protected static int[] figidxs;
	
        // static init for metafigures
        static
        {
	    figures = (byte[])Base.getOption("_metafigs");	    
	    figidxs = null;
	    if (figures!=null)
	    {
		Vector idxs = new Vector();
		idxs.addElement(new Integer(0));
		for(int i=0;i<figures.length;i++)
		{
		    if (figures[i]==COMMAND_END)
		    {
			idxs.addElement(new Integer(i+1));
		    }
		}
		
		figidxs = new int[idxs.size()];
		for(int i=0;i<idxs.size();i++)
		{
		    figidxs[i] = ((Integer)idxs.elementAt(i)).intValue();
		}
	    }
	}
	
	CanvasElement(HostCanvas prnt, int x, int y, int w, int h)
        {
            parent = prnt;
            px = x;
            py = y;
            brdd = 0;
            fcsd = 0;
            rwidth = w;
            rheight = h;
	    shown = false;
	    layouted = false;
	    accelKey = 0;
	    visible = true;

	    calcSpaces();

            selectedFont = Font.getDefaultFont();
            fnthei = selectedFont.getHeight();
	    
	    backcolor_components = new int[3];
	    middcolor_components = new int[3];
	    forecolor_components = new int[3];
	    ramp_cache = new int[11];
        }
        
	protected void calcSpaces() 
	{
            width = rwidth;
            height = rheight;

	    if (drawFocus())
            {
                // for focus 
                fcsd=1;
            }

            if (drawBorder())
            {
                // for border
                brdd=1;
            }

            width -= (fcsd<<2)+(brdd<<2);
            height -= (fcsd<<2)+(brdd<<2);
	}
	
	public void fixColors()
	{
	    BACKGROUND_COLOR = parent.getBackgroundColor();
	    FOREGROUND_COLOR = parent.getForegroundColor();
	    MIDDLERAMP_COLOR = parent.getMiddleRampColor();
	    
	    decomponentColors();
	}
	
	private void decomponentColors()
	{
	    backcolor_components = divideColor(BACKGROUND_COLOR);
	    forecolor_components = divideColor(FOREGROUND_COLOR);

	    if (MIDDLERAMP_COLOR == -3)
	    {
		// undefined, make it 50% ramp
		middcolor_components = divideColor(FOREGROUND_COLOR);
		MIDDLERAMP_COLOR = getRampColor(25);
	    }
	    
	    middcolor_components = divideColor(MIDDLERAMP_COLOR);
	    clearRampCache();
	}
	
	private void clearRampCache()
	{
	    for(int i=0;i<ramp_cache.length;i++)
	    {
		ramp_cache[i] = -1;
	    }
	}

	public int[] divideColor(int color)
	{
	    int abc[] = {0,0,0};
	    
	    abc[0] = (color&0xff0000)>>16;
	    abc[1] = (color&0x00ff00)>>8;
	    abc[2] = (color&0x0000ff);
	    
	    return abc;
	}

	public int joinColor(int ica[])
	{
	    return (ica[0]<<16)|(ica[1]<<8)|ica[2];
	}
	
	/*
	 * ramp = 0...100 (0 - pure background, 100 - pure foreground)
	 *
	 *  
	*/
	public int getRampColor(int ramp)
	{
	    int cidx = -1;
	    if ((ramp%10)==0)
	    {
		// cache lookup
		cidx = ramp/10;
		if (ramp_cache[cidx]!=-1)
		{
		    return ramp_cache[cidx];
		}
	    }
	    
	    int ica[] = {0,0,0};

	    for(int c=0;c<3;c++)
	    {
		if (ramp<50)
		{
		    ica[c] = backcolor_components[c]+
			 200*ramp*(middcolor_components[c]-backcolor_components[c])/10000;
		}
		else
		{
		    ica[c] = middcolor_components[c]+
			 200*(ramp-50)*(forecolor_components[c]-middcolor_components[c])/10000;
		}
	    }
	
	    int color = ((ica[0]<<16)|(ica[1]<<8)|ica[2]);
	    if (cidx!=-1)
	    {
		ramp_cache[cidx] = color;
	    }
	    
	    return color;
	}
	
	public int getRampColor(int ramp, boolean sel)
	{
	    if (sel) ramp = 100-ramp;
	    return getRampColor(ramp);
	}

	public int getBackgroundColor()  
	{
	    int color = -1;
	    if (style==100 || !styleable || !hasborder)
	    {
		color = BACKGROUND_COLOR;
	    }
	    else
	    {
		color = getRampColor(40);
	    }

	    return color;
	}

	public int getForegroundColor()
	{
	    return FOREGROUND_COLOR;
	    
/*	    int color = -1;
	    if (style==100 || !styleable || !hasborder)
	    {
		color = FOREGROUND_COLOR;
	    }
	    else
	    {
		color = BACKGROUND_COLOR;
	    }

	    return color; */
	}

	public int getMiddleRampColor()  
	{
	    return MIDDLERAMP_COLOR;
	}

	public int getX()
	{
	    return px;
	}
	
	public int getY()
	{
	    return py;
	}

	public int getRWidth()
        {
            return rwidth;
        }
        
        public int getRHeight()
        {
            return rheight;
        }

	public int getWidth()
        {
            return width;
        }
        
        public int getHeight()
        {
            return height;
        }

        public int getFontHeight()
        {
            return fnthei;
        }

	protected boolean drawFocus()
        {
            return hasfocus;
        }

        protected boolean drawBorder()
        {
            return hasborder;
        }

	public void hasFocus(boolean hf)
	{
	    hasfocus = hf;
	    calcSpaces();
	}

	public void hasBorder(boolean hb)
	{
	    hasborder = hb;
	    calcSpaces();
	}

	public boolean canFocus()
	{
            return false;
	}

        public void paint(Graphics g) 
        {
	    if (!shown) fixColors();
	    shown=true;
            synchronized (g) 
            {
                g.translate(-g.getTranslateX(), -g.getTranslateY());
                g.setClip(0, 0, parent.getWidth(),parent.getHeight());

                //g.setColor(0xff0000);
                //g.fillRect(px, py, rwidth,rheight);
                 
                if (drawBorder())
                {
		    if (style==100 || !styleable)
		    {
			g.setColor(BACKGROUND_COLOR);
			g.drawRect(px+(fcsd<<1)+1, py+(fcsd<<1)+1, width+1, height+1);
			g.setColor(FOREGROUND_COLOR);
			g.drawRect(px+(fcsd<<1), py+(fcsd<<1), width+3, height+3);
		    }
		    else
		    {
			int xa = px+(fcsd<<1);
			int ya = py+(fcsd<<1);
			int xb = xa + width+3;
			int yb = ya + height+3;
			g.setColor(getRampColor(100));
			g.drawLine(xa, ya, xb, ya);
			g.drawLine(xa, ya, xa, yb);
			g.setColor(getRampColor(70));
			g.drawRect(xa+1, ya+1, width+1, height+1);
			g.setColor(getRampColor(30));
			g.drawLine(xa, yb, xb, yb);
			g.drawLine(xb, ya, xb, yb);
		    }
                }
                
                if (drawFocus() && isFocused())
                {
                    g.setColor(FOREGROUND_COLOR);
                    g.drawRect(px, py, rwidth-1, rheight-1);
                }

                g.translate(px+(fcsd<<1)+(brdd<<1),py+(fcsd<<1)+(brdd<<1));
                g.setClip(0,0, width, height);

		g.setColor(getBackgroundColor());
                g.fillRect(0, 0, getWidth(), getHeight());

                g.setColor(getForegroundColor());

		paintElement(g);
               
            }
        }
	
	public void setStyleable(boolean sst)
	{
	    styleable = sst;
	}
        

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品免费免费搜索| 国产资源在线一区| 日韩视频免费观看高清完整版 | 日韩午夜三级在线| 秋霞国产午夜精品免费视频| www日韩大片| heyzo一本久久综合| 天堂久久一区二区三区| 国产亚洲一区二区三区在线观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 韩国精品免费视频| 五月天久久比比资源色| 国产精品久久网站| 久久免费美女视频| 欧美一区二区三区视频在线观看| 91小宝寻花一区二区三区| 国产综合一区二区| 久久99深爱久久99精品| 亚洲成人综合在线| 亚洲免费观看高清完整版在线观看 | 日韩午夜电影av| 欧美亚洲综合色| 91免费在线看| 成人免费视频app| 国产一区二区三区蝌蚪| 日本vs亚洲vs韩国一区三区二区 | 色综合欧美在线| 粉嫩av亚洲一区二区图片| 久88久久88久久久| 久久国产尿小便嘘嘘尿| 日本中文一区二区三区| 午夜精品123| 亚洲成av人片在www色猫咪| 亚洲老妇xxxxxx| 亚洲精品乱码久久久久久日本蜜臀| 中文一区在线播放| 中文字幕欧美三区| 国产精品私人影院| 中文字幕巨乱亚洲| 国产精品日产欧美久久久久| 国产视频在线观看一区二区三区| 久久欧美一区二区| 久久精品欧美一区二区三区不卡| 欧美精品一区在线观看| 久久人人爽爽爽人久久久| www一区二区| 国产精品久久久一区麻豆最新章节| 国产欧美日韩一区二区三区在线观看| 精品粉嫩超白一线天av| 久久影院电视剧免费观看| 国产丝袜欧美中文另类| 成人免费在线播放视频| 亚洲三级在线免费| 亚洲一区在线观看网站| 亚瑟在线精品视频| 麻豆国产欧美日韩综合精品二区| 久久精品99久久久| 国产传媒日韩欧美成人| 成人午夜视频免费看| 色噜噜偷拍精品综合在线| 欧美在线视频全部完| 制服.丝袜.亚洲.另类.中文| 欧美刺激脚交jootjob| 国产亚洲欧美中文| 亚洲视频你懂的| 石原莉奈在线亚洲二区| 久久99久久99小草精品免视看| 韩国精品一区二区| caoporn国产精品| 欧美日韩在线免费视频| 欧美α欧美αv大片| 国产精品理伦片| 亚洲国产aⅴ天堂久久| 欧美aⅴ一区二区三区视频| 国产精品综合一区二区三区| av中文字幕在线不卡| 欧美视频在线观看一区二区| 欧美一级在线免费| 中文字幕+乱码+中文字幕一区| 亚洲少妇最新在线视频| 毛片基地黄久久久久久天堂| 成人av免费网站| 欧美日韩成人激情| 国产婷婷色一区二区三区在线| 最新日韩在线视频| 蜜臀久久99精品久久久久宅男 | 亚洲国产日韩精品| 韩国精品主播一区二区在线观看| 91蜜桃在线观看| 精品久久久久久最新网址| 亚洲视频中文字幕| 精品亚洲成a人| 欧美无砖砖区免费| 中文字幕免费一区| 日韩综合小视频| 99麻豆久久久国产精品免费 | 亚洲欧洲综合另类| 久久99国产精品久久99| 在线看国产日韩| 欧美激情一区二区三区| 日本va欧美va精品| 色综合久久久久综合体桃花网| 精品国产一区二区三区不卡| 亚洲成人自拍一区| 色综合久久六月婷婷中文字幕| 精品福利一区二区三区 | 国产一区二区伦理片| 欧美日韩精品一区二区三区蜜桃| 国产欧美日韩视频一区二区| 日韩国产高清影视| 91福利在线导航| 中日韩免费视频中文字幕| 看电视剧不卡顿的网站| 欧美日韩你懂得| 亚洲自拍偷拍网站| 99精品在线观看视频| 国产婷婷色一区二区三区| 久久99精品国产麻豆不卡| 欧美裸体bbwbbwbbw| 一区二区三区免费在线观看| eeuss鲁片一区二区三区在线观看| 精品999在线播放| 久久精品国产秦先生| 91精选在线观看| 午夜不卡在线视频| 欧美唯美清纯偷拍| 亚洲一区二区三区中文字幕| 色乱码一区二区三区88| 亚洲欧美另类小说视频| 99热这里都是精品| 国产精品国产三级国产专播品爱网 | 狠狠色丁香久久婷婷综合丁香| 在线成人小视频| 亚洲第一成年网| 欧美人xxxx| 天堂精品中文字幕在线| 欧美日韩成人一区| 日本色综合中文字幕| 在线综合+亚洲+欧美中文字幕| 亚洲高清视频的网址| 欧美日韩一区小说| 日韩主播视频在线| 欧美一二区视频| 久久av中文字幕片| 亚洲精品一区在线观看| 国产九色sp调教91| 日本一区二区三区久久久久久久久不| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美日韩成人在线一区| 日本美女一区二区| 精品理论电影在线| 国产激情精品久久久第一区二区 | 韩国成人在线视频| 久久婷婷色综合| 成人h动漫精品一区二区| 中文字幕一区二区三区在线观看 | 精品av综合导航| 成人黄色电影在线| 亚洲免费观看高清在线观看| 欧美色网站导航| 精品写真视频在线观看 | 麻豆freexxxx性91精品| 久久久久久久精| 99视频精品免费视频| 亚洲成在人线免费| 久久先锋资源网| 91香蕉视频mp4| 午夜精品国产更新| 久久精品欧美一区二区三区不卡| 一本色道亚洲精品aⅴ| 午夜影院久久久| 精品欧美一区二区在线观看| 国产成人aaaa| 亚洲成a人片在线不卡一二三区| 日韩精品一区国产麻豆| jvid福利写真一区二区三区| 天天色天天爱天天射综合| 亚洲国产成人午夜在线一区| 欧美日韩一区二区在线观看视频| 精品影院一区二区久久久| 亚洲视频一区二区在线| 精品国产乱码久久久久久蜜臀 | 国产精品资源站在线| 亚洲裸体xxx| 精品国精品国产| 日本精品裸体写真集在线观看| 韩国理伦片一区二区三区在线播放| 亚洲欧美偷拍三级| 精品国产一二三| 在线观看不卡一区| 国产麻豆9l精品三级站| 亚洲成人你懂的| 欧美激情一区二区三区| 欧美日韩美少妇| 国产不卡视频在线播放| 石原莉奈在线亚洲二区| 国产精品三级久久久久三级| 日韩一区二区三区免费观看| av在线播放一区二区三区| 午夜国产不卡在线观看视频|