Example #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);
   }
 }
Example #2
0
 public void setBorderStyle(int st) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setBorderStyle(st);
   }
 }
Example #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);
   }
 }
Example #4
0
 public void setInnerSunken(boolean b) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setInnerSunken(b);
   }
 }
Example #5
0
 public void setMaxHeight(int v) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setMaxHeight(v);
   }
 }
Example #6
0
 public void setWidth(int w) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setWidth(w);
   }
 }
Example #7
0
 public void setVisible(boolean s) throws TJSException {
   if (mForm != null) {
     if (mForm.getFullScreenMode())
       Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen);
     mForm.setVisible(s);
   }
 }
Example #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();
    }
  }
Example #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();
    }
  }
Example #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);
    }
  }
Example #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);
  }
Example #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);
   }
 }
Example #13
0
 public void showMenu() {
   if (mForm != null) mForm.showMenu();
 }
Example #14
0
 public void setCursorPos(int x, int y) {
   // set cursor pos in primar layer's coordinates
   if (mForm != null) mForm.setCursorPos(x, y);
 }
Example #15
0
 public void setHintText(String text) {
   // set hint text to window
   if (mForm != null) mForm.setHintText(text);
 }
Example #16
0
 public void setMouseCursor(int handle) {
   // set window mouse cursor
   if (mForm != null) mForm.setMouseCursor(handle);
 }
Example #17
0
 public void getCursorPos(Point pt) {
   // get cursor pos in primary layer's coordinates
   if (mForm != null) mForm.getCursorPos(pt);
 }
Example #18
0
 public int getZoomNumer() {
   if (mForm == null) return 1;
   return mForm.getZoomNumer();
 }
Example #19
0
 public void setDefaultMouseCursor() {
   // set window mouse cursor to default
   if (mForm != null) mForm.setDefaultMouseCursor();
 }
Example #20
0
 public void resetDrawDevice() throws TJSException {
   if (mForm != null) mForm.resetDrawDevice();
 }
Example #21
0
 public void setZoomDenom(int n) {
   if (mForm == null) return;
   mForm.setZoomDenom(n);
 }
Example #22
0
 public void tickBeat() throws TJSException {
   if (mForm != null) mForm.tickBeat();
 }
Example #23
0
 protected boolean getWindowActive() {
   if (mForm != null) return mForm.getWindowActive();
   return false;
 }
Example #24
0
 public void sendCloseMessage() {
   if (mForm != null) mForm.sendCloseMessage();
 }
Example #25
0
 public int getZoomDenom() {
   if (mForm == null) return 1;
   return mForm.getZoomDenom();
 }
Example #26
0
 public void disableAttentionPoint() {
   // disable attention point
   if (mForm != null) mForm.disableAttentionPoint();
 }
Example #27
0
 public void onCloseQueryCalled(boolean b) throws VariantException, TJSException {
   if (mForm != null) mForm.onCloseQueryCalled(b);
 }
Example #28
0
 public static void makeFullScreenModeCandidates(
     ScreenMode preferred, int mode, int zoom_mode, ArrayList<ScreenModeCandidate> candidates) {
   WindowForm.makeFullScreenModeCandidates(preferred, mode, zoom_mode, candidates);
 }
Example #29
0
 public void setImeMode(int mode) {
   // set ime mode
   if (mForm != null) mForm.setImeMode(mode);
 }
Example #30
0
 public boolean canDeliverEvents() {
   if (mForm == null) return false;
   return getVisible() && mForm.getFormEnabled();
 }