📄 listitem.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3)
// Source File Name: ListItem.java
package com.sonyericsson.fb.ui.fbComponents;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Displayable;
import se.southend.drops.scene.Group;
import se.southend.drops.scene.Node;
import se.southend.drops.screen.KeyHandler;
import se.southend.drops.screen.ScreenEngine;
public abstract class ListItem extends Group
{
public ListItem()
{
mCommand = null;
mCommandAdded = false;
mFocused = false;
}
public void setDimensions(int width, int height)
{
itemHeight = height;
itemWidth = width;
}
public int getHeight()
{
return itemHeight;
}
public int getWidth()
{
return itemWidth;
}
public void setBackground(Group bg)
{
mBackground = bg;
}
public Group getBackground()
{
return mBackground;
}
public void setListPosition(int y)
{
setLocalPosition(getLocalX(), y);
if(getBackground() != null)
getBackground().setLocalPosition(getLocalX(), y);
}
public abstract boolean isFocusable();
public abstract boolean input(KeyHandler keyhandler);
public void setFocused(boolean focused)
{
mFocused = focused;
if(mCommandAdded && !focused)
{
ScreenEngine.getInstance().getCanvas().removeCommand(mCommand);
mCommandAdded = false;
} else
if(!mCommandAdded && focused && mCommand != null)
{
ScreenEngine.getInstance().getCanvas().addCommand(mCommand);
mCommandAdded = true;
}
}
public void setCommand(Command command)
{
if(mCommandAdded)
{
ScreenEngine.getInstance().getCanvas().removeCommand(mCommand);
mCommandAdded = false;
}
mCommand = command;
if(mFocused)
{
ScreenEngine.getInstance().getCanvas().addCommand(mCommand);
mCommandAdded = true;
}
}
private int itemHeight;
private int itemWidth;
private Group mBackground;
private Command mCommand;
private boolean mCommandAdded;
private boolean mFocused;
public static final int X_MARGIN = 40;
public static final int Y_MARGIN = 12;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -