Top Fields Constructors Methods
com.sun.activation.viewers

public Class TextEditor

extends Panel
implements CommandObject, ActionListener
Class Inheritance
All Implemented Interfaces
java.awt.event.ActionListener, java.util.EventListener, javax.activation.CommandObject
Imports
java.awt.*, java.awt.event.*, java.io.*, java.beans.*, javax.activation.*

Field Summary

Modifier and TypeField and Description
private DataHandler
private Panel
private InputStream
private boolean
private FileInputStream
private GridBagLayout
private Button
private TextArea
private String
private File

Constructor Summary

AccessConstructor and Description
public
TextEditor()

Constructor

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent
the event to be processed
evt
)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.
private void
addGridComponent(Container cont, Component comp, GridBagLayout mygb, int gridx, int gridy, int gridw, int gridh, int weightx, int weighty)

adds a component to our gridbag layout

public void
addNotify()

Overrides java.awt.Panel.addNotify.

Creates the Panel's peer.
public Dimension
getPreferredSize()

Overrides java.awt.Container.getPreferredSize.

Returns the preferred size of this container.
private void
public void
setCommandContext(String
The Command Verb this object refers to.
verb
,
DataHandler
The DataHandler.
dh
)

Implements javax.activation.CommandObject.setCommandContext.

Initialize the Command with the verb it is requested to handle and the DataHandler that describes the data it will operate on

Note

it is acceptable for the caller to pass null as the value for DataHandler.

public void
setInputStream(InputStream ins)

set the data stream, component to assume it is ready to be read.

Inherited from java.awt.Panel:
getAccessibleContext

Field Detail

_dhback to summary
private DataHandler _dh
button_panelback to summary
private Panel button_panel
data_insback to summary
private InputStream data_ins
DEBUGback to summary
private boolean DEBUG
fisback to summary
private FileInputStream fis
panel_gbback to summary
private GridBagLayout panel_gb
save_buttonback to summary
private Button save_button
text_areaback to summary
private TextArea text_area
text_bufferback to summary
private String text_buffer
text_fileback to summary
private File text_file

Constructor Detail

TextEditorback to summary
public TextEditor()

Constructor

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent evt)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

Parameters
evt:ActionEvent

the event to be processed

addGridComponentback to summary
private void addGridComponent(Container cont, Component comp, GridBagLayout mygb, int gridx, int gridy, int gridw, int gridh, int weightx, int weighty)

adds a component to our gridbag layout

addNotifyback to summary
public void addNotify()

Overrides java.awt.Panel.addNotify.

Doc from java.awt.Panel.addNotify.

Creates the Panel's peer. The peer allows you to modify the appearance of the panel without changing its functionality.

getPreferredSizeback to summary
public Dimension getPreferredSize()

Overrides java.awt.Container.getPreferredSize.

Doc from java.awt.Container.getPreferredSize.

Returns the preferred size of this container. If the preferred size has not been set explicitly by Component#setPreferredSize(Dimension) and this Container has a non-null LayoutManager, then LayoutManager#preferredLayoutSize(Container) is used to calculate the preferred size.

Note

some implementations may cache the value returned from the LayoutManager. Implementations that cache need not invoke preferredLayoutSize on the LayoutManager every time this method is invoked, rather the LayoutManager will only be queried after the Container becomes invalid.

Returns:Dimension

an instance of Dimension that represents the preferred size of this container.

performSaveOperationback to summary
private void performSaveOperation()
setCommandContextback to summary
public void setCommandContext(String verb, DataHandler dh) throws IOException

Implements javax.activation.CommandObject.setCommandContext.

Doc from javax.activation.CommandObject.setCommandContext.

Initialize the Command with the verb it is requested to handle and the DataHandler that describes the data it will operate on

Note

it is acceptable for the caller to pass null as the value for DataHandler.

Parameters
verb:String

The Command Verb this object refers to.

dh:DataHandler

The DataHandler.

Exceptions
IOException:
for failures accessing data
setInputStreamback to summary
public void setInputStream(InputStream ins) throws IOException

set the data stream, component to assume it is ready to be read.