Package ufx.ui

Source Code of ufx.ui.Frame

package ufx.ui;
import ufx.ui.Graphics;

public abstract class Frame {
    int peer;
    Graphics g;
    int width, height;
    int invalidate_left;
    int invalidate_top;
    int invalidate_right;
    int invalidate_bottom;
   
    native void createPeer0(int w, int h);
    void bindPeer(int w, int h) {
  invalidate_left = -1;
  invalidate_top = -1;
  invalidate_right = -1;
  invalidate_bottom = -1;
  if (g != null) return ;
  createPeer0(w, h);
  width = w;
  height = h;
  g = new Graphics();
  g.createPeer1(this);
    }

    //! ソフトキー1 (=0)。
    public static int SOFT_KEY_1 = 0;
    //! ソフトキー2 (=1)。
    public     static int SOFT_KEY_2 = 1;
 
  /** @brief フレームの高さを取得します。 */
    public     native int getHeight();
  /** @brief フレームの幅を取得します。 */
    public     native int getWidth();
  /** @brief 背景色を設定します。 */
    public     native void setBackground(int c);
  /** @brief ソフトキーのラベル文字列を設定します。 */
    public     native void setSoftLabel(int key, String label);

    /* Canvas */
  /** @brief キャンバスに表示するために使用するメソッドです。 */
    public abstract void paint(Graphics g);
  /** @brief 低レベルイベントが通知されたときに呼ばれるメソッドです。 */
    public     native void processEvent(int type, int param);
  /** @brief IMEイベントが通知されたときに呼ばれるメソッドです。; */
    public     native void processIMEEvent(int type, String text);
    public     native void repaint0();
  /** @brief キャンバス全体を再描画することを指示します。 */
    public     void repaint() { repaint0(); }
  /** @brief キャンバスの一部の矩形領域を再描画することを指示します。 */
    public     native void repaint(int x, int y, int width, int height) ;

  /** @brief Ticごとに呼出されます。 */
    public     abstract void onTick(Graphics g);

  /** @brief System Triggered paint */
    public     void update(Graphics g) {
  paint(g);
    }
    public native void dispose();
}
TOP

Related Classes of ufx.ui.Frame

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.