//VB TO JAVA CONVERTER WARNING: VB to Java Converter converts from VB(.NET), not VB6: VERSION 5.00; Begin VB.Form Adapt; Caption = "Stimulus/Response, Percept/Action History"; ClientHeight = 8415; ClientLeft = 60; ClientTop = 345; ClientWidth = 15240; BeginProperty Font; Name = "MS Sans Serif"; Size = 9.75; Charset = 0; Weight = 400; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Icon = "Adapt.frx"; 0000; LinkTopic = "Form1"; ScaleHeight = 8415; ScaleWidth = 15240; Begin VB.TextBox LTMTitles; Appearance = 0; //Flat BackColor = 0x80000004L; BorderStyle = 0; //None BeginProperty Font; Name = "Courier"; Size = 9.75; Charset = 0; Weight = 700; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Height = 2535; Left = 0; Locked = -1; //True MultiLine = -1; //True TabIndex = 5; TabStop = 0; //False Text = "Adapt.frx"; 0442; Top = 2760; Width = 975; System.exit(); Begin VB.CommandButton SeeBinons; Caption = "See Memory"; BeginProperty Font; Name = "MS Sans Serif"; Size = 9.75; Charset = 0; Weight = 700; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Height = 615; Left = 12840; TabIndex = 1; Top = 6960; Width = 2055; System.exit(); Begin VB.TextBox IO; Appearance = 0; //Flat BeginProperty Font; Name = "Terminal"; Size = 13.5; Charset = 255; Weight = 400; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Height = 2775; Left = 0; Locked = -1; //True MultiLine = -1; //True ScrollBars = 3; //Both TabIndex = 4; TabStop = 0; //False Text = "Adapt.frx"; 0450; Top = 0; Width = 15240; System.exit(); Begin VB.TextBox TraceInfo; Appearance = 0; //Flat BackColor = 0x80000004L; BorderStyle = 0; //None BeginProperty Font; Name = "MS Sans Serif"; Size = 12; Charset = 0; Weight = 700; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Height = 2340; Left = 960; Locked = -1; //True MultiLine = -1; //True TabIndex = 2; TabStop = 0; //False Text = "Adapt.frx"; 0455; Top = 6000; Width = 11655; System.exit(); Begin VB.TextBox LTMem; Appearance = 0; //Flat BeginProperty Font; Name = "Courier"; Size = 9.75; Charset = 0; Weight = 400; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Height = 3135; Left = 960; Locked = -1; //True MultiLine = -1; //True ScrollBars = 3; //Both TabIndex = 3; TabStop = 0; //False Text = "Adapt.frx"; 0676; Top = 2760; Width = 14280; System.exit(); Begin VB.CommandButton GoWorld; Caption = "See World"; BeginProperty Font; Name = "MS Sans Serif"; Size = 9.75; Charset = 0; Weight = 700; Underline = 0; //False Italic = 0; //False Strikethrough = 0; //False EndProperty; Height = 615; Left = 12840; Style = 1; //Graphical TabIndex = 0; Top = 6120; Width = 2175; System.exit(); System.exit(); Attribute VB_Name = "Adapt"; Attribute VB_GlobalNameSpace = false; Attribute VB_Creatable = false; Attribute VB_PredeclaredId = true; Attribute VB_Exposed = false; // // This form shows the detailed history of the sequence of stimuli and responses // It displays the inputs and outputs in IO.Text DefInt A - Z; Public INPUTSTREAM As String, OUTPUTSTREAM As String; Private Sub Form_Load(); LTMTitles.Text = "Step # " + "\r\n"; //------MEMORY LOCATION LTMTitles.Text = LTMTitles.Text + "Percept" + "\r\n"; //------Percepts(.., Fired) Type LTMTitles.Text = LTMTitles.Text + "Binon #" + "\r\n" + "\r\n"; //------Percepts(.., Fired) Binon LTMTitles.Text = LTMTitles.Text + "Expect" + "\r\n"; //------ES ActBin type LTMTitles.Text = LTMTitles.Text + "Binon #" + "\r\n" + "\r\n"; //------ LTMEMORY ActBin Object binon LTMTitles.Text = LTMTitles.Text + "Action" + "\r\n"; //------AR ActBin type LTMTitles.Text = LTMTitles.Text + "Binon #" + "\r\n" + "\r\n"; //------ LTMEMORY ActBin Object binon LTMTitles.Text = LTMTitles.Text + "Action" + "\r\n"; //------Actions(.., Fired) Type LTMTitles.Text = LTMTitles.Text + "Binon #" + "\r\n" + "\r\n"; //------Actions(.., Fired) Binon } public final void SeeBinons_Click() { BinonDisplay.Show; } //End of SeeBinons() private void GoWorld_Click() //Return to the World view { World.Show; World.Go.SetFocus; //The Go / Continue command button } public final void DUMPLTM() //Called by Update_View { // // Displaying LONG TERM MEMORY in LTMem.Text // String MemLine = null; String MemValT = null; String[] MemSize = new String[(1 To 2000) + 1]; String Length = null; String Sen = null; String Att = null; String Pe = null; String Ob = null; Object E = null; Object BinTyp = null; Object Group = null; Object EndLIN = null; Object GroupSize = null; boolean DisplayIt = false; //a Spac$, //'-------------------- Long Term Memory (LTM) - Monitoring Info. ------------------------- // 'For Display purposes only by Adapt.DUMPLTM in Adapt.LTMem // 'Long term memory contains a list of the stimuli that have been paid attention to. // 'It stores Perceptual sequences as a pair of sequential memory locations. // // Public LTMEMORY&(1 To 2000, 1 To 6) // '1st index is StoreAt cycle number // '2nd index is what type of information is in the LTM // // '---- LTMEMORY() 2nd index values - type of information in LTMEMORY() // Public LtmPerceptTyp '1 Percept binon type // Public LtmPerceptBin '2 Percept binon // Public LtmESType '3 Type of ES Binon - may be an SS // Public LtmESActBin '4 ES Actbin // Public LtmARType '5 Type of AR Binon - may be an RR // Public LtmARActBin '6 AR ActBin // Public LtmActionTyp '7 Action binon type // Public LtmActionBin '8 Action binon for (var I = 1; I <= StoreAt; I++) //find the widest binon # for all the StoreAt positions { MemSize[I] = String.valueOf(String.valueOf(I).Length); //assume smallest width of characters for each entry if (MemSize[I].compareTo("3") < 0) //a minimum of 3 characters wide { MemSize[I] = "3"; } Length = String.valueOf(String.valueOf(LTMEMORY(I, LtmPerceptBin)).Length); if (Length.compareTo(MemSize[I]) > 0) { MemSize[I] = Length; } Length = String.valueOf(String.valueOf(LTMEMORY(I, LtmESActBin)).Length); if (Length.compareTo(MemSize[I]) > 0) { MemSize[I] = Length; } Length = String.valueOf(String.valueOf(LTMEMORY(I, LtmARActBin)).Length); if (Length.compareTo(MemSize[I]) > 0) { MemSize[I] = Length; } Length = String.valueOf(String.valueOf(LTMEMORY(I, LtmActionBin)).Length); if (Length.compareTo(MemSize[I]) > 0) { MemSize[I] = Length; } } LTMem.Text = ""; GroupSize = 250; //VB TO JAVA CONVERTER NOTE: The ending condition of VB 'For' loops is tested only on entry to the loop. VB to Java Converter has created a temporary variable in order to use the initial value of (StoreAt - 1)) TangibleIntDiv GroupSize for every iteration: Object tempVar = (StoreAt - 1)) / GroupSize; //VB TO JAVA CONVERTER TODO TASK: The following line could not be converted: For Group = (0 To (StoreAt - 1)) / GroupSize EndLIN = GroupSize * Group + GroupSize; //Only put up the available values if (EndLIN > StoreAt) { EndLIN = StoreAt; } MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM display the event number { MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + String.valueOf(E))).substring(((String)(new string(' ', MemSize[(Integer)E]) + String.valueOf(E))).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n"; //------Percepts(.., Fired) Type MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = BinonTypeName(LTMEMORY(E, LtmPerceptTyp), BinAbbreviation); //Att$ = Str$(STM(1, BinTp, Current)) MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n"; //------Percepts(.., Fired) Binon MemLine = ""; //Trigger STIMULUS intensity for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = String.valueOf(LTMEMORY(E, LtmPerceptBin)); //Att$ = Str$(STM(1, BinId, Current)) MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n" + "\r\n"; //------ES ActBin type MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = AESR(LTMEMORY(E, LtmESActBin)); MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n"; //------ LTMEMORY ActBin Object binon MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = String.valueOf(LTMEMORY(E, LtmESActBin)); MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n" + "\r\n"; //------AR ActBin type MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = AESR(LTMEMORY(E, LtmARActBin)); MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n"; //------ LTMEMORY ActBin Object binon MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = String.valueOf(LTMEMORY(E, LtmARActBin)); MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n" + "\r\n"; //------Actions(.., Fired) Type MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = BinonTypeName(LTMEMORY(E, LtmActionTyp), BinAbbreviation); MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n"; //------Actions(.., Fired) Binon MemLine = ""; for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in LTM { Att = String.valueOf(LTMEMORY(E, LtmActionBin)); MemLine = MemLine + ((String)(new string(' ', MemSize[(Integer)E]) + Att)).substring(((String)(new string(' ', MemSize[(Integer)E]) + Att)).length() - MemSize[(Integer)E]); } LTMem.Text = LTMem.Text + MemLine + "\r\n" + "\r\n"; } } //End of DUMPLTM public final void HISTORYDISPLAY() //Called by Update_View { //Display INPUTS$() and OUTPUTS$() history in IO.Text Object E = null; Object Sn = null; Object Wdth = null; Object Group = null; Object EndLIN = null; Object GroupSize = null; String NumberLine = null; String ILines = null; //10 sense lines String OLine1 = null; //The one line of responses // Public INPUTS$(2000, 1 To 10) 'Input history - List of sense stimuli for each sense (1 to 10) // Public OUTPUTS$(2000) 'OUTPUT history - List of Responses IO.Text = ""; //clear the IO display GroupSize = 250; //After 250 events the IO.Text area wraps the lines //VB TO JAVA CONVERTER NOTE: The ending condition of VB 'For' loops is tested only on entry to the loop. VB to Java Converter has created a temporary variable in order to use the initial value of (LIN - 1)) TangibleIntDiv GroupSize for every iteration: Object tempVar = (LIN - 1)) / GroupSize; //VB TO JAVA CONVERTER TODO TASK: The following line could not be converted: For Group = (0 To (LIN - 1)) / GroupSize EndLIN = GroupSize * Group + GroupSize; //Only put up the available values if (EndLIN > LIN) { EndLIN = LIN; } for (E = GroupSize * Group + 1; E <= EndLIN; E++) //For each event in INPUTS$ and OUTPUTS$ { if (E == GroupSize * Group + 1) //If it is the 1st position / event in the line then { NumberLine = "Step # : "; for (Sn = 1; Sn <= NumSenses; Sn++) //Add labels to start of lines { ILines.charAt(Sn) = ((String)(Sense(Sn) + ": ")).substring(0, 9)[0]; //The name of the sense } OLine1 = ((String)(Device(1) + ": ")).substring(0, 9); //The name of the action device } NumberLine = NumberLine + String.valueOf(E); //the event number Wdth = String.valueOf(E).Length; //the space taken up by the event number // If I Mod 62 = 0 And I <> 0 Then 'end of line so put them in IO.Text // For Sn = 1 To NumSenses // IO.Text = IO.Text & ILines$(Sn) & vbCrLf // Next Sn // IO.Text = IO.Text & OLine1$ & vbCrLf // // For Sn = 1 To NumSenses // ILines$(Sn) = "" // Next Sn // OLine1$ = "" // End If for (Sn = 1; Sn <= NumSenses; Sn++) { ILines.charAt(Sn) = ILines.charAt(Sn).toString() + (" " + INPUTS(E, Sn)).substring((" " + INPUTS(E, Sn)).length() - Wdth)[0]; } OLine1 = OLine1 + (" " + OUTPUTS(E, 1)).substring((" " + OUTPUTS(E, 1)).length() - Wdth); } IO.Text = IO.Text + NumberLine + "\r\n"; for (Sn = 1; Sn <= NumSenses; Sn++) { IO.Text = IO.Text + ILines.charAt(Sn).toString() + "\r\n"; } IO.Text = IO.Text + OLine1 + "\r\n"; IO.Text = IO.Text + "\r\n"; } } //End of HISTORYDISPLAY() public final void Update_View() //called by World.LookInside_Click() to SeeHistory and Bodies.BodyFunction2() { //refreshes all the subwindows Adapt.HISTORYDISPLAY(); Adapt.DUMPLTM(); } //End of Update-View() private void IO_MouseDown(int Button, int Shift, float X, float Y) { GoWorld.SetFocus; } private void LTMem_MouseDown(int Button, int Shift, float X, float Y) { GoWorld.SetFocus; } private void LTMTitles_MouseDown(int Button, int Shift, float X, float Y) { GoWorld.SetFocus; } private void TraceInfo_MouseDown(int Button, int Shift, float X, float Y) { GoWorld.SetFocus; }