home *** CD-ROM | disk | FTP | other *** search
- import com.ms.wfc.app.Application;
- import com.ms.wfc.core.Container;
- import com.ms.wfc.ui.Button;
- import com.ms.wfc.ui.Control;
- import com.ms.wfc.ui.Edit;
- import com.ms.wfc.ui.Form;
- import com.ms.wfc.ui.MouseEvent;
- import com.ms.wfc.ui.MouseEventHandler;
- import com.ms.wfc.ui.Point;
-
- public class OCTZoom extends Form {
- OCAgrid grid;
- int targ_index;
- APInfo appinfo;
- int datatype = -1;
- int dataindex = 0;
- int type;
- String tree_id = "";
- boolean calledfrom_grid = false;
- Container components = new Container();
- Button button2 = new Button();
- Edit zoomfield = new Edit();
- Button button1 = new Button();
-
- OCTZoom() {
- this.initForm();
- }
-
- OCTZoom(int var1, OCAgrid var2, int var3) {
- this.grid = var2;
- this.targ_index = var3;
- this.type = var1;
- this.calledfrom_grid = true;
- this.initForm();
- this.initData(this.grid.getGridValue(this.targ_index));
- }
-
- OCTZoom(String var1, APInfo var2, int var3, int var4, String var5) {
- this.datatype = var3;
- this.dataindex = var4;
- this.appinfo = var2;
- this.tree_id = var5;
- this.initForm();
- this.initData(var1);
- }
-
- private void initForm() {
- this.button2.setLocation(new Point(280, 168));
- this.button2.setSize(new Point(72, 24));
- this.button2.setTabIndex(2);
- this.button2.setText("Cancel");
- this.button2.addOnMouseUp(new MouseEventHandler(this, "cancel_mouseup"));
- this.zoomfield.setLocation(new Point(8, 8));
- this.zoomfield.setSize(new Point(344, 152));
- this.zoomfield.setTabIndex(0);
- this.zoomfield.setText("edit1");
- this.zoomfield.setAcceptsReturn(false);
- this.zoomfield.setMultiline(true);
- this.button1.setLocation(new Point(200, 168));
- this.button1.setSize(new Point(72, 24));
- this.button1.setTabIndex(1);
- this.button1.setText("OK");
- this.button1.addOnMouseUp(new MouseEventHandler(this, "ok_mouseup"));
- ((Control)this).setText("Text Zoom");
- ((Form)this).setAcceptButton(this.button1);
- ((Form)this).setAutoScaleBaseSize(new Point(5, 13));
- ((Control)this).setClientSize(new Point(359, 195));
- ((Form)this).setMaximizeBox(false);
- ((Form)this).setMinimizeBox(false);
- ((Form)this).setStartPosition(1);
- ((Form)this).setTopMost(true);
- ((Form)this).setNewControls(new Control[]{this.button2, this.button1, this.zoomfield});
- }
-
- public void initData(String var1) {
- this.zoomfield.setText(var1);
- }
-
- public static void launchWindow0(int var0, OCAgrid var1, int var2) {
- Application.run(new OCTZoom(var0, var1, var2));
- }
-
- public void dispose() {
- super.dispose();
- this.components.dispose();
- }
-
- private void ok_mouseup(Object var1, MouseEvent var2) {
- String var3 = this.zoomfield.getText();
- if (this.calledfrom_grid) {
- this.grid.setGridValue(this.targ_index, var3);
- } else if (this.datatype == 2) {
- String[] var4 = this.appinfo.getSpecMLValues().valueAt(this.tree_id);
- var4[this.dataindex] = var3;
- this.appinfo.getSpecMLValues().editItem(this.tree_id, var4);
- ACutila.iface.ipan.updateDesignOnly(true);
- ACutila.anythingChanged = true;
- }
-
- this.dispose();
- }
-
- private void cancel_mouseup(Object var1, MouseEvent var2) {
- this.dispose();
- }
-
- public static void launchWindow1(String var0, APInfo var1, int var2, int var3, String var4) {
- Application.run(new OCTZoom(var0, var1, var2, var3, var4));
- }
- }
-