[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci Dept] / [R J Botting] / [Samples] / java.1.2.classes
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Sep 18 15:25:49 PDT 2007

Contents


    Java Application Programmers Interface

      See [ java.html ] for an introduction to Java and [ java.class.tree.html ] for the simpler and earlier Application Programmers Interface -- -- --(API)
      Also check out [ java.classes.html ] which displays the core class hierarchicy with properties and selected fields and methods.

      The Java Application Programmers Interface 1.2

      The Java 1.2 API was once indexed and documented by Sun.

      Notes

      Applets

    1. Applet::@Panel,
    2. AppletContext::TBA
    3. AppletStub::TBA

      User Interface Classes

        Components

      1. Component::@Object, Components in a Graphic User Interface including: Button, List, TextField, TextArea, CheckBox, CheckBoxGroup, Dialog, Frame, Scrollbar, Choice, Canvas, Frame, Panel, Window.

      2. Button::@Component,

      3. Checkbox::@Component,
      4. CheckboxGroup::@Component,

      5. Choice::@Component,

      6. Container::@Component, A class of graphical User interface objects that can contain a varying number of other graphic objects (Component). All Containers have a LayoutManager and a way to add and remove components.

      7. Label::@Component,

      8. List::@Component, List of items in a scrollable window allowing the user to select one of them.

      9. Panel::@Container, rectangular area containing other Components?

      10. TextArea::@TextComponent,

      11. TextComponent::@Component,

      12. TextField::@TextComponent,

        Windows and Widgets

      13. Window::=Dialog | Frame,

      14. Frame::@Window,

      15. Scrollbar::TBA.

      16. CheckboxMenuItem::TBA.

      17. Menu::TBA.
      18. MenuBar::TBA.
      19. MenuComponent::@Object,
      20. MenuContainer::TBA.
      21. MenuItem::TBA.
      22. MenuShortCut::@Object.

        Sound

      23. AudioClip::TBA.

        Colors

      24. Color::TBA.
      25. ColorModel::TBA.

      26. DirectColorModel::TBA.

      27. IndexColorModel::TBA.

        Graphics

      28. Canvas::TBA. a Component that permits graphics.

      29. CropImageFilter::TBA.

      30. FilteredImageSource::TBA.

      31. Graphics::@Object, A Graphics object knows how to draw and fill: Rectangles (plain, 3D, or with rounded corners), ovals, arcs, lines, strings, in different Color's, and how to clear rectangles. It uses more abstract classes such as Point, Dimension, and Rectangle.

      32. Image::TBA.
      33. ImageConsumer::TBA.
      34. ImageFilter::TBA.
      35. ImageObserver::TBA.
      36. ImageProducer::TBA.

      37. PixelGrabber::TBA.

      38. Polygon::TBA.

      39. RGBImageFilter::TBA.

        Layouts

      40. BorderLayout::@LayoutManager, A LayoutManager that has a component in the center, top(north), bottom(south), left(west), and right(east) of it, or any subset of these.

      41. CardLayout::@#LayoutManager, A LayoutManager which allows only one of its components to visible at any one time as selected by the show(...) method.

      42. FlowLayout::@#LayoutManager, A LayoutManager a manager that places objects, in the order added across the component and then row by row. Or in columns. In each row items can be centered, left, or right aligned.

      43. GridBagConstraints::TBA.
      44. GridBagLayout::@LayoutMananger, A LayoutManager that is based on a grid but where each component can take up any non-overlapping (tiled) rectangular set of grid rectangles. Complex and clever.

      45. GridLayout::@LayoutManager, A LayoutManager that places components in a simple two dimensional grid with fixed dimensions.

      46. LayoutManager::=BorderLayout | CardLayout | FlowLayout | GridBagLayout | GridLayout. A class of objects that can control the positioning of components inside a Container.

        Event Handling

        Many components(objects in class Component) implement a function like this: component.addTypeListener(l) where l is in a class that implements the TypeListener interface and Type is a name of a type of AWTEvent. The TypeListener interface defines a a void function actionsomething(TypeListener event). The something varies with the Type of the event. Another class can define a class that implements TypeListener by handling the events. It constructs an object of this tpe and passes it to the component using the addTypeListener function. When events occur the implemented function is called with arguments defining the event.
         	anXListener---implements--->interface----used by---->aComponent
         	anXListener-passed by-addXListener(anXListener)-to-->aComponent
         	anXListener<------gets called when an XEvent hits----aComponent
        A more detailed model using the Unified Modeling Language can be downloaded: [ listener.mdl ] and viewed with Rational Rose.

        To support this model Java1.2 makes it easier to construct and object and and describe its class in a single statement [ html#anonymous_class_object ] -- without having to name the class.

      47. AWTEvent::abstract_class=ActionEvent | ItemEvent | WindowEvent | ComponentEvent | AdjustmentEvent | MouseEvent | KeyEvent | FocusEvent. All these events have a getSource() method that tells a listener which object generated the event.

        The event handling uses grouped classes of AWTEvents, addListener functions, Listener interfaces, and Adapter classes. To implement one of the interfaces below the class must (1) state that it "implements Interface_name" in its header and (2) define all the functions listed in the interface. The Adapter classes supply default empty functions for the functions in the interface, so by extending an Adapter class you only have to defined the listening functions that do something.

        EventSent byToAdded byAdapter
        ActionEvent Button,List,MenuItem,TextField ActionListener:actionPerformed addActionListener ActionAdapter
        AdjustmentEvent Scrollbar AdjustmentListener:adjustmentValueChanged addAdjustmentListener AdjustmentAdapter
        ComponentEvent Dialog, Frame ComponentListener:componentMoved,componentHidden,componentResized,ComponentShown addComponentListener ComponentAdapter
        FocusEvent any Component FocusListener:focusGained,focusLost addFocusListener FocusAdapter
        ItemEvent Checkbox,CheckboxMenuItem,Choice,List ItemListener:itemStateChanged addItemListener ItemAdjuster
        KeyEvent any Component KeyListener:keyPressed,keyReleased,keyTyped addKeyListener KeyAdapter

        MouseEvent Canvas,Dialog,Frame,Panel,Window. MouseListener:mouseDragged,mousePressed,mouseClicked,mouseEntered,mouseExited addMouseListener MouseAdapter
        WindowEvent Dialog,Frame. WindowListener:windowClosing, windowOpened, windowIconified,windowDeiconified,windowClosed addWindowListener WindowAdapter
        MouseMovedEvent etc

      48. ActionEvent::@AWTEvent, sent by Button, List, MenuItem, and TextField.
      49. addActionListener::=add ActionListener (_) to the components list of listeners
      50. ActionListener::interface= { actionPerformed(ActionEvent) }.
      51. ActionAdapter::abstract_class, provides empty functions for the interface.

      52. AdjustmentEvent::@AWTEvent, sent by Scrollbar
      53. addAdjustmentEvent::=add AdjustmentListener (_) to the components list of listeners
      54. AdjustmentListener::interface={ adjustmentValueChanged(AdjustmentEvent)}.
      55. AdjustmentAdapter::abstract_class, provides empty functions for the interface.

      56. ComponentEvent::@AWTEvent, sent by Dialog and Frame.
      57. addComponentListener::=add ComponentListener (_) to the components list of listeners
      58. ComponentListener::interface={componentMoved(ComponentEvent),componentHidden(ComponentEvent),componentResized(ComponentEvent),componentShown(ComponentEvent)}.
      59. ComponentAdapter::abstract_class, provides empty functions for the interface.

      60. FocusEvent::@AWTEvent, could be sent by any Component.
      61. addFocusListener::=add FocusListener (_) to the components list of listeners
      62. FocusListener::interface={ focusGained(FocusEvent), focusLost(FocusEvent)}.
      63. FocusAdapter::abstract_class, provides empty functions for the interface.

      64. ItemEvent::@AWTEvent, sent by objects in classes Checkbox, CheckboxMenuItem, Choice, List.
      65. addItemListener::=add ItemListener (_) to the components list of listeners
      66. ItemListener::interface={ itemStateChanged(ItemEvent) }.
      67. ItemAdapter::abstract_class, provides empty functions for the interface.

      68. IOEvent::=KeyEvent | MouseEvent.

      69. KeyEvent::@AWTEvent, can be sent by any object in class Component.
      70. addKeyListener::=add KeyListener (_) to the components list of listeners
      71. KeyListener::interface={ keyPressed(KeyEvent), keyReleased(KeyEvent). keyTyped(KeyEvent)}
      72. KeyAdapter::abstract_class, provides empty functions for the interface.

      73. MouseEvent::@AWTEvent, Can be sent by objects that are: Canvas, Dialog, Frame, Panel, Window.
      74. addMouseListener::=add MouseListener (_) to the components list of listeners
      75. MouseListener::interface={ mouseDragged(MouseEvent),mousePressed(MouseEvent),mouseClicked(MouseEvent),mouseEntered(MouseEvent),mouseExited(MouseEvent)}.
      76. MouseAdapter::abstract_class, provides empty functions for the interface.

        There is also a set of MouseMovedEvents...

      77. WindowEvent::@AWTEvent, can be sent by objects in Dialog and Frame.
      78. addWindowListener::=add WindowListener (_) to the components list of listeners
      79. WindowListener::interface={ windowClosing(WindowEvent), windowOpened(WindowEvent), windowIconified(WindowEvent),windowDeiconified(WindowEvent),windowClosed(WindowEvent)}.
      80. WindowAdapter::abstract_class, provides empty functions for the interface.

        Swing

        Swing is a new and powerful set of "light weight" classes for producing user interfaces. It is unwise to mix the older AWT and newer Swing classes -- especially avoid placing or adding a heavyweight AWT component into a lightweight one. Swing is part of the Java Foundation Classes --(JVC).

        The Swing classes use the MVC pattern:

      81. MVC::="Model, View and Controller", originally develope for Smalltalk. The "View" encapsulates how data is displayed. It accesses data held in a separate "Model" class. If the "Model" data changes then the "View" is informed and redisplays the new data. The "Controller" determines how the user interacts with the data in the Model and so changes. The "View" is responsible for sending gestures and events to the controller which, in turn, requests changes in the model,...

      82. JComponent::@Container.
      83. JList::@JComponent=TBA.
      84. JMenuBar::@JComponent=TBA.
      85. JOptionPane::@JComponent=TBA.
      86. JPanel::@JComponent=TBA.
      87. JPopupMenu::@JComponent=TBA.
      88. JProgessBar::@JComponent=TBA.
      89. JRootPanel::@JComponent=TBA.
      90. JScrollBar::@JComponent=TBA.
      91. JSlider::@JComponent=TBA.
      92. JScrollPane::@JComponent=TBA.
      93. JTabbedPane::@JComponent=TBA.
      94. JTableHeader::@JComponent=TBA.
      95. JToolBar::@JComponent=TBA.
      96. JTree::@JComponent=TBA.
      97. AbstractButton::@JComponent=TBA.
      98. JToggleButton::@AbstractButton=TBA.
      99. JCheckBox::@JToggleButton=TBA.
      100. JRadioButton::@JToggleButton=TBA.
      101. JButton::@AbstractButton=TBA.
      102. JMenuItem::@AbstractButton=TBA.
      103. JCheckBoxMenuItem::@JMenuItem=TBA.
      104. JMenu::@JMenuItem=TBA.
      105. JRadioButtonMenuItem::@JMenuItem=TBA.
      106. JColorChooser::@JComponent=TBA.
      107. JComboBox::@JComponent=TBA.
      108. JDesktopIcon::@JComponent=TBA.
      109. JFileChooser::@JComponent=TBA.
      110. JLabel::@JComponent=TBA.
      111. JInternalFrame::@JComponent=TBA.
      112. JLayeredFrame::@JComponent=TBA. See JDesktoPlane.
      113. JDesktopPane::@JLayeredPane=TBA.
      114. JSeparator::@JComponent=TBA.
      115. JSplitPane::@JComponent=TBA.
      116. JTable::@JComponent=TBA.
      117. JToolTip::@JComponent=TBA.
      118. JViewPort::@JComponent=TBA.
      119. JTextComponent::@JComponent=TBA. Extended as JTextComponent, JTextField, JEditorPane.
      120. JTextArea::@JTextComponent=TBA.
      121. JTextField::@JTextComponent=TBA.
      122. JEditorPane::@JTextComponent=TBA.
      123. JPasswordField::@JTextArea=TBA.

      . . . . . . . . . ( end of section User Interface Classes) <<Contents | End>>

      Input/Output

      1. BufferedInputStream::TBA.
      2. BufferedOutputStream::TBA.

      3. ByteArrayInputStream::TBA.
      4. ByteArrayOutputStream::TBA.

      5. DataInput::TBA.
      6. DataInputStream::TBA.
      7. DataOutput::TBA.
      8. DataOutputStream::TBA.

      9. File::TBA.
      10. FileDescriptor::TBA.
      11. FileDialog::TBA.
      12. FileInputStream::TBA.
      13. FilenameFilter::TBA.
      14. FileOutputStream::TBA.

      15. FilterInputStream::TBA.
      16. FilterOutputStream::TBA.

      17. Reader::abstract_class=BufferedReader | CharArrayReader | FileReader | PipedReader | StringReader.
      18. BufferedReader::@Reader.
      19. CharArrayReader::@Reader.
      20. FileReader::@Reader.
      21. PipedReader::@Reader.
      22. StringReader::@Reader.

      23. Writer::abstract_class=BufferedWriter | CharArrayWriter | FileWriter | PipedWriter | StringWriter.
      24. BufferedWriter::@Writer.
      25. CharArrayWriter::@Writer.
      26. FileWriter::@Writer.
      27. PipedWriter::@Writer.
      28. StringWriter::@Writer.

      29. InputStream::TBA.

      30. LineNumberInputStream::TBA.

      31. OutputStream::TBA.

      32. PipedInputStream::TBA.
      33. PipedOutputStream::TBA.

      34. PrintStream::TBA.

      35. PushbackInputStream::TBA.

      36. RandomAccessFile::TBA.

      37. SequenceInputStream::TBA.

      38. StreamTokenizer::TBA.
      39. StringBufferInputStream::TBA.

      Networking

    4. DatagramPacket::TBA.
    5. DatagramSocket::TBA.

    6. InetAddress::TBA.

    7. ServerSocket::TBA.
    8. Socket::TBA.
    9. SocketImpl::TBA.
    10. SocketImplFactory::TBA.

    11. URL::TBA.
    12. URLConnection::TBA.
    13. URLEncoder::TBA.
    14. URLStreamHandler::TBA.
    15. URLStreamHandlerFactory::TBA.

      General Purpose Classes

      1. BitSet::TBA.
      2. Boolean::TBA.

      3. Character::TBA. reference to a 16bit Unicode symbol.

      4. Class::TBA.

      5. ClassLoader::TBA.

      6. Cloneable::interface. A Cloneable class implments a clone() function to create copies of the object they apply to.

      7. Compiler::TBA.

      8. ContentHandler::TBA.
      9. ContentHandlerFactory::TBA.

      10. Date::TBA.

      11. DebuggerCallback::TBA.

      12. Dictionary::@HashTable,

      13. Dimension::TBA. This is an object that can keep track of the int width and hieght of something.

      14. Double::TBA. reference to a double length number.

      15. Enumeration::TBA. Java's iterator.

      16. Event::TBA.

      17. Float::TBA. single length floating point object.

      18. Font::@Object, In JDK1.0 the commonest fonts are Helvetica, TimeRoman, and Courier which caused copyright problems. The names have been changed to SanSerif, Serif, and Monospaced in JDK1.1. This class also defines constants like Font.BOLD, Font.ITALIC, and Font.PLAIN.

      19. FontMetrics::TBA.

      20. Hashtable::@Object, Dictionary is an extension of HashTable,

      21. Insets::TBA.

      22. Integer::TBA.

      23. LocalVariable::TBA.

      24. Long::TBA. a reference to a long integer item of data.

      25. Math::TBA. a collection of useful functions and constants.

      26. MediaTracker::TBA.

      27. MemoryImageSource::TBA.

      28. Number::TBA. superclass of Double, Float, Integer, ...

      29. Object::TBA. the grand-parent of all classes.

      30. Observable::TBA.
      31. Observer::TBA.

      32. Point::@Object, This is not a graphic object but a mathematical object with two integer coordinates called x and y.

      33. Process::TBA.

      34. Properties::@Dictionary,

      35. Random::TBA.

      36. Rectangle::TBA. this not a graphic object but a record of two co-ordinates (x and y) and a pair of dimensions(width and hieght). It comes with a lot of operations including intersection and union.

      37. Runnable::TBA. interface for Classes of objects that have a public void run() function. A Runnable object can be execute by a Thread object in a separate concurrent thread of control.

      38. Runtime::TBA.
      39. RuntimeConstants::TBA.

      40. SecurityManager::TBA.

      41. Stack::TBA. a specialized Vector.

      42. String::TBA. a fixed sequence of characters.
      43. StringBuffer::TBA. a variable sequence of characters.
      44. StringTokenizer::TBA.

      45. System::TBA.

      46. Thread::TBA.
      47. ThreadDeath::TBA.
      48. ThreadGroup::TBA.

      49. Toolkit::TBA.

      50. Vector::TBA. a dynamic array.

      . . . . . . . . . ( end of section General Purpose Classes) <<Contents | End>>

      Errors and Exceptions

    16. Throwable::=Exception | Error, includes Exceptions and Errors, Something that can appear in throw and catch statements.
      • Error::TBA.
      • Exception::TBA. unuusual situations things that a normal programmer can be expected to sort out.
        • RuntimeException::TBA. things that a programmer may explicitly catching or throwing.
        • Other exceptions either have to be caught or the code must decalre that it throws them.

    17. AbstractMethodError::@Error,

    18. ArithmeticException::TBA.
    19. ArrayIndexOutOfBoundsException::TBA.
    20. ArrayStoreException::TBA.

    21. AWTError::@Error,
    22. AWTException::TBA.

    23. ClassCastException::TBA.
    24. ClassCircularityError::@Error,
    25. ClassFormatError::@Error,

    26. ClassNotFoundException::TBA.

    27. CloneNotSupportedException::TBA.

    28. EmptyStackException::TBA.

    29. EOFException::TBA.

    30. IllegalAccessError::@Error,
    31. IllegalAccessException::TBA.
    32. IllegalArgumentException::TBA.
    33. IllegalMonitorStateException::TBA.
    34. IllegalThreadStateException::TBA.

    35. IncompatibleClassChangeError::@Error,

    36. IndexOutOfBoundsException::TBA.

    37. InstantiationError::@Error,
    38. InstantiationException::TBA.

    39. InternalError::@Error,

    40. InterruptedException::TBA.
    41. InterruptedIOException::TBA.
    42. IOException::TBA.

    43. LinkageError::@Error,

    44. MalformedURLException::TBA.

    45. NegativeArraySizeException::TBA.
    46. NoClassDefFoundError::@Error,
    47. NoSuchElementException::TBA.
    48. NoSuchFieldError::@Error,
    49. NoSuchMethodError::@Error,
    50. NoSuchMethodException::TBA.
    51. NullPointerException::TBA.

    52. NumberFormatException::TBA.

    53. OutOfMemoryError::@Error,

    54. ProtocolException::TBA.

    55. SecurityException::TBA.

    56. SocketException::TBA.

    57. StackOverflowError::@Error,

    58. StringIndexOutOfBoundsException::TBA.

    59. UnknownError::@Error,
    60. UnknownHostException::TBA.
    61. UnknownServiceException::TBA.
    62. UnsatisfiedLinkError::@Error,

    63. UTFDataFormatException::TBA.

    64. VerifyError::@Error,
    65. VirtualMachineError::@Error,

      Glossary

    66. TBA::="To Be Announced".
    67. abstract_class::=`A class with one or more abstract functions. No objects can be made for this class but there can be references to abstract_classes and classes derived from them that are not abstract.
    68. interface::=a list of public abstract methods(functions) that other classes can implement. A variable can refer to any object that implements an interface but no objects can be created for an interface directly.

    . . . . . . . . . ( end of section Java Application Programmers Interface) <<Contents | End>>

End