public void setInnerSize(int w, int h) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setInnerSize(w, h); } }
public void setBorderStyle(int st) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setBorderStyle(st); } }
public void setPosition(int l, int t) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setPosition(l, t); } }
public void setInnerSunken(boolean b) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setInnerSunken(b); } }
public void setMaxHeight(int v) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setMaxHeight(v); } }
public void setWidth(int w) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setWidth(w); } }
public void setVisible(boolean s) throws TJSException { if (mForm != null) { if (mForm.getFullScreenMode()) Message.throwExceptionMessage(Message.InvalidPropertyInFullScreen); mForm.setVisible(s); } }
/* 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(); } }
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(); } }
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); } }
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); }
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); } }
public void showMenu() { if (mForm != null) mForm.showMenu(); }
public void setCursorPos(int x, int y) { // set cursor pos in primar layer's coordinates if (mForm != null) mForm.setCursorPos(x, y); }
public void setHintText(String text) { // set hint text to window if (mForm != null) mForm.setHintText(text); }
public void setMouseCursor(int handle) { // set window mouse cursor if (mForm != null) mForm.setMouseCursor(handle); }
public void getCursorPos(Point pt) { // get cursor pos in primary layer's coordinates if (mForm != null) mForm.getCursorPos(pt); }
public int getZoomNumer() { if (mForm == null) return 1; return mForm.getZoomNumer(); }
public void setDefaultMouseCursor() { // set window mouse cursor to default if (mForm != null) mForm.setDefaultMouseCursor(); }
public void resetDrawDevice() throws TJSException { if (mForm != null) mForm.resetDrawDevice(); }
public void setZoomDenom(int n) { if (mForm == null) return; mForm.setZoomDenom(n); }
public void tickBeat() throws TJSException { if (mForm != null) mForm.tickBeat(); }
protected boolean getWindowActive() { if (mForm != null) return mForm.getWindowActive(); return false; }
public void sendCloseMessage() { if (mForm != null) mForm.sendCloseMessage(); }
public int getZoomDenom() { if (mForm == null) return 1; return mForm.getZoomDenom(); }
public void disableAttentionPoint() { // disable attention point if (mForm != null) mForm.disableAttentionPoint(); }
public void onCloseQueryCalled(boolean b) throws VariantException, TJSException { if (mForm != null) mForm.onCloseQueryCalled(b); }
public static void makeFullScreenModeCandidates( ScreenMode preferred, int mode, int zoom_mode, ArrayList<ScreenModeCandidate> candidates) { WindowForm.makeFullScreenModeCandidates(preferred, mode, zoom_mode, candidates); }
public void setImeMode(int mode) { // set ime mode if (mForm != null) mForm.setImeMode(mode); }
public boolean canDeliverEvents() { if (mForm == null) return false; return getVisible() && mForm.getFormEnabled(); }