SciGUIConsole Class Reference


Public Member Functions

void Initialize ()
void EventsLoop ()
void dispose ()
boolean IsEnabled ()
void PutString (final String Str)

Package Functions

 SciGUIConsole ()

Private Attributes

Display display
Shell shell
Text textouput
Text textinput
boolean IsEnabled

Detailed Description

Definition at line 7 of file SciGUIConsole.java.


Constructor & Destructor Documentation

SciGUIConsole::SciGUIConsole (  )  [inline, package]

Definition at line 15 of file SciGUIConsole.java.

References IsEnabled().

00016         {
00017                 IsEnabled=false;
00018         }

Here is the call graph for this function:


Member Function Documentation

void SciGUIConsole::Initialize (  )  [inline]

Definition at line 20 of file SciGUIConsole.java.

References display, shell, textinput, and textouput.

00021 {
00022         display = new Display( );
00023   shell = new Shell(display);
00024   shell.pack ();
00025   shell.setSize(620,520);
00026   shell.setText("Scilab 5.0");
00027   
00028   textouput = new Text(shell, SWT.MULTI | SWT.V_SCROLL |   SWT.H_SCROLL | SWT.BORDER | SWT.WRAP |SWT.READ_ONLY);
00029   textouput.setBounds(10,10,600,230);
00030   
00031   textinput = new Text(shell, SWT.MULTI | SWT.V_SCROLL |   SWT.H_SCROLL | SWT.BORDER);
00032   textinput.setBounds(10,275,600,200);
00033   
00034   textinput.addTraverseListener(new TraverseListener() {
00035                 public void keyTraversed(TraverseEvent e) {
00036                         if (e.detail == SWT.TRAVERSE_RETURN ) 
00037                         {
00038                                 System.out.println (textinput.getText());
00039                                 textinput.setText("");
00040                                 System.out.println ("number lines: "+textinput.getLineCount());
00041                                 
00042                         }
00043                 }
00044         });
00045   
00046         shell.open( );
00047         IsEnabled=true;
00048                 
00049 
00050         
00051 }

void SciGUIConsole::EventsLoop (  )  [inline]

Definition at line 53 of file SciGUIConsole.java.

References display.

00054 {
00055         while(!shell.isDisposed( ))
00056   {
00057         if(!display.readAndDispatch( )) display.sleep( );
00058   }
00059   dispose();
00060 }

void SciGUIConsole::dispose (  )  [inline]

Definition at line 62 of file SciGUIConsole.java.

References display.

00063 {
00064         display.dispose( );
00065 }

boolean SciGUIConsole::IsEnabled (  )  [inline]

Definition at line 67 of file SciGUIConsole.java.

Referenced by SciGUIConsole().

00068 {
00069         return IsEnabled;
00070 }

Here is the caller graph for this function:

void SciGUIConsole::PutString ( final String  Str  )  [inline]

Definition at line 72 of file SciGUIConsole.java.

References display, and run().

00073 {
00074         display.syncExec (new Runnable () 
00075         {
00076                 public void run ()
00077                 {
00078                         textouput.append(Str);
00079                 }
00080         }); 
00081 }

Here is the call graph for this function:


Field Documentation

Display SciGUIConsole::display [private]

Definition at line 9 of file SciGUIConsole.java.

Referenced by Initialize().

Shell SciGUIConsole::shell [private]

Definition at line 10 of file SciGUIConsole.java.

Referenced by Initialize().

Text SciGUIConsole::textouput [private]

Definition at line 11 of file SciGUIConsole.java.

Referenced by Initialize().

Text SciGUIConsole::textinput [private]

Definition at line 12 of file SciGUIConsole.java.

Referenced by Initialize().

boolean SciGUIConsole::IsEnabled [private]

Definition at line 13 of file SciGUIConsole.java.


The documentation for this class was generated from the following file:
Generated on Sun Mar 4 16:15:15 2007 for Scilab [trunk] by  doxygen 1.5.1