Class TextEditor

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CommandObject

public class TextEditor extends Panel implements CommandObject, ActionListener
See Also:
  • Field Details

  • Constructor Details

    • TextEditor

      public TextEditor()
      Constructor
  • Method Details

    • addGridComponent

      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
    • setCommandContext

      public void setCommandContext(String verb, DataHandler dh) throws IOException
      Description copied from interface: CommandObject
      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.
      Specified by:
      setCommandContext in interface CommandObject
      Parameters:
      verb - The Command Verb this object refers to.
      dh - The DataHandler.
      Throws:
      IOException - for failures accessing data
    • setInputStream

      public void setInputStream(InputStream ins) throws IOException
      set the data stream, component to assume it is ready to be read.
      Parameters:
      ins - the data stream
      Throws:
      IOException - for I/O errors
    • performSaveOperation

      private void performSaveOperation()
    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class Panel
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class Container
    • actionPerformed

      public void actionPerformed(ActionEvent evt)
      Specified by:
      actionPerformed in interface ActionListener