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