Added documentation
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
7fd1bf90bd
commit
185d19bfcf
@ -93,7 +93,8 @@ public final class SWTConsoleShell extends Shell {
|
||||
|
||||
/** Create the shell.
|
||||
*
|
||||
* @param display the display */
|
||||
* @param display the display
|
||||
* @param style the shell style */
|
||||
public SWTConsoleShell(final Display display, final int style) {
|
||||
super(display, style);
|
||||
setLayout(new GridLayout(2, false));
|
||||
@ -121,6 +122,11 @@ public final class SWTConsoleShell extends Shell {
|
||||
setText("Console Application"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/** Connect the console parts to the shell.
|
||||
*
|
||||
* @param input the input
|
||||
* @param output the output
|
||||
* @param promptStream the stream where the prompts are forwarded. */
|
||||
public void connect(final PipedConsoleInput input, final PipedConsoleOutput output,
|
||||
final BufferedReader promptStream) {
|
||||
inputManager.setManager(input);
|
||||
|
@ -45,13 +45,15 @@ import net.bigeon.gclc.ConsoleApplication;
|
||||
import net.bigeon.gclc.utils.PipedConsoleInput;
|
||||
import net.bigeon.gclc.utils.PipedConsoleOutput;
|
||||
|
||||
/** A SWT component to connect to gclc {@link ConsoleApplication}
|
||||
* <p>
|
||||
/** A SWT component to connect to gclc {@link ConsoleApplication}.
|
||||
*
|
||||
* @author Emmanuel Bigeon */
|
||||
public final class SWTConsoleView extends Composite {
|
||||
/** The input manager. */
|
||||
private final ConsoleInputManager inManager;
|
||||
/** The output manager. */
|
||||
private final ConsoleOutputManager outManager;
|
||||
|
||||
/** Create the composite.
|
||||
*
|
||||
* @param parent the prent composite
|
||||
@ -73,11 +75,6 @@ public final class SWTConsoleView extends Composite {
|
||||
consoleInput.addKeyListener(new HistoryTextKeyListener(inManager));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkSubclass() {
|
||||
// Disable the check that prevents subclassing of SWT components
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.swt.widgets.Composite#setFocus() */
|
||||
@Override
|
||||
@ -95,12 +92,16 @@ public final class SWTConsoleView extends Composite {
|
||||
inManager.setManager(input);
|
||||
}
|
||||
|
||||
/** @return the inManager */
|
||||
/** Get the manager of console input.
|
||||
*
|
||||
* @return the input manager */
|
||||
public ConsoleInputManager getInputManager() {
|
||||
return inManager;
|
||||
}
|
||||
|
||||
/** @return the outManager */
|
||||
/** Get the manager of console output.
|
||||
*
|
||||
* @return the output manager */
|
||||
public ConsoleOutputManager getOutputManager() {
|
||||
return outManager;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user