?? softkeyimpl.java
字號:
package com.jmobilecore.ui;
import com.jmobilecore.ui.core.SoftKey;
import com.jmobilecore.ui.core.EventListener;
/**
* This class is implementation of abstract class <code>SoftKey</code>
* The class keeps information about returning value and reference to
* it's parent (owner).
*
* @author Greg Gridin
*/
public class SoftKeyImpl extends SoftKey {
/**
* Parent (owner) of this soft key
*/
public EventListener parent = null;
/**
* Result to report
*/
public int rslt;
/**
* Creates a new <code>SoftKeyImpl</code> instance.
*
* @param label The <code>SoftKey</code> label.
* @see #performAction
*/
public SoftKeyImpl(String label) {
this(label, null, EventListener.EVENT_OK);
}
/**
* Creates a new <code>SoftKeyImpl</code> instance.
*
* @param label The <code>SoftKey</code> label.
* @param parent The parent (owner) of this soft key.
* @see #performAction
*/
public SoftKeyImpl(String label, EventListener parent) {
this(label, parent, EventListener.EVENT_OK);
}
/**
* Creates a new <code>SoftKeyImpl</code> instance.
*
* @param label The <code>SoftKey</code> label.
* @param parent The parent (owner) of this soft key.
* @param rslt The result to report.
* @see #performAction
*/
public SoftKeyImpl(String label, EventListener parent, int rslt) {
super(label);
this.parent = parent;
this.rslt = rslt;
}
/**
* Performs an action - informs the parent that action is performed
*/
public void performAction() {
if (parent != null) {
parent.actionPerformed(rslt);
}
}
} // class SoftKeyImpl
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -