org.gnu.gnomevte
public class Terminal extends Widget
Constructor Summary | |
---|---|
protected | Terminal(Handle handle)
Used in the bindings development.
|
Terminal()
Creates a new Termina widget.
| |
Terminal(String command, String[] args, String workingDir)
Creates a new Terminal widget and executes command inside it.
|
Method Summary | |
---|---|
void | addListener(TerminalListener listener)
Registers a TerminalListener to handle generic terminal events. |
void | addListener(CommitListener listener)
Registers a TerminalCommitListener to handle terminal commit events. |
void | addListener(CharacterSizeChangedListener listener)
Registers a TerminalCharacterSizeChangedListener to handle terminal character
size change events. |
void | addListener(MoveWindowListener listener)
Registers a TerminalMoveWindowListener to handle terminal move window events. |
void | addListener(ResizeWindowListener listener)
Registers a TerminalResizeWindowListener to handle terminal resize window events. |
void | addListener(TextScrolledListener listener)
Registers a TerminalTextScrolledListener to handle terminal text scroll events. |
void | copyClipboard()
Copy currently selected text to the clipboard. |
void | copyPrimary() |
void | feed(String data)
Send data to the terminal to display to handle in some way.
|
void | feedChild(String data)
Send data to the terminal's forked command to handle in some way.
|
protected void | fireTerminalCharacterSizeChangedEvent(CharacterSizeChangedEvent event)
This method invokes all the TerminalCharacterSizeChangedListener that are registered
with this instance of a Terminal. |
protected void | fireTerminalCommitEvent(CommitEvent event)
This method invokes all the TerminalCommitListeners that are registered
with this instance of a Terminal. |
protected void | fireTerminalEvent(TerminalEvent event)
This method invokes all the TerminalListeners that are registered
with this instance of a Terminal. |
protected void | fireTerminalMoveWindowEvent(MoveWindowEvent event)
This method invokes all the TerminalMoveWindowListener that are registered
with this instance of a Terminal. |
protected void | fireTerminalResizeWindowEvent(ResizeWindowEvent event)
This method invokes all the TerminalResizeWindowListeners that are registered
with this instance of a Terminal. |
protected void | fireTerminalTextScrolledEvent(TextScrolledEvent event)
This method invokes all the TerminalTextScrolledListeners that are registered
with this instance of a Terminal. |
int | forkCommand(String command, String[] args, String directory, boolean lastlog, boolean utmp, boolean wtmp)
Forks the command and show it inside the widget.
|
Adjustment | getAdjustment()
Get the Adjustment which is the "model" object for Terminal. |
boolean | getAllowBold()
Checks whether or not the terminal will attempt to draw bold text
by repainting text with a one-pixel offset. |
String | getEmulation()
Queries the terminal for its current emulation, as last set by a
call to setEmulation(). |
String | getEncoding()
Determines the name of the encoding in which the terminal expects
data to be encoded. |
FontDescription | getFont()
Queries the terminal for information about the fonts which will be
used to draw text in the terminal. |
String | getStatusLine()
Some terminal emulations specify a status line which is separate from
the main display area, and define a means for applications to move the
cursor to the status line and back.
|
boolean | hasSelection()
Checks if the terminal currently contains selected text.
|
boolean | isBellAudible()
Get the terminal's audible bell state.
|
boolean | isBellVisible()
Get the terminal's audible bell state.
|
void | pasteClipboard()
Paste clipboard text from the clipboard to the terminal. |
void | pastePrimary() |
void | removeListener(TerminalListener listener)
Removes the given TerminalListener. |
void | removeListener(CommitListener listener)
Removes the given TerminalCommitListener. |
void | removeListener(CharacterSizeChangedListener listener)
Removes the given TerminalCharacterSizeChangedListener. |
void | removeListener(MoveWindowListener listener)
Removes the given TerminalMoveWindowListener. |
void | removeListener(ResizeWindowListener listener)
Removes the given TerminalResizeWindowListener. |
void | removeListener(TextScrolledListener listener)
Removes the given TerminalTextScrolledListener. |
void | reset(boolean full, boolean clearHistory)
Resets as much of the terminal's internal state as possible,
discarding any unprocessed input data, resetting character
attributes, cursor state, national character set state, status
line, terminal modes (insert/delete), selection state, and encoding.
|
void | setAllowBold(boolean allowBold)
Controls whether or not the terminal will attempt to draw bold
text by repainting text with a different offset. |
void | setAudibleBell(boolean audible)
Set the terminal's audible bell.
|
void | setBackgroudColor(Color color) |
void | setBackgroudImage(String file) |
void | setBackgroundColor(Color color)
Sets the background color for text which does not have a specific
background color assigned. |
void | setBackgroundImage(String file)
Set the file as the background image of the terminal.
|
void | setBackgroundImage(Pixbuf image)
Sets the background image for the widget. |
void | setBackgroundSaturation(int saturation)
Sets the terminal's background saturation level.
|
void | setBackgroundTransparent(boolean transparent)
Sets the terminal backgroud transparent or not.
|
void | setColorBold(Color color)
Sets the color used to draw bold text in the default foreground color. |
void | setColorDim(Color color)
Sets the color used to draw dim text in the default foreground color.
|
void | setColors(Color fgcolor, Color bgcolor, Color palett, int size)
The terminal widget uses a 28-color model comprised of the default
foreground and background colors, the bold foreground color, the
dim foreground color, an eight color palette, and bold versions of
the eight color palette, and a dim version of the the eight color
palette.
size must be either 0, 8, 16, or 24. |
void | setCursorBlinks(boolean blinks)
Set whether or not the cursor blinks.
|
void | setDefaultColors()
Restores the default colors.
|
void | setEmulation(String emulation)
Sets what type of terminal the widget attempts to emulate by scanning
for control sequences defined in the system's termcap file. |
void | setEncoding(String codeset)
Changes the encoding the terminal will expect data from the child
to be encoded with. |
void | setFont(FontDescription font)
Sets the font used for rendering all text displayed by the terminal.
|
void | setForegroundColor(Color color)
Sets the foreground color used to draw normal text |
void | setPty(int pty_master)
Associate a pty file descriptor with the terminal
|
void | setScrollbackLines(int lines)
Set the number of scrollback lines.
|
void | setScrollOnKeystroke(boolean scrollOnKeystroke)
If true, scrolls the widget down when pressing following the keyboard press.
|
void | setScrollOnOutput(boolean scrollOnOutput)
If true, scrolls the widget down following the output.
|
void | setSize(int columns, int rows)
Set the terminal's size.
|
void | setVisibleBell(boolean visible)
Set the terminal's visible bell state.
|
static Terminal | terminalAndShell()
Creates an new Terminal widget and launches a shell inside it.
|
Terminal ()
or Terminal (command, args, workingDir)
instead.command
inside it.
Parameters: command Command launched inside the terminal. args arguments passed to the command
. workingDir working directory passed to the process.
Parameters: listener the listener to register.
Parameters: listener the listener to register.
Parameters: listener the listener to register.
Parameters: listener the listener to register.
Parameters: listener the listener to register.
Parameters: listener the listener to register.
Parameters: data Sent to the terminal.
Parameters: data Sent to the terminal.
Parameters: event the event to fire.
Parameters: event the event to fire.
Parameters: event the event to fire.
Parameters: event the event to fire.
Parameters: event the event to fire.
Parameters: event the event to fire.
command
and show it inside the widget.
Parameters: command program to launch in a new process. args The argument list available to the executed program. directory working directory available to the executed program. FIXME: investigate the meaning of laslog, utmp, wtmp.
Returns: Integer representing the process id.
Returns: The adjustment model
Returns: boolean
Returns: String
Returns: String
Returns: FontDescription
Returns: the current contents of the terminal's status line. For terminals like "xterm", this will usually be the empty string.
Returns: true
if the terminal has a selection.
Returns: The audible bell state.
Returns: The visual bell state
Parameters: listener the listener to remove.
Parameters: listener the listener to remove.
Parameters: listener the listener to remove.
Parameters: listener the listener to remove.
Parameters: listener the listener to remove.
Parameters: listener the listener to remove.
Parameters: full true to reset tabstops clearHistory true to empty the terminal's scrollback buffer
Parameters: allowBold
Parameters: audible If true, the terminal emits a Bip to attract users attention.
Parameters: color
file
as the background image of the terminal.
Parameters: file File to set as background.
Throws: FileNotFoundException if the image doesn't exist.
Parameters: image
Parameters: saturation The saturation level.
Parameters: transparent Transparent if true
.
Parameters: color
Parameters: color
Parameters: fgcolor bgcolor palett size
Parameters: blinks If true, blinks.
Parameters: emulation
Parameters: codeset
Parameters: color
Parameters: pty_master pty fd
Parameters: lines The number of lines to save in the buffer.
Parameters: scrollOnKeystroke If true, scroll.
Parameters: scrollOnOutput If true, scroll.
Parameters: columns The terminal's width. rows The terminal's height.
Parameters: visible If true, the terminal blinks to attract users attention.
Returns: The widget with a shell in it.