home *** CD-ROM | disk | FTP | other *** search
Wrap
INI File | 1997-01-18 | 13.1 KB | 385 lines
[Allevents] \?onClick\if ((e.target instanceof T\Name\) & (e.id == Event.ACTION_EVENT)) { return \onClick\ (e); }\-\ \?onKeyPress\if ((e.target instanceof T\Name\) & (e.id == Event.KEY_PRESS)) { return \onKeyPress\ (e); }\-\ \?onKeyRelease\if ((e.target instanceof T\Name\) & (e.id == Event.KEY_RELEASE)) { return \onKeyRelease\ (e); }\-\ \?onGotFocus\if ((e.target instanceof T\Name\) & (e.id == Event.GOT_FOCUS)) { return \onGotFocus\ (e); }\-\ \?onKeyAction\if ((e.target instanceof T\Name\) & (e.id == Event.KEY_ACTION)) { return \onKeyAction\ (e); }\-\ \?onKeyActionRelease\if ((e.target instanceof T\Name\) & (e.id == Event.KEY_ACTION_RELEASE)) { return \onKeyActionRelease\ (e); }\-\ \?onListDeselect\if ((e.target instanceof T\Name\) & (e.id == Event.LIST_DESELECT)) { return \onListDeselect\ (e); }\-\ \?onListSelect\if ((e.target instanceof T\Name\) & (e.id == Event.LIST_SELECT)) { return \onListSelect\ (e); }\-\ \?onLoadFile\if ((e.target instanceof T\Name\) & (e.id == Event.LOAD_FILE)) { return \onLoadFile\ (e); }\-\ \?onLostFocus\if ((e.target instanceof T\Name\) & (e.id == Event.LOST_FOCUS)) { return \onLostFocus\ (e); }\-\ \?onMouseDown\if ((e.target instanceof T\Name\) & (e.id == Event.MOUSE_DOWN)) { return \onMouseDown\ (e); }\-\ \?onMouseDrag\if ((e.target instanceof T\Name\) & (e.id == Event.MOUSE_DRAG)) { return \onMouseDrag\ (e); }\-\ \?onMouseEnter\if ((e.target instanceof T\Name\) & (e.id == Event.MOUSE_ENTER)) { return \onMouseEnter\ (e); }\-\ \?onMouseExit\if ((e.target instanceof T\Name\) & (e.id == Event.MOUSE_EXIT)) { return \onMouseExit\ (e); }\-\ \?onMouseMove\if ((e.target instanceof T\Name\) & (e.id == Event.MOUSE_MOVE)) { return \onMouseMove\ (e); }\-\ \?onMouseUp\if ((e.target instanceof T\Name\) & (e.id == Event.MOUSE_UP)) { return \onMouseUp\ (e); }\-\ \?onSaveFile\if ((e.target instanceof T\Name\) & (e.id == Event.SAVE_FILE)) { return \onSaveFile\ (e); }\-\ \?onScrollAbsolute\if ((e.target instanceof T\Name\) & (e.id == Event.SCROLL_ABSOLUTE)) { return \onScrollAbsolute\ (e); }\-\ \?onScrollLineDown\if ((e.target instanceof T\Name\) & (e.id == Event.SCROLL_LINE_DOWN)) { return \onScrollLineDown\ (e); }\-\ \?onScrollLineUp\if ((e.target instanceof T\Name\) & (e.id == Event.SCROLL_LINE_UP)) { return \onScrollLineUp\ (e); }\-\ \?onScrollPageDown\if ((e.target instanceof T\Name\) & (e.id == Event.SCROLL_PAGE_DOWN)) { return \onScrollPageDown\ (e); }\-\ \?onScrollPageUp\if ((e.target instanceof T\Name\) & (e.id == Event.SCROLL_PAGE_UP)) { return \onScrollPageUp\ (e); }\-\ \?onWindowDeiconify\if ((e.target instanceof T\Name\) & (e.id == Event.WINDOW_DEICONIFY)) { return \onWindowDeiconify\ (e); }\-\ \?onWindowDestroy\if ((e.target instanceof T\Name\) & (e.id == Event.WINDOW_DESTROY)) { return \onWindowDestroy\ (e); }\-\ \?onWindowExpose\if ((e.target instanceof T\Name\) & (e.id == Event.WINDOW_EXPOSE)) { return \onWindowExpose\ (e); }\-\ \?onWindowIconify\if ((e.target instanceof T\Name\) & (e.id == Event.WINDOW_ICONIFY)) { return \onWindowIconify\ (e); }\-\ \?onWindowMoved\if ((e.target instanceof T\Name\) & (e.id == Event.WINDOW_MOVED)) { return \onWindowMoved\ (e); }\-\ [Properties] Alignment=Alignment Caption=String CancelButton=Boolean Checked=Boolean Childcount=Integer Color=Color Columns=Integer Filename=Filename Fontcolor=Color Fontname=Fontname Fontsize=Integer Fontstyle=Fontstyle Height=Integer Items=Items Left=Integer Min=Integer Max=Integer MultiSelect=Boolean Name=Name NoButton=Boolean OkButton=Boolean Owner=String Path=Path Rows=Integer Text=String Top=Integer Width=Integer YesButton=Boolean [Events] onClick= onKeyPress= onKeyRelease= onGotFocus= onKeyAction= onKeyActionRelease= onListDeselect= onListSelect= onLoadFile= onLostFocus= onMouseDown= onMouseDrag= onMouseEnter= onMouseExit= onMouseMove= onMouseUp= onSaveFile= onScrollAbsolute= onScrollLineDown= onScrollLineUp= onScrollPageDown= onScrollPageUp= onWindowDeiconify= onWindowDestroy= onWindowExpose= onWindowIconify= onWindowMoved= [Visualmain] Color=blue Height=300 Name= onGotFocus= onKeyPress= onKeyRelease= onLostFocus= onMouseDown= onMouseMove= onMouseUp= Width=450 [Visualmain.Init] 1=setBackground (Color.\Color\); 2=resize (\Width\,\Height\); [Visualmain.Events] 1=\?onGotFocus\if ((e.target == this) & (e.id == Event.GOT_FOCUS)) { return \onGotFocus\ (e); }\-\ 2=\?onKeyPress\if ((e.target == this) & (e.id == Event.KEY_PRESS)) { return \onKeyPress\ (e); }\-\ 3=\?onKeyRelease\if ((e.target == this) & (e.id == Event.KEY_RELEASE)) { return \onKeyRelease\ (e); }\-\ 4=\?onLostFocus\if ((e.target == this) & (e.id == Event.LOST_FOCUS)) { return \onLostFocus\ (e); }\-\ 5=\?onMouseDown\if ((e.target == this) & (e.id == Event.MOUSE_DOWN)) { return \onMouseDown\ (e); }\-\ 6=\?onMouseMove\if ((e.target == this) & (e.id == Event.MOUSE_MOVE)) { return \onMouseMove\ (e); }\-\ 7=\?onMouseUp\if ((e.target == this) & (e.id == Event.MOUSE_UP)) { return \onMouseUp\ (e); }\-\ [Label] Caption=ALabel Color=black Fontname=TimesRoman Fontcolor=black Fontstyle=Font.PLAIN Fontsize=8 Left=10 Name= Top=10 [Label.Class] 1=String \Name\ = "\Caption\"; [Label.Paint] 1=g.setFont (new Font ("\Fontname\",\Fontstyle\,\Fontsize\)); 2=g.setColor (Color.\Fontcolor\); 3=g.drawString (\Name\,\Left\,\Top\); [Button] Caption=AButton Left=10 Name= onClick= onKeyPress= onKeyRelease= Owner= Top=10 Height=25 Width=75 [Button.Class] 1=Button \Name\ = new Button ("\Caption\"); [Button.Init] 1=add (\Name\); [Button.Paint] 1=\Name\.reshape (\Left\,\Top\,\Width\,\Height\); [Button.Events] 1=\?onClick\if ((e.target instanceof Button) & (e.equals ("\Caption\")) & (e.id == Event.ACTION_EVENT)) {return \onClick\ (e); }\-\ 2=\?onKeyPress\if ((e.target instanceof Button) & (e.equals ("\Caption\")) & (e.id == Event.KEY_PRESS)) { return \onKeyPress\ (e); }\-\ 3=\?onKeyRelease\if ((e.target instanceof Button) & (e.equals ("\Caption\")) & (e.id == Event.KEY_RELEASE)) { return \onKeyRelease\ (e); }\-\ [CheckboxGroup] Childcount=0 Height=50 Left=10 Name= Top=10 Width=110 [CheckboxGroup.Class] 1=CheckboxGroup \Name\ = new CheckboxGroup (); [Checkbox] Caption=ACheckbox Checked=false Height=12 Left=10 Name= onClick= onKeyPress= onKeyRelease= Owner= Top=10 Width=100 [Checkbox.Class] 1=\?!Owner=VISUALWINNAME\>T\Owner\ \Owner\\-\ 2=Checkbox \Name\ = new Checkbox ("\Caption\"\?!Owner=VISUALWINNAME\,\Owner\,\Checked\\-\); [Checkbox.Init] 1=add (\Name\); 2=\?Owner=VISUALWINNAME\\Name\.setState (\Checked\);\-\ [Checkbox.Paint] 1=\Name\.reshape (\Left\,\Top\,\Width\,\Height\); [Checkbox.Events] 1=\?onClick\if ((e.target instanceof Checkbox) & (e.equals ("\Caption\")) & (e.id == Event.ACTION_EVENT)) { return \onClick\ (e); }\-\ 2=\?onKeyPress\if ((e.target instanceof Checkbox) & (e.equals ("\Caption\")) & (e.id == Event.KEY_PRESS)) { return \onKeyPress\ (e); }\-\ 3=\?onKeyRelease\if ((e.target instanceof Checkbox) & (e.equals ("\Caption\")) & (e.id == Event.KEY_RELEASE)) { return \onKeyRelease\ (e); }\-\ [TextField] Columns=11 Height=22 Left=10 Name= onKeyPress= onKeyRelease= Owner= Text=ATextField Top=10 Width=110 [TextField.Class] 1=TextField \Name\ = new TextField ("\Text\", \Columns\); [TextField.Init] 1=add (\Name\); [TextField.Paint] 1=\Name\.reshape (\Left\,\Top\,\Width\,\Height\); [TextField.Events] 1=\?onKeyPress\if ((e.target instanceof TextField) & (e.id == Event.KEY_PRESS)) { return \onKeyPress\ (e); }\-\ 2=\?onKeyRelease\if ((e.target instanceof TextField) & (e.id == Event.KEY_RELEASE)) { return \onKeyRelease\ (e); }\-\ [TextArea] Columns=15 Height=200 Left=150 Name= Rows=20 Text=ATextArea Top=10 Width=150 [TextArea.Class] 1=TextArea \Name\ = new TextArea (\?Text\"\Text\",\-\\Rows\,\Columns\); [TextArea.Init] 1=add (\Name\); [TextArea.Paint] 1=\Name\.reshape (\Left\,\Top\,\Width\,\Height\); [FileDialog] Caption=Make your choices... FileDlgMode=LOAD Left=10 Name= Top=10 [FileDialog.Class] 1=FileDialog \Name\ = new FileDialog (new Frame(),"\Caption\"); [FileDialog.Start] 1=//\Name\.show(); [MessageFrame] CancelButton=false Caption=A Message occured Left=10 Name= NoButton=false OkButton=true Text=Information Top=10 YesButton=false [MessageFrame.Class] 1=T\Name\ \Name\ = new T\Name\ (new Frame(),\OkButton\,\YesButton\,\NoButton\,\CancelButton\); [MessageFrame.Start] 1=//\Name\.show("\Text\","\Caption\"); 2=//if (\Name\.getResult==?) // ?: 0=OK 1=Yes 2=No 3=Cancel [MessageFrame.Typedef] 1=class T\Name\ extends Dialog { boolean wrhd; String TheText; int Width; Button Okbu=new Button("OK"); Button Yesbu=new Button("Yes"); Button Nobu=new Button("No"); Button Canbu=new Button("Cancel"); 2=int AResult; T\Name\ (Frame AFrame,boolean okbu,boolean yesbu,boolean nobu,boolean canbu) { super(AFrame,true); setResizable (false); wrhd=false; Width=100; if(okbu) { Okbu.show(); add (Okbu); 3=Okbu.reshape (Width-50,90,75,25); Width+=100; } if(yesbu) { Yesbu.show(); add (Yesbu); Yesbu.reshape (Width-50,90,75,25); Width+=100; } if(nobu) { Nobu.show(); add (Nobu); Nobu.reshape (Width-50,90,75,25); 4=Width+=100; } if(canbu) { Canbu.show(); add (Canbu); Canbu.reshape (Width-50,90,75,25); Width+=100; } super.reshape (250,250,Width,150); } public int getResult () { return AResult; } public void paint (Graphics g) { if (!wrhd) 5={ reshape (250,250,Width-25,150); wrhd=true; } g.setFont (new Font ("TimesRoman",Font.PLAIN,15)); g.drawString (TheText,((Width - (TheText.length()*10))/2),36); super.paint (g); } public int show (String ACaption,String AText) 6={ TheText=AText; wrhd=false; setTitle (ACaption); super.show (); return AResult; } public boolean action (Event e,Object o) { switch (e.id) { case Event.ACTION_EVENT: { if ("OK".equals(o)) AResult=0; if ("Yes".equals (o)) 7=AResult=1; if ("No".equals (o)) AResult=2; if ("Cancel".equals (o)) AResult=3; super.dispose(); return true; } default: return false; } } } [FindDialog] Left=10 Name= Text= Top=10 [FindDialog.Class] 1=T\Name\ \Name\ = new T\Name\ (new Frame(),"\Text\"); [FindDialog.Start] 1=//\Name\.show(); 2=//if (\Name\.getSearchtext ().equals ("")) { }; [FindDialog.Typedef] 1=class T\Name\ extends Dialog { Checkbox Cbox1=new Checkbox("Hole word"); Checkbox Cbox2=new Checkbox("Case sensitive"); CheckboxGroup Cbgr1=new CheckboxGroup(); 2=Checkbox Cbox3=new Checkbox("Down",Cbgr1,true); Checkbox Cbox4=new Checkbox("Up",Cbgr1,false); CheckboxGroup Cbgr2=new CheckboxGroup(); 3=Checkbox Cbox5=new Checkbox("From cursor",Cbgr2,false); Checkbox Cbox6=new Checkbox("Entire text",Cbgr2,true); Button Button1=new Button("Search"); 4=TextField TxtFld1=new TextField(); boolean wsrhd; 5=T\Name\ (Frame AFrame,String ASearch) { super(AFrame,"Text search...",true); reshape (50,50,420,150); wsrhd=false; add(Cbox1); add(Cbox2); 6=add(Cbox3); add(Cbox4); add(Cbox5); add(Cbox6); add(Button1); add(TxtFld1); TxtFld1.setText(ASearch); } 7=public boolean action(Event e,Object o) { switch(e.id) { case Event.ACTION_EVENT: { if ("Search".equals (o)) { dispose(); return true; } } default: return false; } } 8=public String getSearchtext () { return TxtFld1.getText(); } public boolean getHoleword() { return Cbox1.getState(); } public boolean getCasesensitive() { return Cbox2.getState(); } 9=public boolean getDown() { return Cbox3.getState(); } public boolean getEntiretext () { return Cbox6.getState(); } 10=public void paint(Graphics g) { g.setFont(new Font("TimesRoman",Font.PLAIN,10)); g.setColor(Color.black); g.drawString("Search for:",20,25); g.drawString("Direction",170,45); g.drawString("Method",170,75); 11=if (!wsrhd) { reshape(50,50,420,150); Cbox1.reshape(20,70,100,12); Cbox1.setState(false); Cbox2.reshape(20,100,120,12); Cbox2.setState(false); Cbox3.reshape(195,70,90,12); Cbox4.reshape(310,70,100,12); 12=Cbox5.reshape(195,100,105,12); Cbox6.reshape(310,100,100,12); Button1.reshape(334,34,76,25); TxtFld1.reshape(70,35,256,23); wsrhd=true; } super.paint (g); } } [Rectangle] Color=black Height=20 Left=10 Name= Top=10 Width=20 [Rectangle.Paint] 1=g.setColor (Color.\Color\); 2=g.drawRect (\Left\,\Top\,\Width\,\Height\); [Image] Filename= Left=10 Name= Path= Top=10 [Image.Class] 1=Image \Name\; 2=\?Path\URL \Name\URL = null;\-\ [Image.Init] 1=\?Path\try { \Name\URL = new URL ("\Path\"); } catch (MalformedURLException \Name\URL) { showStatus("Error"); }\-\ 2=\Name\ = getImage (\?!Path\getCodeBase (), "\Filename\"\-\\?Path\\Name\URL\-\); [Image.Paint] 1=g.drawImage (\Name\, \Left\, \Top\, this); [List] Height=200 Items= Left=10 Name= Multiselect=false Selected=0 Top=10 Width=100 [List.Class] 1=List \Name\ = new List (); [List.Init] 1=add (\Name\); 2=\Name\.setMultipleSelections (\Multiselect\); 3=\░░0\ 4=\?Items░0\\Name\.addItem ("\Items░0\");\-\ 5=\░+0\ 6=\?Items░0\\░>0\\-\ [List.Paint] 1=\Name\.reshape (\Left\,\Top\,\Width\,\Height\); [MenuBar] Items= Left=10 Name= Top=10 [MenuBar.Class] 1=MenuBar \Name\ = new MenuBar (); 2=\░░0\ 3=\?Items░0\Menu \Items░0\ = new Menu ("\Items░0\");\-\ 4=\░+0\ 5=\?Items░0\\░>0\\-\ [MenuBar.Init] 1=\░░0\ 2=\?Items░0\\Name\.add (\Items░0\);\-\ 3=\░+0\ 4=\?Items░0\\░>0\\-\ 5=setMenuBar (\Name\);