Esempio n. 1
0
 public void setInnerSize(int w, int h) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setInnerSize(w, h);
   }
 }
Esempio n. 2
0
 public void setBorderStyle(int st) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setBorderStyle(st);
   }
 }
Esempio n. 3
0
 public void setPosition(int l, int t) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setPosition(l, t);
   }
 }
Esempio n. 4
0
 public void setInnerSunken(boolean b) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setInnerSunken(b);
   }
 }
Esempio n. 5
0
 public void setMaxHeight(int v) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setMaxHeight(v);
   }
 }
Esempio n. 6
0
 public void setWidth(int w) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setWidth(w);
   }
 }
Esempio n. 7
0
 public void setVisible(boolean s) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setVisible(s);
   }
 }
Esempio n. 8
0
  /*
  	public void onCloseQueryCalled( boolean b ) {
  		if( mForm != null ) mForm.onCloseQueryCalled(b);
  	}

  */
  public void beginMove() throws TJSException {
    if (mForm != null) {
      if (mForm.getFullScreenMode())
        Message.throwExceptionMessage(Message.InvalidMethodInFullScreen);
      mForm.beginMove();
    }
  }
Esempio n. 9
0
  public void showModal() throws TJSException {
    if (mForm != null) {
      if (mForm.getFullScreenMode())
        Message.throwExceptionMessage(Message.InvalidMethodInFullScreen);

      TVP.WindowList.clearAllWindowInputEvents();
      // cancel all input events that can cause delayed operation

      mForm.showWindowAsModal();
    }
  }
Esempio n. 10
0
  public void postInputEvent(final String name, Dispatch2 params) throws TJSException {
    // posts input event
    if (mForm == null) return;

    final String key_name = "key";
    final String shift_name = "shift";

    // check input event name
    int type;

    if ("onKeyDown".equals(name)) type = etOnKeyDown;
    else if ("onKeyUp".equals(name)) type = etOnKeyUp;
    else if ("onKeyPress".equals(name)) type = etOnKeyPress;
    else type = etUnknown;

    if (type == etUnknown) Message.throwExceptionMessage(Message.SpecifiedEventNameIsUnknown, name);

    if (type == etOnKeyDown || type == etOnKeyUp) {
      // this needs params, "key" and "shift"
      if (params == null) Message.throwExceptionMessage(Message.SpecifiedEventNeedsParameter, name);

      int key = 0;
      int shift = 0;

      Variant val = new Variant();
      int hr = params.propGet(0, key_name, val, params);
      if (hr >= 0) key = val.asInteger();
      else Message.throwExceptionMessage(Message.SpecifiedEventNeedsParameter2, name, "key");

      hr = params.propGet(0, shift_name, val, params);
      if (hr >= 0) shift = val.asInteger();
      else Message.throwExceptionMessage(Message.SpecifiedEventNeedsParameter2, name, "shift");

      char vcl_key = (char) key;
      if (type == etOnKeyDown) mForm.internalKeyDown(key, shift);
      else if (type == etOnKeyUp) mForm.onKeyUp(vcl_key, shift);
    } else if (type == etOnKeyPress) {
      // this needs param, "key"
      if (params == null) Message.throwExceptionMessage(Message.SpecifiedEventNeedsParameter, name);
      int key = 0;

      Variant val = new Variant();
      int hr = params.propGet(0, key_name, val, params);
      if (hr >= 0) key = val.asInteger();
      else Message.throwExceptionMessage(Message.SpecifiedEventNeedsParameter2, name, "key");

      char vcl_key = (char) key;
      mForm.onKeyPress(vcl_key);
    }
  }
Esempio n. 11
0
  public void notifySrcResize() throws TJSException { // is called from primary layer
    // is called from primary layer
    if (mWindowUpdating) Message.throwExceptionMessage(Message.InvalidMethodInUpdating);

    // is called from primary layer
    // ( or from WindowForm to reset paint box's size )
    Size s = new Size();
    getSrcSize(s);
    if (mForm != null) mForm.setPaintBoxSize(s.width, s.height);
  }
Esempio n. 12
0
 public void setAttentionPoint(LayerNI layer, Point pt) {
   // set attention point to window
   if (mForm != null) {
     Font font = null;
     if (layer != null) {
       /*
       BaseBitmap bmp = layer.getMainImage();
       if( bmp != null )
       	font = bmp.getFontCanvas().getFont();
       */
     }
     mForm.setAttentionPoint(pt.x, pt.y, font);
   }
 }
Esempio n. 13
0
 public void showMenu() {
   if (mForm != null) mForm.showMenu();
 }
Esempio n. 14
0
 public void setCursorPos(int x, int y) {
   // set cursor pos in primar layer's coordinates
   if (mForm != null) mForm.setCursorPos(x, y);
 }
Esempio n. 15
0
 public void setHintText(String text) {
   // set hint text to window
   if (mForm != null) mForm.setHintText(text);
 }
Esempio n. 16
0
 public void setMouseCursor(int handle) {
   // set window mouse cursor
   if (mForm != null) mForm.setMouseCursor(handle);
 }
Esempio n. 17
0
 public void getCursorPos(Point pt) {
   // get cursor pos in primary layer's coordinates
   if (mForm != null) mForm.getCursorPos(pt);
 }
Esempio n. 18
0
 public int getZoomNumer() {
   if (mForm == null) return 1;
   return mForm.getZoomNumer();
 }
Esempio n. 19
0
 public void setDefaultMouseCursor() {
   // set window mouse cursor to default
   if (mForm != null) mForm.setDefaultMouseCursor();
 }
Esempio n. 20
0
 public void resetDrawDevice() throws TJSException {
   if (mForm != null) mForm.resetDrawDevice();
 }
Esempio n. 21
0
 public void setZoomDenom(int n) {
   if (mForm == null) return;
   mForm.setZoomDenom(n);
 }
Esempio n. 22
0
 public void tickBeat() throws TJSException {
   if (mForm != null) mForm.tickBeat();
 }
Esempio n. 23
0
 protected boolean getWindowActive() {
   if (mForm != null) return mForm.getWindowActive();
   return false;
 }
Esempio n. 24
0
 public void sendCloseMessage() {
   if (mForm != null) mForm.sendCloseMessage();
 }
Esempio n. 25
0
 public int getZoomDenom() {
   if (mForm == null) return 1;
   return mForm.getZoomDenom();
 }
Esempio n. 26
0
 public void disableAttentionPoint() {
   // disable attention point
   if (mForm != null) mForm.disableAttentionPoint();
 }
Esempio n. 27
0
 public void onCloseQueryCalled(boolean b) throws VariantException, TJSException {
   if (mForm != null) mForm.onCloseQueryCalled(b);
 }
Esempio n. 28
0
 public static void makeFullScreenModeCandidates(
     ScreenMode preferred, int mode, int zoom_mode, ArrayList<ScreenModeCandidate> candidates) {
   WindowForm.makeFullScreenModeCandidates(preferred, mode, zoom_mode, candidates);
 }
Esempio n. 29
0
 public void setImeMode(int mode) {
   // set ime mode
   if (mForm != null) mForm.setImeMode(mode);
 }
Esempio n. 30
0
 public boolean canDeliverEvents() {
   if (mForm == null) return false;
   return getVisible() && mForm.getFormEnabled();
 }