home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-01 | 167.3 KB | 6,993 lines |
- DEF_COMPONENTNAME
- Dialog
- DEF_SUPERCLASS
- Window
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A class that produces a dialog - a window that takes input from the user.
- // The default layout for a dialog is BorderLayout.
- DEF_ENDLIST
- DEF_METHOD
- public Dialog(Frame parent,
- boolean modal)
- // Constructs an initially invisible Dialog. A modal
- // Dialog grabs all the input from the user.
- //
- // Parameters:
- // parent - the owner of the dialog
- // modal - if true, dialog blocks input to other windows when shown
- // See Also:
- // resize, show
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dialog(Frame parent,
- String title,
- boolean modal)
- // Constructs an initially invisible Dialog with a title.
- // A modal Dialog grabs all the input from the user.
- //
- // Parameters:
- // parent - the owner of the dialog
- // title - the title of the dialog
- // modal - if true, dialog blocks input to other windows when shown
- // See Also:
- // resize, show
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void addNotify()
- // Creates the frame's peer. The peer allows us to change the appearance
- // of the frame without changing its functionality.
- //
- // Overrides:
- // addNotify in class Window
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isModal()
- // Returns true if the Dialog is modal. A modal
- // Dialog grabs all the input from the user.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getTitle()
- // Gets the title of the Dialog.
- //
- // See Also:
- // setTitle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setTitle(String title)
- // Sets the title of the Dialog.
- //
- // Parameters:
- // title - the new title being given to the Dialog
- // See Also:
- // getTitle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isResizable()
- // Returns true if the user can resize the frame.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setResizable(boolean resizable)
- // Sets the resizable flag.
- //
- // Parameters:
- // resizable - true if resizable; false otherwise
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected String paramString()
- // Returns the parameter String of this Dialog.
- //
- // Overrides:
- // paramString in class Container
- //
- //
- DEF_ENDLIST
- DEF_PROPERTY
- Title
- String
- setTitle(AVALUE);
- AVALUE = getTitle();
- ""
- DEF_ENDLIST
- DEF_PROPERTY
- Resizable
- boolean
- setResizable(AVALUE);
- AVALUE = getResizable();
- false
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Dimension
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A class to encapsulate a width and a height Dimension.
- DEF_ENDLIST
- DEF_METHOD
- public Dimension()
- // Constructs a Dimension with a 0 width and 0 height.
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension(Dimension d)
- // Constructs a Dimension and initializes it to the specified value.
- //
- // Parameters:
- // d - the specified dimension for the width and height values
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension(int width,
- int height)
- // Constructs a Dimension and initializes it to the specified width and
- // specified height.
- //
- // Parameters:
- // width - the specified width dimension
- // height - the specified height dimension
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns the String representation of this Dimension's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Event
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Event is a platform-independent class that encapsulates events from
- // the local Graphical User Interface(GUI) platform.
- DEF_ENDLIST
- DEF_EVENT
- public Event(Object target,
- long when,
- int id,
- int x,
- int y,
- int key,
- int modifiers,
- Object arg)
- // Constructs an event with the specified target component, time stamp,
- // event type, x and y coordinates, keyboard key, state of the modifier
- // keys and argument.
- //
- // Parameters:
- // target - the target component
- // when - the time stamp
- // id - the event type
- // x - the x coordinate
- // y - the y coordinate
- // key - the key pressed in a keyboard event
- // modifiers - the state of the modifier keys
- // arg - the specified argument
- //
- //
- DEF_ENDLIST
- DEF_EVENT
- public Event(Object target,
- long when,
- int id,
- int x,
- int y,
- int key,
- int modifiers)
- // Constructs an event with the specified target component, time stamp,
- // event type, x and y coordinates, keyboard key, state of the modifier
- // keys and an argument set to null.
- //
- // Parameters:
- // target - the target component
- // when - the time stamp
- // id - the event type
- // x - the x coordinate
- // y - the y coordinate
- // key - the key pressed in a keyboard event
- // modifiers - the state of the modifier keys
- //
- //
- DEF_ENDLIST
- DEF_EVENT
- public Event(Object target,
- int id,
- Object arg)
- // Constructs an event with the specified target component,
- // event type, and argument.
- //
- // Parameters:
- // target - the target component
- // id - the event type
- // arg - the specified argument
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void translate(int x,
- int y)
- // Translates an event relative to the given component. This
- // involves at a minimum translating the coordinates so they make
- // sense within the given component. It may also involve
- // translating a region in the case of an expose event.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean shiftDown()
- // Checks if the shift key is down.
- //
- // See Also:
- // modifiers, controlDown, metaDown
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean controlDown()
- // Checks if the control key is down.
- //
- // See Also:
- // modifiers, shiftDown, metaDown
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean metaDown()
- // Checks if the meta key is down.
- //
- // See Also:
- // modifiers, shiftDown, controlDown
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected String paramString()
- // Returns the parameter String of this Event.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns the String representation of this Event's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FileDialog
- DEF_SUPERCLASS
- Dialog
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // The File Dialog class displays a file selection dialog. It is a
- // modal dialog and will block the calling thread when the show method
- // is called to display it, until the user has chosen a file.
- //
- // See Also:
- // show
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileDialog(Frame parent,
- String title)
- // Creates a file dialog for loading a file.
- //
- // Parameters:
- // parent - the owner of the dialog
- // title - the title of the Dialog
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileDialog(Frame parent,
- String title,
- int mode)
- // Creates a file dialog with the specified title and mode.
- //
- // Parameters:
- // parent - the owner of the dialog
- // title - the title of the Dialog
- // mode - the mode of the Dialog
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void addNotify()
- // Creates the frame's peer. The peer allows us to change the look
- // of the file dialog without changing its functionality.
- //
- // Overrides:
- // addNotify in class Dialog
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMode()
- // Gets the mode of the file dialog.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getDirectory()
- // Gets the directory of the Dialog.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setDirectory(String dir)
- // Set the directory of the Dialog to the specified directory.
- //
- // Parameters:
- // dir - the specific directory
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getFile()
- // Gets the file of the Dialog.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setFile(String file)
- // Sets the file for this dialog to the specified file. This will
- // become the default file if set before the dialog is shown.
- //
- // Parameters:
- // file - the file being set
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FilenameFilter getFilenameFilter()
- // Gets the filter.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setFilenameFilter(FilenameFilter filter)
- // Sets the filter for this dialog to the specified filter.
- //
- // Parameters:
- // filter - the specified filter
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected String paramString()
- // Returns the parameter String of this file dialog.
- // Parameter String.
- //
- // Overrides:
- // paramString in class Dialog
- //
- //
- DEF_ENDLIST
- DEF_PROPERTY
- File
- String
- setFile(AVALUE);
- AVALUE = getFile();
- ""
- DEF_ENDLIST
- DEF_PROPERTY
- Directory
- String
- setDirectory(AVALUE);
- AVALUE = getDirectory();
- "."
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FlowLayout
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- LayoutManager
- DEF_ENDLIST
- DEF_DECLARATION
- // Flow layout is used to layout buttons in a panel. It will arrange
- // buttons left to right until no more buttons fit on the same line.
- // Each line is centered.
- DEF_ENDLIST
- DEF_METHOD
- public FlowLayout()
- // Constructs a new Flow Layout with a centered alignment.
- //
- DEF_ENDLIST
- DEF_METHOD
- public FlowLayout(int align)
- // Constructs a new Flow Layout with the specified alignment.
- //
- // Parameters:
- // align - the alignment value
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FlowLayout(int align,
- int hgap,
- int vgap)
- // Constructs a new Flow Layout with the specified alignment and gap
- // values.
- //
- // Parameters:
- // align - the alignment value
- // hgap - the horizontal gap variable
- // vgap - the vertical gap variable
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void addLayoutComponent(String name,
- Component comp)
- // Adds the specified component to the layout. Not used by this class.
- //
- // Parameters:
- // name - the name of the component
- // comp - the the component to be added
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void removeLayoutComponent(Component comp)
- // Removes the specified component from the layout. Not used by
- // this class.
- //
- // Parameters:
- // comp - the component to remove
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension preferredLayoutSize(Container target)
- // Returns the preferred dimensions for this layout given the components
- // in the specified target container.
- //
- // Parameters:
- // target - the component which needs to be laid out
- // See Also:
- // Container, minimumLayoutSize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension minimumLayoutSize(Container target)
- // Returns the minimum dimensions needed to layout the components
- // contained in the specified target container.
- //
- // Parameters:
- // target - the component which needs to be laid out
- // See Also:
- // preferredLayoutSize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void layoutContainer(Container target)
- // Lays out the container. This method will actually reshape the
- // components in the target in order to satisfy the constraints of
- // the BorderLayout object.
- //
- // Parameters:
- // target - the specified component being laid out.
- // See Also:
- // Container
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns the String representation of this FlowLayout's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Font
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A class that produces font objects.
- DEF_ENDLIST
- DEF_METHOD
- public Font(String name,
- int style,
- int size)
- // Creates a new font with the specified name, style and point size.
- //
- // Parameters:
- // name - the font name
- // style - the constant style used
- // size - the point size of the font
- // See Also:
- // getFontList
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getFamily()
- // Gets the platform specific family name of the font.
- // Use getName to get the logical name of the font.
- //
- // See Also:
- // getName
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getName()
- // Gets the logical name of the font.
- //
- // See Also:
- // getFamily
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getStyle()
- // Gets the style of the font.
- //
- // See Also:
- // isPlain, isBold, isItalic
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getSize()
- // Gets the point size of the font.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isPlain()
- // Returns true if the font is plain.
- //
- // See Also:
- // getStyle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isBold()
- // Returns true if the font is bold.
- //
- // See Also:
- // getStyle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isItalic()
- // Returns true if the font is italic.
- //
- // See Also:
- // getStyle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static Font getFont(String nm)
- // Gets a font from the system properties list.
- //
- // Parameters:
- // nm - the property name
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static Font getFont(String nm,
- Font font)
- // Gets the specified font from the system properties list.
- //
- // Parameters:
- // nm - the property name
- // font - a default font to return if property 'nm' is not defined
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int hashCode()
- // Returns a hashcode for this font.
- //
- // Overrides:
- // hashCode in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean equals(Object obj)
- // Compares this object to the specifed object.
- //
- // Parameters:
- // obj - the object to compare with
- // Returns:
- // true if the objects are the same; false otherwise.
- // Overrides:
- // equals in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Converts this object to a String representation.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FontMetrics
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A font metrics object. Note that the implementations of these
- // methods are inefficient, they are usually overridden with more
- // efficient toolkit specific implementations.
- DEF_ENDLIST
- DEF_METHOD
- protected FontMetrics(Font font)
- // Creates a new FontMetrics object with the specified font.
- //
- // Parameters:
- // font - the font
- // See Also:
- // Font
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Font getFont()
- // Gets the font.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getLeading()
- // Gets the standard leading, or line spacing, for the font.
- // This is the logical amount of space to be reserved between the
- // descent of one line of text and the ascent of the next line.
- // The height metric is calculated to include this extra space.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getAscent()
- // Gets the font ascent. The font ascent is the distance from the
- // base line to the top of the characters.
- //
- // See Also:
- // getMaxAscent
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getDescent()
- // Gets the font descent. The font descent is the distance from the
- // base line to the bottom of the characters.
- //
- // See Also:
- // getMaxDescent
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getHeight()
- // Gets the total height of the font. This is the distance between
- // the baseline of adjacent lines of text. It is the sum of the
- // leading + ascent + descent.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMaxAscent()
- // Gets the maximum ascent of all characters in this Font.
- // No character will extend further above the baseline than this
- // metric.
- //
- // See Also:
- // getAscent
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMaxDescent()
- // Gets the maximum descent of all characters.
- // No character will descend futher below the baseline than this
- // metric.
- //
- // See Also:
- // getDescent
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMaxDecent()
- // For backward compatibility only.
- //
- // See Also:
- // getMaxDescent
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMaxAdvance()
- // Gets the maximum advance width of any character in this Font.
- //
- // Returns:
- // -1 if the max advance is not known.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int charWidth(int ch)
- // Returns the width of the specified character in this Font.
- //
- // Parameters:
- // ch - the specified font
- // See Also:
- // stringWidth
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int charWidth(char ch)
- // Returns the width of the specified character in this Font.
- //
- // Parameters:
- // ch - the specified font
- // See Also:
- // stringWidth
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int stringWidth(String str)
- // Returns the width of the specified String in this Font.
- //
- // Parameters:
- // str - the String to be checked
- // See Also:
- // charsWidth, bytesWidth
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int charsWidth(char data[],
- int off,
- int len)
- // Returns the width of the specified character array in this Font.
- //
- // Parameters:
- // data - the data to be checked
- // off - the start offset of the data
- // len - the maximum number of bytes checked
- // See Also:
- // stringWidth, bytesWidth
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int bytesWidth(byte data[],
- int off,
- int len)
- // Returns the width of the specified array of bytes in this Font.
- //
- // Parameters:
- // data - the data to be checked
- // off - the start offset of the data
- // len - the maximum number of bytes checked
- // See Also:
- // stringWidth, charsWidth
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int[] getWidths()
- // Gets the widths of the first 256 characters in the Font.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns the String representation of this FontMetric's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Frame
- DEF_SUPERCLASS
- Window
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- MenuContainer
- DEF_ENDLIST
- DEF_DECLARATION
- // A Frame is a top-level window with a title.
- // The default layout for a frame is BorderLayout.
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void addNotify()
- // Creates the Frame's peer. The peer allows us to change the look
- // of the Frame without changing its functionality.
- //
- // Overrides:
- // addNotify in class Window
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getTitle()
- // Gets the title of the Frame.
- //
- // See Also:
- // setTitle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setTitle(String title)
- // Sets the title for this Frame to the specified title.
- //
- // Parameters:
- // title - the specified title of this Frame
- // See Also:
- // getTitle
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Image getIconImage()
- // Returns the icon image for this Frame.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setIconImage(Image image)
- // Sets the image to display when this Frame is iconized. Note that
- // not all platforms support the concept of iconizing a window.
- //
- // Parameters:
- // image - the icon image to be displayed
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public MenuBar getMenuBar()
- // Gets the menu bar for this Frame.
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void setMenuBar(MenuBar mb)
- // Sets the menubar for this Frame to the specified menubar.
- //
- // Parameters:
- // mb - the menubar being set
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void remove(MenuComponent m)
- // Removes the specified menu bar from this Frame.
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void dispose()
- // Disposes of the Frame. This method must
- // be called to release the resources that
- // are used for the frame.
- //
- // Overrides:
- // dispose in class Window
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isResizable()
- // Returns true if the user can resize the Frame.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setResizable(boolean resizable)
- // Sets the resizable flag.
- //
- // Parameters:
- // resizable - true if resizable; false otherwise.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setCursor(int cursorType)
- // Set the cursor image to a predefined cursor.
- //
- // Parameters:
- // cursorType - one of the cursor constants defined above.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getCursorType()
- // Return the cursor type
- //
- DEF_ENDLIST
- DEF_METHOD
- protected String paramString()
- // Returns the parameter String of this Frame.
- //
- // Overrides:
- // paramString in class Container
- //
- //
- DEF_ENDLIST
- DEF_PROPERTY
- CursorType
- int
- setCursor(AVALUE);
- AVALUE = getCursorType();
- Frame.DEFAULT_CURSOR
- DEF_ENDLIST
- DEF_PROPERTY
- IconImage
- Image
- setIconImage(AVALUE);
- AVALUE = getIconImage();
- null
- DEF_ENDLIST
- DEF_PROPERTY
- Title
- String
- setTitle(AVALUE);
- AVALUE = getTitle();
- ""
- DEF_ENDLIST
- DEF_PROPERTY
- Resizable
- boolean
- setResizable(AVALUE);
- AVALUE = isResizable();
- false
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Graphics
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Graphics is the abstract base class for all graphic
- // contexts for various devices.
- DEF_ENDLIST
- DEF_METHOD
- protected Graphics()
- // Constructs a new Graphics Object. Graphic contexts cannot be
- // created directly. They must be obtained from another graphics
- // context or created by a Component.
- //
- // See Also:
- // getGraphics, create
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Graphics create()
- // Creates a new Graphics Object that is a copy of the original Graphics Object.
- //
- DEF_ENDLIST
- DEF_METHOD
- public Graphics create(int x,
- int y,
- int width,
- int height)
- // Creates a new Graphics Object with the specified parameters, based on the original
- // Graphics Object.
- // This method translates the specified parameters, x and y, to
- // the proper origin coordinates and then clips the Graphics Object to the
- // area.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the area
- // height - the height of the area
- // See Also:
- // translate
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void translate(int x,
- int y)
- // Translates the specified parameters into the origin of the graphics context. All subsequent
- // operations on this graphics context will be relative to this origin.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Color getColor()
- // Gets the current color.
- //
- // See Also:
- // setColor
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void setColor(Color c)
- // Sets the current color to the specified color. All subsequent graphics operations
- // will use this specified color.
- //
- // Parameters:
- // c - the color to be set
- // See Also:
- // Color, getColor
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void setPaintMode()
- // Sets the paint mode to overwrite the destination with the
- // current color.
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void setXORMode(Color c1)
- // Sets the paint mode to alternate between the current color
- // and the new specified color. When drawing operations are
- // performed, pixels which are the current color will be changed
- // to the specified color and vice versa. Pixels of colors other
- // than those two colors will be changed in an unpredictable, but
- // reversible manner - if you draw the same figure twice then all
- // pixels will be restored to their original values.
- //
- // Parameters:
- // c1 - the second color
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Font getFont()
- // Gets the current font.
- //
- // See Also:
- // setFont
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void setFont(Font font)
- // Sets the font for all subsequent text-drawing operations.
- //
- // Parameters:
- // font - the specified font
- // See Also:
- // Font, getFont, drawString, drawBytes, drawChars
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FontMetrics getFontMetrics()
- // Gets the current font metrics.
- //
- // See Also:
- // getFont
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract FontMetrics getFontMetrics(Font f)
- // Gets the current font metrics for the specified font.
- //
- // Parameters:
- // f - the specified font
- // See Also:
- // getFont, getFontMetrics
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Rectangle getClipRect()
- // Returns the bounding rectangle of the current clipping area.
- //
- // See Also:
- // clipRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void clipRect(int x,
- int y,
- int width,
- int height)
- // Clips to a rectangle. The resulting clipping area is the
- // intersection of the current clipping area and the specified
- // rectangle. Graphic operations have no effect outside of the
- // clipping area.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // See Also:
- // getClipRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void copyArea(int x,
- int y,
- int width,
- int height,
- int dx,
- int dy)
- // Copies an area of the screen.
- //
- // Parameters:
- // x - the x-coordinate of the source
- // y - the y-coordinate of the source
- // width - the width
- // height - the height
- // dx - the horizontal distance
- // dy - the vertical distance
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void drawLine(int x1,
- int y1,
- int x2,
- int y2)
- // Draws a line between the coordinates (x1,y1) and (x2,y2). The line is drawn
- // below and to the left of the logical coordinates.
- //
- // Parameters:
- // x1 - the first point's x coordinate
- // y1 - the first point's y coordinate
- // x2 - the second point's x coordinate
- // y2 - the second point's y coordinate
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void fillRect(int x,
- int y,
- int width,
- int height)
- // Fills the specified rectangle with the current color.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // See Also:
- // drawRect, clearRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void drawRect(int x,
- int y,
- int width,
- int height)
- // Draws the outline of the specified rectangle using the current color.
- // Use drawRect(x, y, width-1, height-1) to draw the outline inside the specified
- // rectangle.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // See Also:
- // fillRect, clearRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void clearRect(int x,
- int y,
- int width,
- int height)
- // Clears the specified rectangle by filling it with the current background color
- // of the current drawing surface.
- // Which drawing surface it selects depends on how the graphics context
- // was created.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // See Also:
- // fillRect, drawRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void drawRoundRect(int x,
- int y,
- int width,
- int height,
- int arcWidth,
- int arcHeight)
- // Draws an outlined rounded corner rectangle using the current color.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // arcWidth - the horizontal diameter of the arc at the four corners
- // arcHeight - the horizontal diameter of the arc at the four corners
- // See Also:
- // fillRoundRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void fillRoundRect(int x,
- int y,
- int width,
- int height,
- int arcWidth,
- int arcHeight)
- // Draws a rounded rectangle filled in with the current color.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // arcWidth - the horizontal diameter of the arc at the four corners
- // arcHeight - the horizontal diameter of the arc at the four corners
- // See Also:
- // drawRoundRect
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void draw3DRect(int x,
- int y,
- int width,
- int height,
- boolean raised)
- // Draws a highlighted 3-D rectangle.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // raised - a boolean that states whether the rectangle is raised or not
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void fill3DRect(int x,
- int y,
- int width,
- int height,
- boolean raised)
- // Paints a highlighted 3-D rectangle using the current color.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // raised - a boolean that states whether the rectangle is raised or not
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void drawOval(int x,
- int y,
- int width,
- int height)
- // Draws an oval inside the specified rectangle using the current color.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // See Also:
- // fillOval
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void fillOval(int x,
- int y,
- int width,
- int height)
- // Fills an oval inside the specified rectangle using the current color.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // See Also:
- // drawOval
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void drawArc(int x,
- int y,
- int width,
- int height,
- int startAngle,
- int arcAngle)
- // Draws an arc bounded by the specified rectangle from startAngle to
- // endAngle. 0 degrees is at the 3-o'clock position.Positive arc
- // angles indicate counter-clockwise rotations, negative arc angles are
- // drawn clockwise.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // startAngle - the beginning angle
- // arcAngle - the angle of the arc (relative to startAngle).
- // See Also:
- // fillArc
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void fillArc(int x,
- int y,
- int width,
- int height,
- int startAngle,
- int arcAngle)
- // Fills an arc using the current color. This generates a pie shape.
- //
- // Parameters:
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the arc
- // height - the height of the arc
- // startAngle - the beginning angle
- // arcAngle - the angle of the arc (relative to startAngle).
- // See Also:
- // drawArc
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void drawPolygon(int xPoints[],
- int yPoints[],
- int nPoints)
- // Draws a polygon defined by an array of x points and y points.
- //
- // Parameters:
- // xPoints - an array of x points
- // yPoints - an array of y points
- // nPoints - the total number of points
- // See Also:
- // fillPolygon
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void drawPolygon(Polygon p)
- // Draws a polygon defined by the specified point.
- //
- // Parameters:
- // p - the specified polygon
- // See Also:
- // fillPolygon
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void fillPolygon(int xPoints[],
- int yPoints[],
- int nPoints)
- // Fills a polygon with the current color using an
- // even-odd fill rule (otherwise known as an alternating rule).
- //
- // Parameters:
- // xPoints - an array of x points
- // yPoints - an array of y points
- // nPoints - the total number of points
- // See Also:
- // drawPolygon
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void fillPolygon(Polygon p)
- // Fills the specified polygon with the current color using an
- // even-odd fill rule (otherwise known as an alternating rule).
- //
- // Parameters:
- // p - the polygon
- // See Also:
- // drawPolygon
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void drawString(String str,
- int x,
- int y)
- // Draws the specified String using the current font and color.
- // The x,y position is the starting point of the baseline of the String.
- //
- // Parameters:
- // str - the String to be drawn
- // x - the x coordinate
- // y - the y coordinate
- // See Also:
- // drawChars, drawBytes
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void drawChars(char data[],
- int offset,
- int length,
- int x,
- int y)
- // Draws the specified characters using the current font and color.
- //
- // Parameters:
- // data - the array of characters to be drawn
- // offset - the start offset in the data
- // length - the number of characters to be drawn
- // x - the x coordinate
- // y - the y coordinate
- // See Also:
- // drawString, drawBytes
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void drawBytes(byte data[],
- int offset,
- int length,
- int x,
- int y)
- // Draws the specified bytes using the current font and color.
- //
- // Parameters:
- // data - the data to be drawn
- // offset - the start offset in the data
- // length - the number of bytes that are drawn
- // x - the x coordinate
- // y - the y coordinate
- // See Also:
- // drawString, drawChars
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract boolean drawImage(Image img,
- int x,
- int y,
- ImageObserver observer)
- // Draws the specified image at the specified coordinate (x, y). If the image is
- // incomplete the image observer will be notified later.
- //
- // Parameters:
- // img - the specified image to be drawn
- // x - the x coordinate
- // y - the y coordinate
- // observer - notifies if the image is complete or not
- // See Also:
- // Image, ImageObserver
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract boolean drawImage(Image img,
- int x,
- int y,
- int width,
- int height,
- ImageObserver observer)
- // Draws the specified image inside the specified rectangle. The image is
- // scaled if necessary. If the image is incomplete the image observer will be
- // notified later.
- //
- // Parameters:
- // img - the specified image to be drawn
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // observer - notifies if the image is complete or not
- // See Also:
- // Image, ImageObserver
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract boolean drawImage(Image img,
- int x,
- int y,
- Color bgcolor,
- ImageObserver observer)
- // Draws the specified image at the specified coordinate (x, y),
- // with the given solid background Color. If the image is
- // incomplete the image observer will be notified later.
- //
- // Parameters:
- // img - the specified image to be drawn
- // x - the x coordinate
- // y - the y coordinate
- // observer - notifies if the image is complete or not
- // See Also:
- // Image, ImageObserver
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract boolean drawImage(Image img,
- int x,
- int y,
- int width,
- int height,
- Color bgcolor,
- ImageObserver observer)
- // Draws the specified image inside the specified rectangle,
- // with the given solid background Color. The image is
- // scaled if necessary. If the image is incomplete the image
- // observer will be notified later.
- //
- // Parameters:
- // img - the specified image to be drawn
- // x - the x coordinate
- // y - the y coordinate
- // width - the width of the rectangle
- // height - the height of the rectangle
- // observer - notifies if the image is complete or not
- // See Also:
- // Image, ImageObserver
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void dispose()
- // Disposes of this graphics context. The Graphics context cannot be used after
- // being disposed of.
- //
- // See Also:
- // finalize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void finalize()
- // Disposes of this graphics context once it is no longer referenced.
- //
- // Overrides:
- // finalize in class Object
- // See Also:
- // dispose
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns a String object representing this Graphic's value.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- GridBagConstraints
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- Cloneable
- DEF_ENDLIST
- DEF_DECLARATION
- // GridBagConstraints is used to specify constraints for components
- // laid out using the GridBagLayout class.
- //
- // See Also:
- // GridBagLayout
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- GridBagLayout
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- LayoutManager
- DEF_ENDLIST
- DEF_DECLARATION
- // GridBagLayout is a flexible layout manager
- // that aligns components vertically and horizontally,
- // without requiring that the components be the same size.
- // Each GridBagLayout uses a rectangular grid of cells,
- // with each component occupying one or more cells
- // (called its display area).
- // Each component managed by a GridBagLayout
- // is associated with a
- // GridBagConstraints instance
- // that specifies how the component is laid out
- // within its display area.
- // How a GridBagLayout places a set of components
- // depends on each component's GridBagConstraints and minimum size,
- // as well as the preferred size of the components' container.
- //
- // To use a GridBagLayout effectively,
- // you must customize one or more of its components' GridBagConstraints.
- // You customize a GridBagConstraints object by setting one or more
- // of its instance variables:
- //
- // gridx,
- // gridy
- // Specifies the cell at the upper left of the component's display area,
- // where the upper-left-most cell has address gridx=0, gridy=0.
- // Use GridBagConstraints.RELATIVE (the default value)
- // to specify that the component be placed
- // just to the right of (for gridx)
- // or just below (for gridy)
- // the component that was added to the container
- // just before this component was added.
- // gridwidth,
- // gridheight
- // Specifies the number of cells in a row (for gridwidth)
- // or column (for gridheight)
- // in the component's display area.
- // The default value is 1.
- // Use GridBagConstraints.REMAINDER to specify
- // that the component be the last one in its row (for gridwidth)
- // or column (for gridheight).
- // Use GridBagConstraints.RELATIVE to specify
- // that the component be the next to last one
- // in its row (for gridwidth) or column (for gridheight).
- // fill
- // Used when the component's display area
- // is larger than the component's requested size
- // to determine whether (and how) to resize the component.
- // Valid values are
- // GridBagConstraint.NONE
- // (the default),
- // GridBagConstraint.HORIZONTAL
- // (make the component wide enough to fill its display area
- // horizontally, but don't change its height),
- // GridBagConstraint.VERTICAL
- // (make the component tall enough to fill its display area
- // vertically, but don't change its width),
- // and
- // GridBagConstraint.BOTH
- // (make the component fill its display area entirely).
- // ipadx,
- // ipady
- // Specifies the internal padding:
- // how much to add to the minimum size of the component.
- // The width of the component will be at least
- // its minimum width plus ipadx*2 pixels
- // (since the padding applies to both sides of the component).
- // Similarly, the height of the component will be at least
- // the minimum height plus ipady*2 pixels.
- // insets
- // Specifies the external padding of the component --
- // the minimum amount of space between the component
- // and the edges of its display area.
- // anchor
- // Used when the component is smaller than its display area
- // to determine where (within the area) to place the component.
- // Valid values are
- // GridBagConstraints.CENTER (the default),
- // GridBagConstraints.NORTH,
- // GridBagConstraints.NORTHEAST,
- // GridBagConstraints.EAST,
- // GridBagConstraints.SOUTHEAST,
- // GridBagConstraints.SOUTH,
- // GridBagConstraints.SOUTHWEST,
- // GridBagConstraints.WEST, and
- // GridBagConstraints.NORTHWEST.
- // weightx,
- // weighty
- // Used to determine how to distribute space;
- // this is important for specifying resizing behavior.
- // Unless you specify a weight
- // for at least one component in a row (weightx)
- // and column (weighty),
- // all the components clump together in the center of
- // their container.
- // This is because when the weight is zero (the default),
- // the GridBagLayout puts any extra space
- // between its grid of cells and the edges of the container.
- //
- // The following figure shows ten components (all buttons)
- // managed by a GridBagLayout:
- //
- //
- //
- // All the components have fill=GridBagConstraints.BOTH.
- // In addition, the components have the following non-default constraints:
- //
- // Button1, Button2, Button3:
- // weightx=1.0
- // Button4:
- // weightx=1.0,
- // gridwidth=GridBagConstraints.REMAINDER
- // Button5:
- // gridwidth=GridBagConstraints.REMAINDER
- // Button6:
- // gridwidth=GridBagConstraints.RELATIVE
- // Button7:
- // gridwidth=GridBagConstraints.REMAINDER
- // Button8:
- // gridheight=2, weighty=1.0,
- // Button9, Button 10:
- // gridwidth=GridBagConstraints.REMAINDER
- //
- // Here is the code that implements the example shown above:
- //
- //
- // import java.awt.*;
- // import java.util.*;
- // import java.applet.Applet;
- // public class GridBagEx1 extends Applet {
- // protected void makebutton(String name,
- // GridBagLayout gridbag,
- // GridBagConstraints c) {
- // Button button = new Button(name);
- // gridbag.setConstraints(button, c);
- // add(button);
- // }
- // public void init() {
- // GridBagLayout gridbag = new GridBagLayout();
- // GridBagConstraints c = new GridBagConstraints();
- // setFont(new Font("Helvetica", Font.PLAIN, 14));
- // setLayout(gridbag);
- // c.fill = GridBagConstraints.BOTH;
- // c.weightx = 1.0;
- // makebutton("Button1", gridbag, c);
- // makebutton("Button2", gridbag, c);
- // makebutton("Button3", gridbag, c);
- // c.gridwidth = GridBagConstraints.REMAINDER; //end row
- // makebutton("Button4", gridbag, c);
- // c.weightx = 0.0; //reset to the default
- // makebutton("Button5", gridbag, c); //another row
- // c.gridwidth = GridBagConstraints.RELATIVE; //next-to-last in row
- // makebutton("Button6", gridbag, c);
- // c.gridwidth = GridBagConstraints.REMAINDER; //end row
- // makebutton("Button7", gridbag, c);
- // c.gridwidth = 1; //reset to the default
- // c.gridheight = 2;
- // c.weighty = 1.0;
- // makebutton("Button8", gridbag, c);
- // c.weighty = 0.0; //reset to the default
- // c.gridwidth = GridBagConstraints.REMAINDER; //end row
- // c.gridheight = 1; //reset to the default
- // makebutton("Button9", gridbag, c);
- // makebutton("Button10", gridbag, c);
- // resize(300, 100);
- // }
- // public static void main(String args[]) {
- // Frame f = new Frame("GridBag Layout Example");
- // GridBagEx1 ex1 = new GridBagEx1();
- // ex1.init();
- // f.add("Center", ex1);
- // f.pack();
- // f.resize(f.preferredSize());
- // f.show();
- // }
- // }
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setConstraints(Component comp,
- GridBagConstraints constraints)
- // Sets the constraints for the specified component.
- //
- // Parameters:
- // comp - the component to be modified
- // constraints - the constraints to be applied
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public GridBagConstraints getConstraints(Component comp)
- // Retrieves the constraints for the specified component. A copy of
- // the constraints is returned.
- //
- // Parameters:
- // comp - the component to be queried
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected GridBagConstraints lookupConstraints(Component comp)
- // Retrieves the constraints for the specified component. The return
- // value is not a copy, but is the actual constraints class used by the
- // layout mechanism.
- //
- // Parameters:
- // comp - the component to be queried
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Point getLayoutOrigin()
- // Adds the specified component with the specified name to the layout.
- //
- // Parameters:
- // name - the name of the component
- // comp - the component to be added
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void removeLayoutComponent(Component comp)
- // Removes the specified component from the layout. Does not apply.
- //
- // Parameters:
- // comp - the component to be removed
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension preferredLayoutSize(Container parent)
- // Returns the preferred dimensions for this layout given the components
- // in the specified panel.
- //
- // Parameters:
- // parent - the component which needs to be laid out
- // See Also:
- // minimumLayoutSize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension minimumLayoutSize(Container parent)
- // Returns the minimum dimensions needed to layout the components
- // contained in the specified panel.
- //
- // Parameters:
- // parent - the component which needs to be laid out
- // See Also:
- // preferredLayoutSize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void layoutContainer(Container parent)
- // Lays out the container in the specified panel.
- //
- // Parameters:
- // parent - the specified component being laid out
- // See Also:
- // Container
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns the String representation of this GridLayout's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected void DumpLayoutInfo(GridBagLayoutInfo s)
- // Print the layout information. Useful for debugging.
- //
- DEF_ENDLIST
- DEF_METHOD
- protected void DumpConstraints(GridBagConstraints constraints)
- // Print the layout constraints. Useful for debugging.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- GridLayout
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- LayoutManager
- DEF_ENDLIST
- DEF_DECLARATION
- // A layout manager for a container that lays out grids.
- DEF_ENDLIST
- DEF_METHOD
- public GridLayout(int rows,
- int cols)
- // Creates a grid layout with the specified rows and columns.
- //
- // Parameters:
- // rows - the rows
- // cols - the columns
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public GridLayout(int rows,
- int cols,
- int hgap,
- int vgap)
- // Creates a grid layout with the specified rows, columns,
- // horizontal gap, and vertical gap.
- //
- // Parameters:
- // rows - the rows; zero means 'any number.'
- // cols - the columns; zero means 'any number.' Only one of 'rows'
- // and 'cols' can be zero, not both.
- // hgap - the horizontal gap variable
- // vgap - the vertical gap variable
- // Throws: IllegalArgumentException
- // If the rows and columns are invalid.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void addLayoutComponent(String name,
- Component comp)
- // Adds the specified component with the specified name to the layout.
- //
- // Parameters:
- // name - the name of the component
- // comp - the component to be added
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void removeLayoutComponent(Component comp)
- // Removes the specified component from the layout. Does not apply.
- //
- // Parameters:
- // comp - the component to be removed
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension preferredLayoutSize(Container parent)
- // Returns the preferred dimensions for this layout given the components
- // int the specified panel.
- //
- // Parameters:
- // parent - the component which needs to be laid out
- // See Also:
- // minimumLayoutSize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dimension minimumLayoutSize(Container parent)
- // Returns the minimum dimensions needed to layout the components
- // contained in the specified panel.
- //
- // Parameters:
- // parent - the component which needs to be laid out
- // See Also:
- // preferredLayoutSize
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void layoutContainer(Container parent)
- // Lays out the container in the specified panel.
- //
- // Parameters:
- // parent - the specified component being laid out
- // See Also:
- // Container
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns the String representation of this GridLayout's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- CropImageFilter
- DEF_SUPERCLASS
- ImageFilter
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- image
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // An ImageFilter class for cropping images.
- // This class extends the basic ImageFilter Class to extract a given
- // rectangular region of an existing Image and provide a source for a
- // new image containing just the extracted region. It is meant to
- // be used in conjunction with a FilteredImageSource object to produce
- // cropped versions of existing images.
- //
- // See Also:
- // FilteredImageSource, ImageFilter
- //
- DEF_ENDLIST
- DEF_METHOD
- public CropImageFilter(int x,
- int y,
- int w,
- int h)
- // Constructs a CropImageFilter that extracts the absolute rectangular
- // region of pixels from its source Image as specified by the x, y,
- // w, and h parameters.
- //
- // Parameters:
- // x - the x location of the top of the rectangle to be extracted
- // y - the y location of the top of the rectangle to be extracted
- // w - the width of the rectangle to be extracted
- // h - the height of the rectangle to be extracted
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setProperties(Hashtable props)
- // Passes along the properties from the source object after adding a
- // property indicating the cropped region.
- //
- // Overrides:
- // setProperties in class ImageFilter
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setDimensions(int w,
- int h)
- // Override the source image's dimensions and pass the dimensions
- // of the rectangular cropped region to the ImageConsumer.
- //
- // Overrides:
- // setDimensions in class ImageFilter
- // See Also:
- // ImageConsumer
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setPixels(int x,
- int y,
- int w,
- int h,
- ColorModel model,
- byte pixels[],
- int off,
- int scansize)
- // Determine whether the delivered byte pixels intersect the region to
- // be extracted and passes through only that subset of pixels that
- // appear in the output region.
- //
- // Overrides:
- // setPixels in class ImageFilter
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setPixels(int x,
- int y,
- int w,
- int h,
- ColorModel model,
- int pixels[],
- int off,
- int scansize)
- // Determine if the delivered int pixels intersect the region to
- // be extracted and pass through only that subset of pixels that
- // appear in the output region.
- //
- // Overrides:
- // setPixels in class ImageFilter
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- DirectColorModel
- DEF_SUPERCLASS
- ColorModel
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- image
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A ColorModel class that specifies a translation from pixel values
- // to alpha, red, green, and blue color components for pixels which
- // have the color components embedded directly in the bits of the
- // pixel itself. This color model is similar to an X11 TrueColor
- // visual.
- // Many of the methods in this class are final. This is because the
- // underlying native graphics code makes assumptions about the layout
- // and operation of this class and those assumptions are reflected in
- // the implementations of the methods here that are marked final. You
- // can subclass this class for other reaons, but you cannot override
- // or modify the behaviour of those methods.
- //
- // See Also:
- // ColorModel
- //
- DEF_ENDLIST
- DEF_METHOD
- public DirectColorModel(int bits,
- int rmask,
- int gmask,
- int bmask)
- // Constructs a DirectColorModel from the given masks specifying
- // which bits in the pixel contain the red, green and blue color
- // components. Pixels described by this color model will all
- // have alpha components of 255 (fully opaque). All of the bits
- // in each mask must be contiguous and fit in the specified number
- // of least significant bits of the integer.
- //
- DEF_ENDLIST
- DEF_METHOD
- public DirectColorModel(int bits,
- int rmask,
- int gmask,
- int bmask,
- int amask)
- // Constructs a DirectColorModel from the given masks specifying
- // which bits in the pixel contain the alhpa, red, green and blue
- // color components. All of the bits in each mask must be contiguous
- // and fit in the specified number of least significant bits of the
- // integer.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getRedMask()
- // Returns the mask indicating which bits in a pixel contain the red
- // color component.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getGreenMask()
- // Returns the mask indicating which bits in a pixel contain the green
- // color component.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getBlueMask()
- // Returns the mask indicating which bits in a pixel contain the blue
- // color component.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getAlphaMask()
- // Returns the mask indicating which bits in a pixel contain the alpha
- // transparency component.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getRed(int pixel)
- // Returns the red color compoment for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getRed in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getGreen(int pixel)
- // Returns the green color compoment for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getGreen in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getBlue(int pixel)
- // Returns the blue color compoment for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getBlue in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getAlpha(int pixel)
- // Return the alpha transparency value for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getAlpha in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getRGB(int pixel)
- // Returns the color of the pixel in the default RGB color model.
- //
- // Overrides:
- // getRGB in class ColorModel
- // See Also:
- // getRGBdefault
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FilteredImageSource
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- image
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- ImageProducer
- DEF_ENDLIST
- DEF_DECLARATION
- // This class is an implementation of the ImageProducer interface which
- // takes an existing image and a filter object and uses them to produce
- // image data for a new filtered version of the original image.
- // Here is an example which filters an image by swapping the red and
- // blue compents:
- //
- // Image src = getImage("doc:///demo/images/duke/T1.gif");
- // ImageFilter colorfilter = new RedBlueSwapFilter();
- // Image img = createImage(new FilteredImageSource(src.getSource(),
- // colorfilter));
- //
- //
- // See Also:
- // ImageProducer
- //
- DEF_ENDLIST
- DEF_METHOD
- public FilteredImageSource(ImageProducer orig,
- ImageFilter imgf)
- // Constructs an ImageProducer object from an existing ImageProducer
- // and a filter object.
- //
- // See Also:
- // ImageFilter, createImage
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void addConsumer(ImageConsumer ic)
- // Adds an ImageConsumer to the list of consumers interested in
- // data for this image.
- //
- // See Also:
- // ImageConsumer
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized boolean isConsumer(ImageConsumer ic)
- // Determines whether an ImageConsumer is on the list of consumers
- // currently interested in data for this image.
- //
- // Returns:
- // true if the ImageConsumer is on the list; false otherwise
- // See Also:
- // ImageConsumer
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void removeConsumer(ImageConsumer ic)
- // Removes an ImageConsumer from the list of consumers interested in
- // data for this image.
- //
- // See Also:
- // ImageConsumer
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void startProduction(ImageConsumer ic)
- // Adds an ImageConsumer to the list of consumers interested in
- // data for this image, and immediately starts delivery of the
- // image data through the ImageConsumer interface.
- //
- // See Also:
- // ImageConsumer
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void requestTopDownLeftRightResend(ImageConsumer ic)
- // Requests that a given ImageConsumer have the image data delivered
- // one more time in top-down, left-right order. The request is
- // handed to the ImageFilter for further processing, since the
- // ability to preserve the pixel ordering depends on the filter.
- //
- // See Also:
- // ImageConsumer
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- ImageFilter
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- image
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- ImageConsumer
- Cloneable
- DEF_ENDLIST
- DEF_DECLARATION
- // This class implements a filter for the set of interface methods that
- // are used to deliver data from an ImageProducer to an ImageConsumer.
- // It is meant to be used in conjunction with a FilteredImageSource
- // object to produce filtered versions of existing images. It is a
- // base class that provides the calls needed to implement a "Null filter"
- // which has no effect on the data being passed through. Filters should
- // subclass this class and override the methods which deal with the
- // data that needs to be filtered and modify it as necessary.
- //
- // See Also:
- // FilteredImageSource, ImageConsumer
- //
- DEF_ENDLIST
- DEF_METHOD
- public ImageFilter()
- // Returns a unique instance of an ImageFilter object which will
- // actually perform the filtering for the specified ImageConsumer.
- // The default implementation just clones this object.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setDimensions(int width,
- int height)
- // Filters the information provided in the setDimensions method
- // of the ImageConsumer interface.
- //
- // See Also:
- // setDimensions
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setProperties(Hashtable props)
- // Passes the properties from the source object along after adding a
- // property indicating the stream of filters it has been run through.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setColorModel(ColorModel model)
- // Filter the information provided in the setColorModel method
- // of the ImageConsumer interface.
- //
- // See Also:
- // setColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setHints(int hints)
- // Filters the information provided in the setHints method
- // of the ImageConsumer interface.
- //
- // See Also:
- // setHints
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setPixels(int x,
- int y,
- int w,
- int h,
- ColorModel model,
- byte pixels[],
- int off,
- int scansize)
- // Filters the information provided in the setPixels method of the
- // ImageConsumer interface which takes an array of bytes.
- //
- // See Also:
- // setPixels
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setPixels(int x,
- int y,
- int w,
- int h,
- ColorModel model,
- int pixels[],
- int off,
- int scansize)
- // Filters the information provided in the setPixels method of the
- // ImageConsumer interface which takes an array of integers.
- //
- // See Also:
- // setPixels
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void imageComplete(int status)
- // Filters the information provided in the imageComplete method of
- // the ImageConsumer interface.
- //
- // See Also:
- // imageComplete
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void resendTopDownLeftRight(ImageProducer ip)
- // Responds to a request for a TopDownLeftRight (TDLR) ordered resend
- // of the pixel data from an ImageConsumer.
- // The ImageFilter can respond to this request in one of three ways.
- //
- // If the filter can determine that it will forward the pixels in
- // TDLR order if its upstream producer object sends them
- // in TDLR order, then the request is automatically forwarded by
- // default to the indicated ImageProducer using this filter as the
- // requesting ImageConsumer, so no override is necessary.
- // If the filter can resend the pixels in the right order on its
- // own (presumably because the generated pixels have been saved in
- // some sort of buffer), then it can override this method and
- // simply resend the pixels in TDLR order as specified in the
- // ImageProducer API. If the filter simply returns from this
- // method then the request will be ignored and no resend will
- // occur. @see ImageProducer#requestTopDownLeftRightResend
- //
- // Parameters:
- // ip - The ImageProducer that is feeding this instance of
- // the filter - also the ImageProducer that the request should be
- // forwarded to if necessary.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Object clone()
- // Clones this object.
- //
- // Overrides:
- // clone in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IndexColorModel
- DEF_SUPERCLASS
- ColorModel
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- image
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A ColorModel class that specifies a translation from pixel values
- // to alpha, red, green, and blue color components for pixels which
- // represent indices into a fixed colormap. An optional transparent
- // pixel value can be supplied which indicates a completely transparent
- // pixel, regardless of any alpha value recorded for that pixel value.
- // This color model is similar to an X11 PseudoColor visual.
- // Many of the methods in this class are final. The reason for
- // this is that the underlying native graphics code makes assumptions
- // about the layout and operation of this class and those assumptions
- // are reflected in the implementations of the methods here that are
- // marked final. You can subclass this class for other reaons, but
- // you cannot override or modify the behaviour of those methods.
- //
- // See Also:
- // ColorModel
- //
- DEF_ENDLIST
- DEF_METHOD
- public IndexColorModel(int bits,
- int size,
- byte r[],
- byte g[],
- byte b[])
- // Constructs an IndexColorModel from the given arrays of red,
- // green, and blue components. Pixels described by this color
- // model will all have alpha components of 255 (fully opaque).
- // All of the arrays specifying the color components must have
- // at least the specified number of entries.
- //
- // Parameters:
- // bits - The number of bits each pixel occupies.
- // size - The size of the color component arrays.
- // r - The array of red color components.
- // g - The array of green color components.
- // b - The array of blue color components.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public IndexColorModel(int bits,
- int size,
- byte r[],
- byte g[],
- byte b[],
- int trans)
- // Constructs an IndexColorModel from the given arrays of red,
- // green, and blue components. Pixels described by this color
- // model will all have alpha components of 255 (fully opaque),
- // except for the indicated transparent pixel. All of the arrays
- // specifying the color components must have at least the specified
- // number of entries.
- //
- // Parameters:
- // bits - The number of bits each pixel occupies.
- // size - The size of the color component arrays.
- // r - The array of red color components.
- // g - The array of green color components.
- // b - The array of blue color components.
- // trans - The index of the transparent pixel.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public IndexColorModel(int bits,
- int size,
- byte r[],
- byte g[],
- byte b[],
- byte a[])
- // Constructs an IndexColorModel from the given arrays of red,
- // green, blue and alpha components. All of the arrays specifying
- // the color components must have at least the specified number
- // of entries.
- //
- // Parameters:
- // bits - The number of bits each pixel occupies.
- // size - The size of the color component arrays.
- // r - The array of red color components.
- // g - The array of green color components.
- // b - The array of blue color components.
- // a - The array of alpha value components.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public IndexColorModel(int bits,
- int size,
- byte cmap[],
- int start,
- boolean hasalpha)
- // Constructs an IndexColorModel from a single arrays of packed
- // red, green, blue and optional alpha components. The array
- // must have enough values in it to fill all of the needed
- // component arrays of the specified size.
- //
- // Parameters:
- // bits - The number of bits each pixel occupies.
- // size - The size of the color component arrays.
- // cmap - The array of color components.
- // start - The starting offset of the first color component.
- // hasalpha - Indicates whether alpha values are contained in
- // the cmap array.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public IndexColorModel(int bits,
- int size,
- byte cmap[],
- int start,
- boolean hasalpha,
- int trans)
- // Constructs an IndexColorModel from a single arrays of packed
- // red, green, blue and optional alpha components. The specified
- // transparent index represents a pixel which will be considered
- // entirely transparent regardless of any alpha value specified
- // for it. The array must have enough values in it to fill all
- // of the needed component arrays of the specified size.
- //
- // Parameters:
- // bits - The number of bits each pixel occupies.
- // size - The size of the color component arrays.
- // cmap - The array of color components.
- // start - The starting offset of the first color component.
- // hasalpha - Indicates whether alpha values are contained in
- // the cmap array.
- // trans - The index of the fully transparent pixel.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getMapSize()
- // Returns the size of the color component arrays in this IndexColorModel.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getTransparentPixel()
- // Returns the index of the transparent pixel in this IndexColorModel
- // or -1 if there is no transparent pixel.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void getReds(byte r[])
- // Copies the array of red color components into the given array. Only
- // the initial entries of the array as specified by getMapSize() are
- // written.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void getGreens(byte g[])
- // Copies the array of green color components into the given array. Only
- // the initial entries of the array as specified by getMapSize() are
- // written.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void getBlues(byte b[])
- // Copies the array of blue color components into the given array. Only
- // the initial entries of the array as specified by getMapSize() will
- // be written.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void getAlphas(byte a[])
- // Copies the array of alpha transparency values into the given array. Only
- // the initial entries of the array as specified by getMapSize() will
- // be written.
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getRed(int pixel)
- // Returns the red color compoment for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getRed in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getGreen(int pixel)
- // Returns the green color compoment for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getGreen in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getBlue(int pixel)
- // Returns the blue color compoment for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getBlue in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getAlpha(int pixel)
- // Returns the alpha transparency value for the specified pixel in the
- // range 0-255.
- //
- // Overrides:
- // getAlpha in class ColorModel
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int getRGB(int pixel)
- // Returns the color of the pixel in the default RGB color model.
- //
- // Overrides:
- // getRGB in class ColorModel
- // See Also:
- // getRGBdefault
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Image
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // The image class is an abstract class. The image must be obtained in a
- // platform specific way.
- DEF_ENDLIST
- DEF_METHOD
- public Image()
- // Gets the actual width of the image. If the width is not known
- // yet then the ImageObserver will be notified later and -1 will
- // be returned.
- //
- // See Also:
- // getHeight, ImageObserver
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract int getHeight(ImageObserver observer)
- // Gets the actual height of the image. If the height is not known
- // yet then the ImageObserver will be notified later and -1 will
- // be returned.
- //
- // See Also:
- // getWidth, ImageObserver
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract ImageProducer getSource()
- // Gets the object that produces the pixels for the image.
- // This is used by the Image filtering classes and by the
- // image conversion and scaling code.
- //
- // See Also:
- // ImageProducer
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Graphics getGraphics()
- // Gets a graphics object to draw into this image.
- // This will only work for off-screen images.
- //
- // See Also:
- // Graphics
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Object getProperty(String name,
- ImageObserver observer)
- // Gets a property of the image by name. Individual property names
- // are defined by the various image formats. If a property is not
- // defined for a particular image, this method will return the
- // UndefinedProperty object. If the properties for this image are
- // not yet known, then this method will return null and the ImageObserver
- // object will be notified later. The property name "comment" should
- // be used to store an optional comment which can be presented to
- // the user as a description of the image, its source, or its author.
- //
- // See Also:
- // ImageObserver, UndefinedProperty
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract void flush()
- // Flushes all resources being used by this Image object. This
- // includes any pixel data that is being cached for rendering to
- // the screen as well as any system resources that are being used
- // to store data or pixels for the image. The image is reset to
- // a state similar to when it was first created so that if it is
- // again rendered, the image data will have to be recreated or
- // fetched again from its source.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Insets
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- awt
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- Cloneable
- DEF_ENDLIST
- DEF_DECLARATION
- // The insets of a container.
- // This class is used to layout containers.
- //
- // See Also:
- // LayoutManager, Container
- //
- DEF_ENDLIST
- DEF_METHOD
- public Insets(int top,
- int left,
- int bottom,
- int right)
- // Constructs and initializes a new Inset with the specified top,
- // left, bottom, and right insets.
- //
- // Parameters:
- // top - the inset from the top
- // left - the inset from the left
- // bottom - the inset from the bottom
- // right - the inset from the right
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns a String object representing this Inset's values.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Object clone()
- // Creates a clone of the object.
- //
- // Overrides:
- // clone in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- DataInputStream
- DEF_SUPERCLASS
- FilterInputStream
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.DataInputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DataInput
- DEF_ENDLIST
- DEF_DECLARATION
- // A data input stream that lets you read primitive Java data types
- // from a stream in a portable way. Primitive data types are well
- // understood types with associated operations. For example,
- // Integers are considered primitive data types.
- //
- // See Also:
- // DataOutputStream
- //
- DEF_ENDLIST
- DEF_METHOD
- public DataInputStream(InputStream in)
- // Creates a new DataInputStream.
- //
- // Parameters:
- // in - the input stream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int read(byte b[]) throws IOException
- // Reads data into an array of bytes.
- // This method blocks until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // Returns:
- // the actual number of bytes read, -1 is
- // returned when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class FilterInputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int read(byte b[],
- int off,
- int len) throws IOException
- // Reads data into an array of bytes.
- // This method blocks until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // off - the start offset of the data
- // len - the maximum number of bytes read
- // Returns:
- // the actual number of bytes read, -1 is
- // returned when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class FilterInputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void readFully(byte b[]) throws IOException
- // Reads bytes, blocking until all bytes are read.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // Throws: IOException
- // If an I/O error has occurred.
- // Throws: EOFException
- // If EOF reached before all bytes are read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void readFully(byte b[],
- int off,
- int len) throws IOException
- // Reads bytes, blocking until all bytes are read.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // off - the start offset of the data
- // len - the maximum number of bytes read
- // Throws: IOException
- // If an I/O error has occurred.
- // Throws: EOFException
- // If EOF reached before all bytes are read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int skipBytes(int n) throws IOException
- // Skips bytes, blocks until all bytes are skipped.
- //
- // Parameters:
- // n - the number of bytes to be skipped
- // Returns:
- // the actual number of bytes skipped.
- // Throws: IOException
- // If an I/O error has occurred.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final boolean readBoolean() throws IOException
- // Reads a boolean.
- //
- // Returns:
- // the boolean read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final byte readByte() throws IOException
- // Reads an 8 bit byte.
- //
- // Returns:
- // the 8 bit byte read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int readUnsignedByte() throws IOException
- // Reads an unsigned 8 bit byte.
- //
- // Returns:
- // the 8 bit byte read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final short readShort() throws IOException
- // Reads a 16 bit short.
- //
- // Returns:
- // the 16 bit short read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int readUnsignedShort() throws IOException
- // Reads 16 bit short.
- //
- // Returns:
- // the 16 bit short read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final char readChar() throws IOException
- // Reads a 16 bit char.
- //
- // Returns:
- // the read 16 bit char.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int readInt() throws IOException
- // Reads a 32 bit int.
- //
- // Returns:
- // the 32 bit integer read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final long readLong() throws IOException
- // Reads a 64 bit long.
- //
- // Returns:
- // the 64 bit long read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final float readFloat() throws IOException
- // Reads a 32 bit float.
- //
- // Returns:
- // the read 32 bit float.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final double readDouble() throws IOException
- // Reads a 64 bit double.
- //
- // Returns:
- // the 64 bit double read.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final String readLine() throws IOException
- // Reads in a line that has been terminated by a \n, \r,
- // \r\n or EOF.
- //
- // Returns:
- // a String copy of the line.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final String readUTF() throws IOException
- // Reads a UTF format String.
- //
- // Returns:
- // the String.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final static String readUTF(DataInput in) throws IOException
- // Reads a UTF format String from the given input stream.
- //
- // Returns:
- // the String.
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- DataOutputStream
- DEF_SUPERCLASS
- FilterOutputStream
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.DataOutputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DataOutput
- DEF_ENDLIST
- DEF_DECLARATION
- // This class lets you write primitive Java data types
- // to a stream in a portable way. Primitive data types are well
- // understood types with associated operations. For example, an
- // Integer is considered to be a good primitive data type.
- // The data can be converted back using a DataInputStream.
- DEF_ENDLIST
- DEF_METHOD
- public DataOutputStream(OutputStream out)
- // Creates a new DataOutputStream.
- //
- // Parameters:
- // out - the output stream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void write(int b) throws IOException
- // Writes a byte. Will block until the byte is actually
- // written.
- //
- // Parameters:
- // b - the byte to be written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class FilterOutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void write(byte b[],
- int off,
- int len) throws IOException
- // Writes a sub array of bytes.
- //
- // Parameters:
- // b - the data to be written
- // off - the start offset in the data
- // len - the number of bytes that are written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class FilterOutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void flush() throws IOException
- // Flushes the stream. This will write any buffered
- // output bytes.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // flush in class FilterOutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeBoolean(boolean v) throws IOException
- // Writes a boolean.
- //
- // Parameters:
- // v - the boolean to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeByte(int v) throws IOException
- // Writes an 8 bit byte.
- //
- // Parameters:
- // v - the byte value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeShort(int v) throws IOException
- // Writes a 16 bit short.
- //
- // Parameters:
- // v - the short value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeChar(int v) throws IOException
- // Writes a 16 bit char.
- //
- // Parameters:
- // v - the char value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeInt(int v) throws IOException
- // Writes a 32 bit int.
- //
- // Parameters:
- // v - the integer value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeLong(long v) throws IOException
- // Writes a 64 bit long.
- //
- // Parameters:
- // v - the long value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeFloat(float v) throws IOException
- // Writes a 32 bit float.
- //
- // Parameters:
- // v - the float value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeDouble(double v) throws IOException
- // Writes a 64 bit double.
- //
- // Parameters:
- // v - the double value to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeBytes(String s) throws IOException
- // Writes a String as a sequence of bytes.
- //
- // Parameters:
- // s - the String of bytes to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeChars(String s) throws IOException
- // Writes a String as a sequence of chars.
- //
- // Parameters:
- // s - the String of chars to be written
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final void writeUTF(String str) throws IOException
- // Writes a String in UTF format.
- //
- // Parameters:
- // str - the String in UTF format
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final int size()
- // Returns the number of bytes written.
- //
- // Returns:
- // the number of bytes written thus far.
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- EOFException
- DEF_SUPERCLASS
- IOException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.EOFException
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that and EOF has been reached unexpectedly during input.
- //
- // See Also:
- // IOException, DataInputStream
- //
- DEF_ENDLIST
- DEF_METHOD
- public EOFException()
- // Constructs an EOFException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public EOFException(String s)
- // Constructs an EOFException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- File
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.File
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // This class represents a file name of the host file system.
- // The file name can be relative or absolute. It must use
- // the file name conventions of the host platform.
- // The intention is to provide an abstraction that deals
- // with most of the system-dependent file name features such
- // as the separator character, root, device name, etc.
- // Not all features are currently fully implemented.
- // Note that whenever a file name or path is used it is
- // assumed that the host's file name conventions are used.
- DEF_ENDLIST
- DEF_METHOD
- public File(String path)
- // Creates a File object.
- //
- // Parameters:
- // path - the file path
- // Throws: NullPointerException
- // If the file path is equal to
- // null.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public File(String path,
- String name)
- // Creates a File object from the specified directory.
- //
- // Parameters:
- // path - the directory path
- // name - the file name
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public File(File dir,
- String name)
- // Creates a File object (given a directory File object).
- //
- // Parameters:
- // dir - the directory
- // name - the file name
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getName()
- // Gets the name of the file. This method does not include the
- // directory.
- //
- // Returns:
- // the file name.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getPath()
- // Gets the path of the file.
- //
- // Returns:
- // the file path.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getAbsolutePath()
- // Gets the absolute path of the file.
- //
- // Returns:
- // the absolute file path.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String getParent()
- // Gets the name of the parent directory.
- //
- // Returns:
- // the parent directory, or null if one is not found.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean exists()
- // Returns a boolean indicating whether or not a file exists.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean canWrite()
- // Returns a boolean indicating whether or not a writable file
- // exists.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean canRead()
- // Returns a boolean indicating whether or not a readable file
- // exists.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isFile()
- // Returns a boolean indicating whether or not a normal file
- // exists.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isDirectory()
- // Returns a boolean indicating whether or not a directory file
- // exists.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isAbsolute()
- // Returns a boolean indicating whether the file name is absolute.
- //
- DEF_ENDLIST
- DEF_METHOD
- public long lastModified()
- // Returns the last modification time. The return value should
- // only be used to compare modification dates. It is meaningless
- // as an absolute time.
- //
- DEF_ENDLIST
- DEF_METHOD
- public long length()
- // Returns the length of the file.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean mkdir()
- // Creates a directory and returns a boolean indicating the
- // success of the creation.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean renameTo(File dest)
- // Renames a file and returns a boolean indicating whether
- // or not this method was successful.
- //
- // Parameters:
- // dest - the new file name
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean mkdirs()
- // Creates all directories in this path. This method
- // returns true if all directories in this path are created.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String[] list()
- // Lists the files in a directory. Works only on directories.
- //
- // Returns:
- // an array of file names. This list will include all
- // files in the directory except the equivalent of "." and ".." .
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String[] list(FilenameFilter filter)
- // Uses the specified filter to list files in a directory.
- //
- // Parameters:
- // filter - the filter used to select file names
- // Returns:
- // the filter selected files in this directory.
- // See Also:
- // FilenameFilter
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean delete()
- // Deletes the specified file. Returns true
- // if the file could be deleted.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int hashCode()
- // Computes a hashcode for the file.
- //
- // Overrides:
- // hashCode in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean equals(Object obj)
- // Compares this object against the specified object.
- //
- // Parameters:
- // obj - the object to compare with
- // Returns:
- // true if the objects are the same; false otherwise.
- // Overrides:
- // equals in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns a String object representing this file's path.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FileDescriptor
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.FileDescriptor
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- DEF_ENDLIST
- DEF_METHOD
- public FileDescriptor()
- // Determines whether the file descriptor object is valid.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FileInputStream
- DEF_SUPERCLASS
- InputStream
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.FileInputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // File input stream, can be constructed from
- // a file descriptor or a file name.
- //
- // See Also:
- // FileOutputStream, File
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileInputStream(String name) throws FileNotFoundException
- // Creates an input file with the specified system dependent file
- // name.
- //
- // Parameters:
- // name - the system dependent file name
- // Throws: IOException
- // If the file is not found.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileInputStream(File file) throws FileNotFoundException
- // Creates an input file from the specified File object.
- //
- // Parameters:
- // file - the file to be opened for reading
- // Throws: IOException
- // If the file is not found.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileInputStream(FileDescriptor fdObj)
- // Reads a byte of data. This method will block if no input is
- // available.
- //
- // Returns:
- // the byte read, or -1 if the end of the
- // stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read(byte b[]) throws IOException
- // Reads data into an array of bytes.
- // This method blocks until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // Returns:
- // the actual number of bytes read. -1 is
- // returned if the end of stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read(byte b[],
- int off,
- int len) throws IOException
- // Reads data into an array of bytes.
- // This method blocks until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // off - the start offset of the data
- // len - the maximum number of bytes read
- // Returns:
- // the actual number of bytes read. -1 is
- // returned when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public long skip(long n) throws IOException
- // Skips n bytes of input.
- //
- // Parameters:
- // n - the number of bytes to be skipped
- // Returns:
- // the actual number of bytes skipped.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // skip in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int available() throws IOException
- // Returns the number of bytes that can be read
- // without blocking.
- //
- // Returns:
- // the number of available bytes, which is initially
- // equal to the file size.
- // Overrides:
- // available in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void close() throws IOException
- // Closes the input stream. This method must be called
- // to release any resources associated with
- // the stream.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // close in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final FileDescriptor getFD() throws IOException
- // Returns the opaque file descriptor object associated with this stream.
- //
- // Returns:
- // the file descriptor.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected void finalize() throws IOException
- // Closes the stream when garbage is collected.
- //
- // Overrides:
- // finalize in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FileNotFoundException
- DEF_SUPERCLASS
- IOException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.FileNotFoundException
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that a file was not found.
- DEF_ENDLIST
- DEF_METHOD
- public FileNotFoundException()
- // Constructs a FileNotFoundException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileNotFoundException(String s)
- // Constructs a FileNotFoundException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FileOutputStream
- DEF_SUPERCLASS
- OutputStream
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.FileOutputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // File output stream, can be constructed from
- // a file descriptor or a file name.
- //
- // See Also:
- // FileInputStream, File
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileOutputStream(String name) throws IOException
- // Creates an output file with the specified system dependent
- // file name.
- //
- // Parameters:
- // name - the system dependent file name
- // Throws: IOException
- // If the file is not found.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileOutputStream(File file) throws IOException
- // Creates an output file with the specified File object.
- //
- // Parameters:
- // file - the file to be opened for reading
- // Throws: IOException
- // If the file is not found.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public FileOutputStream(FileDescriptor fdObj)
- // Writes a byte of data. This method will block until the byte is
- // actually written.
- //
- // Parameters:
- // b - the byte to be written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void write(byte b[]) throws IOException
- // Writes an array of bytes. Will block until the bytes
- // are actually written.
- //
- // Parameters:
- // b - the data to be written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void write(byte b[],
- int off,
- int len) throws IOException
- // Writes a sub array of bytes.
- //
- // Parameters:
- // b - the data to be written
- // off - the start offset in the data
- // len - the number of bytes that are written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void close() throws IOException
- // Closes the stream. This method must be called
- // to release any resources associated with the
- // stream.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // close in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public final FileDescriptor getFD() throws IOException
- // Returns the file descriptor associated with this stream.
- //
- // Returns:
- // the file descriptor.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected void finalize() throws IOException
- // Closes the stream when garbage is collected.
- //
- // Overrides:
- // finalize in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FilterInputStream
- DEF_SUPERCLASS
- InputStream
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.FilterInputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Abstract class representing a filtered input stream of bytes.
- // This class is the basis for enhancing input stream functionality.
- // It allows multiple input stream filters to be chained together,
- // each providing additional functionality.
- DEF_ENDLIST
- DEF_METHOD
- protected FilterInputStream(InputStream in)
- // Creates an input stream filter.
- //
- // Parameters:
- // in - the input stream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read() throws IOException
- // Reads a byte. Will block if no input is available.
- //
- // Returns:
- // the byte read, or -1 if the end of the
- // stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read(byte b[]) throws IOException
- // Reads into an array of bytes.
- // Blocks until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // Returns:
- // the actual number of bytes read. Returns -1
- // when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read(byte b[],
- int off,
- int len) throws IOException
- // Reads into an array of bytes.
- // Blocks until some input is available.
- // This method should be overridden in a subclass for
- // efficiency (the default implementation reads 1 byte
- // at a time).
- //
- // Parameters:
- // b - the buffer into which the data is read
- // off - the start offset of the data
- // len - the maximum number of bytes read
- // Returns:
- // the actual number of bytes read. Returns -1
- // when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // read in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public long skip(long n) throws IOException
- // Skips bytes of input.
- //
- // Parameters:
- // n - bytes to be skipped
- // Returns:
- // actual number of bytes skipped
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // skip in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int available() throws IOException
- // Returns the number of bytes that can be read
- // without blocking.
- //
- // Returns:
- // the number of available bytes
- // Overrides:
- // available in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void close() throws IOException
- // Closes the input stream. Must be called
- // to release any resources associated with
- // the stream.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // close in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void mark(int readlimit)
- // Marks the current position in the input stream. A subsequent
- // call to reset() will reposition the stream at the last
- // marked position so that subsequent reads will re-read
- // the same bytes. The stream promises to allow readlimit bytes
- // to be read before the mark position gets invalidated.
- //
- // Parameters:
- // readlimit - the maximum limit of bytes allowed tobe read before the
- // mark position becomes invalid.
- // Overrides:
- // mark in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void reset() throws IOException
- // Repositions the stream to the last marked position. If the
- // stream has not been marked, or if the mark has been invalidated,
- // an IOException is thrown. Stream marks are intended to be used in
- // situations where you need to read ahead a little to see what's in
- // the stream. Often this is most easily done by invoking some
- // general parser. If the stream is of the type handled by the
- // parse, it just chugs along happily. If the stream is not of
- // that type, the parser should toss an exception when it fails.
- // If this happens within readlimit bytes, it allows the outer
- // code to reset the stream and try another parser.
- //
- // Overrides:
- // reset in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean markSupported()
- // Returns true if this stream type supports mark/reset.
- //
- // Overrides:
- // markSupported in class InputStream
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- FilterOutputStream
- DEF_SUPERCLASS
- OutputStream
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.FilterOutputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Abstract class representing a filtered output stream of bytes.
- // This class is the basis for enhancing output stream functionality.
- // It allows multiple output stream filters to be chained together,
- // each providing additional functionality.
- DEF_ENDLIST
- DEF_METHOD
- public FilterOutputStream(OutputStream out)
- // Creates an output stream filter.
- //
- // Parameters:
- // out - the output stream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void write(int b) throws IOException
- // Writes a byte. Will block until the byte is actually
- // written.
- //
- // Parameters:
- // b - the byte
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void write(byte b[]) throws IOException
- // Writes an array of bytes. Will block until the bytes
- // are actually written.
- //
- // Parameters:
- // b - the data to be written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void write(byte b[],
- int off,
- int len) throws IOException
- // Writes a subarray of bytes. To be efficient it should
- // be overridden in a subclass.
- //
- // Parameters:
- // b - the data to be written
- // off - the start offset in the data
- // len - the number of bytes that are written
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // write in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void flush() throws IOException
- // Flushes the stream. This will write any buffered
- // output bytes.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // flush in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void close() throws IOException
- // Closes the stream. This method must be called
- // to release any resources associated with the
- // stream.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- // Overrides:
- // close in class OutputStream
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- InputStream
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.InputStream
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // An abstract class representing an input stream of bytes.
- // All InputStreams are based on this class.
- //
- // See Also:
- // OutputStream, FilterInputStream, BufferedInputStream, DataInputStream, ByteArrayInputStream, PushbackInputStream
- //
- DEF_ENDLIST
- DEF_METHOD
- public InputStream()
- // Reads a byte of data. This method will block if no input is
- // available.
- //
- // Returns:
- // the byte read, or -1 if the end of the
- // stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read(byte b[]) throws IOException
- // Reads into an array of bytes. This method will
- // block until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // Returns:
- // the actual number of bytes read, -1 is
- // returned when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int read(byte b[],
- int off,
- int len) throws IOException
- // Reads into an array of bytes. This method will
- // block until some input is available.
- //
- // Parameters:
- // b - the buffer into which the data is read
- // off - the start offset of the data
- // len - the maximum number of bytes read
- // Returns:
- // the actual number of bytes read, -1 is
- // returned when the end of the stream is reached.
- // Throws: IOException
- // If an I/O error has occurred.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public long skip(long n) throws IOException
- // Skips n bytes of input.
- //
- // Parameters:
- // n - the number of bytes to be skipped
- // Returns:
- // the actual number of bytes skipped.
- // Throws: IOException
- // If an I/O error has occurred.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int available() throws IOException
- // Returns the number of bytes that can be read
- // without blocking.
- //
- // Returns:
- // the number of available bytes.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void close() throws IOException
- // Closes the input stream. Must be called
- // to release any resources associated with
- // the stream.
- //
- // Throws: IOException
- // If an I/O error has occurred.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void mark(int readlimit)
- // Marks the current position in the input stream. A subsequent
- // call to reset() will reposition the stream at the last
- // marked position so that subsequent reads will re-read
- // the same bytes. The stream promises to allow readlimit bytes
- // to be read before the mark position gets invalidated.
- //
- // Parameters:
- // readlimit - the maximum limit of bytes allowed to be read
- // before the mark position becomes invalid.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void reset() throws IOException
- // Repositions the stream to the last marked position. If the
- // stream has not been marked, or if the mark has been invalidated,
- // an IOException is thrown. Stream marks are intended to be used in
- // situations where you need to read ahead a little to see what's in
- // the stream. Often this is most easily done by invoking some
- // general parser. If the stream is of the type handled by the
- // parser, it just chugs along happily. If the stream is not of
- // that type, the parser should toss an exception when it fails,
- // which, if it happens within readlimit bytes, allows the outer
- // code to reset the stream and try another parser.
- //
- // Throws: IOException
- // If the stream has not been marked or
- // if the mark has been invalidated.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean markSupported()
- // Returns a boolean indicating whether or not this stream type
- // supports mark/reset.
- //
- // Returns:
- // true if this stream type supports mark/reset; false
- // otherwise.
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IOException
- DEF_SUPERCLASS
- Exception
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- io
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.io.IOException
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that an I/O exception has occurred.
- //
- // See Also:
- // InputStream, OutputStream
- //
- DEF_ENDLIST
- DEF_METHOD
- public IOException()
- // Constructs an IOException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IOException(String s)
- // Constructs an IOException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Double
- DEF_SUPERCLASS
- Number
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // The Double class provides an object wrapper for Double data values and serves
- // as a place for double-oriented operations. A wrapper is useful because most of
- // Java's utility classes require the use of objects. Since doubles are not
- // objects in Java, they need to be "wrapped" in a Double instance.
- DEF_ENDLIST
- DEF_METHOD
- public Double(double value)
- // Constructs a Double wrapper for the specified double value.
- //
- // Parameters:
- // value - the initial value of the double
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Double(String s) throws NumberFormatException
- // Constructs a Double object initialized to the value specified by the
- // String parameter.
- //
- // Parameters:
- // s - the String to be converted to a Double
- // Throws: NumberFormatException
- // If the String does not contain a parsable number.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static String toString(double d)
- // Returns a String representation for the specified double value.
- //
- // Parameters:
- // d - the double to be converted
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static Double valueOf(String s) throws NumberFormatException
- // Returns a new Double value initialized to the value represented by the
- // specified String.
- //
- // Parameters:
- // s - the String to be parsed
- // Throws: NumberFormatException
- // If the String cannot be parsed.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static boolean isNaN(double v)
- // Returns true if the specified number is the special Not-a-Number (NaN) value.
- //
- // Parameters:
- // v - the value to be tested
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static boolean isInfinite(double v)
- // Returns true if the specified number is infinitely large in magnitude.
- //
- // Parameters:
- // v - the value to be tested
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isNaN()
- // Returns true if this Double value is the special Not-a-Number (NaN) value.
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isInfinite()
- // Returns true if this Double value is infinitely large in magnitude.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns a String representation of this Double object.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int intValue()
- // Returns the integer value of this Double (by casting to an int).
- //
- // Overrides:
- // intValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public long longValue()
- // Returns the long value of this Double (by casting to a long).
- //
- // Overrides:
- // longValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public float floatValue()
- // Returns the float value of this Double.
- //
- // Overrides:
- // floatValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public double doubleValue()
- // Returns the double value of this Double.
- //
- // Overrides:
- // doubleValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int hashCode()
- // Returns a hashcode for this Double.
- //
- // Overrides:
- // hashCode in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean equals(Object obj)
- // Compares this object against the specified object.
- //
- // Note: To be useful in hashtables this method
- // considers two NaN double values to be equal. This
- // is not according to IEEE specification
- //
- // Parameters:
- // obj - the object to compare with
- // Returns:
- // true if the objects are the same; false otherwise.
- // Overrides:
- // equals in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static long doubleToLongBits(double value)
- // Returns the bit represention of a double-float value
- //
- DEF_ENDLIST
- DEF_METHOD
- public static double longBitsToDouble(long bits)
- // Returns the double-float corresponding to a given bit represention.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Error
- DEF_SUPERCLASS
- Throwable
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Error is a subtype of Throwable for abnormal events that should not occur.
- // Do not try to catch Error's unless you really know what you're
- // doing.
- DEF_ENDLIST
- DEF_METHOD
- public Error()
- // Constructs an Error with no specified detail message.
- // A detail message is a String that describes this particular error.
- //
- DEF_ENDLIST
- DEF_METHOD
- public Error(String s)
- // Constructs an Error with the specified detail message.
- // A detail message is a String that describes this particular error
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Exception
- DEF_SUPERCLASS
- Throwable
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Exception are a form of Throwable that normal programs may wish to try and catch.
- DEF_ENDLIST
- DEF_METHOD
- public Exception()
- // Constructs an Exception with no specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public Exception(String s)
- // Constructs a Exception with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Float
- DEF_SUPERCLASS
- Number
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // The Float class provides an object wrapper for Float data values, and serves as
- // a place for float-oriented operations. A wrapper is useful because most of Java's
- // utility classes require the use of objects. Since floats are not objects in
- // Java, they need to be "wrapped" in a Float instance.
- DEF_ENDLIST
- DEF_METHOD
- public Float(float value)
- // Constructs a Float wrapper for the specified float value.
- //
- // Parameters:
- // value - the value of the Float
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Float(double value)
- // Constructs a Float wrapper for the specified double value.
- //
- // Parameters:
- // value - the value of the Float
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Float(String s) throws NumberFormatException
- // Constructs a Float object initialized to the value specified by the
- // String parameter.
- //
- // Parameters:
- // s - the String to be converted to a Float
- // Throws: NumberFormatException
- // If the String does not contain a parsable number.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static String toString(float f)
- // Returns a String representation for the specified float value.
- //
- // Parameters:
- // f - the float to be converted
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static Float valueOf(String s) throws NumberFormatException
- // Returns the floating point value represented by the specified String.
- //
- // Parameters:
- // s - the String to be parsed
- // Throws: NumberFormatException
- // If the String does not contain a parsable
- // Float.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static boolean isNaN(float v)
- // Returns true if the specified number is the special Not-a-Number (NaN) value.
- //
- // Parameters:
- // v - the value to be tested
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static boolean isInfinite(float v)
- // Returns true if the specified number is infinitely large in magnitude.
- //
- // Parameters:
- // v - the value to be tested
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isNaN()
- // Returns true if this Float value is Not-a-Number (NaN).
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isInfinite()
- // Returns true if this Float value is infinitely large in magnitude.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Returns a String representation of this Float object.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int intValue()
- // Returns the integer value of this Float (by casting to an int).
- //
- // Overrides:
- // intValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public long longValue()
- // Returns the long value of this Float (by casting to a long).
- //
- // Overrides:
- // longValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public float floatValue()
- // Returns the float value of this Float object.
- //
- // Overrides:
- // floatValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public double doubleValue()
- // Returns the double value of this Float.
- //
- // Overrides:
- // doubleValue in class Number
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int hashCode()
- // Returns a hashcode for this Float.
- //
- // Overrides:
- // hashCode in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean equals(Object obj)
- // Compares this object against some other object.
- //
- // Note: To be useful in hashtables this method
- // considers two Nan floating point values to be equal. This
- // is not according to IEEE specification
- //
- // Parameters:
- // obj - the object to compare with
- // Returns:
- // true if the objects are the same; false otherwise.
- // Overrides:
- // equals in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static int floatToIntBits(float value)
- // Returns the bit represention of a single-float value
- //
- DEF_ENDLIST
- DEF_METHOD
- public static float intBitsToFloat(int bits)
- // Returns the single-float corresponding to a given bit represention.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IllegalAccessError
- DEF_SUPERCLASS
- IncompatibleClassChangeError
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that an illegal access exception has occurred.
- DEF_ENDLIST
- DEF_METHOD
- public IllegalAccessError()
- // Constructs an IllegalAccessError with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalAccessError(String s)
- // Constructs an IllegalAccessError with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IllegalAccessException
- DEF_SUPERCLASS
- Exception
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that a particular method could not be found.
- DEF_ENDLIST
- DEF_METHOD
- public IllegalAccessException()
- // Constructs a IllegalAccessException without a detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalAccessException(String s)
- // Constructs a IllegalAccessException with a detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IllegalArgumentException
- DEF_SUPERCLASS
- RuntimeException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that an illegal argument exception has occurred.
- //
- // See Also:
- // setPriority
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalArgumentException()
- // Constructs an IllegalArgumentException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalArgumentException(String s)
- // Constructs an IllegalArgumentException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IllegalMonitorStateException
- DEF_SUPERCLASS
- RuntimeException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that a monitor operation has been attempted when the monitor
- // is in an invalid state. For example, trying to notify a monitor that
- // you do not own would invoke this class.
- DEF_ENDLIST
- DEF_METHOD
- public IllegalMonitorStateException()
- // Constructs an IllegalMonitorStateException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalMonitorStateException(String s)
- // Constructs an IllegalMonitorStateException with the specified detail
- // message. A detail message is a String that describes this particular
- // exception.
- //
- // Parameters:
- // s - the String that contains a detailed message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IllegalThreadStateException
- DEF_SUPERCLASS
- IllegalArgumentException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Exception indicating that a thread is not in the proper state for the
- // requested operation.
- //
- // See Also:
- // suspend, resume
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalThreadStateException()
- // Constructs an IllegalThreadStateException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IllegalThreadStateException(String s)
- // Constructs an IllegalThreadStateException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IncompatibleClassChangeError
- DEF_SUPERCLASS
- LinkageError
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that an incompatible class change has occurred.
- DEF_ENDLIST
- DEF_METHOD
- public IncompatibleClassChangeError()
- // Constructs an IncompatibleClassChangeError with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IncompatibleClassChangeError(String s)
- // Constructs an IncompatibleClassChangeError with the specified detail
- // message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- IndexOutOfBoundsException
- DEF_SUPERCLASS
- RuntimeException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that an index of some sort is out of bounds.
- DEF_ENDLIST
- DEF_METHOD
- public IndexOutOfBoundsException()
- // Constructs an IndexOutOfBoundsException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public IndexOutOfBoundsException(String s)
- // Constructs a IndexOutOfBoundsException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- InstantiationError
- DEF_SUPERCLASS
- IncompatibleClassChangeError
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that the interpreter has tried to instantiate an abstract class or
- // an interface.
- DEF_ENDLIST
- DEF_METHOD
- public InstantiationError()
- // Constructs an InstantiationError with no detail message. A detail
- // message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public InstantiationError(String s)
- // Constructs an InstantiationError with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the String that contains the detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- InstantiationException
- DEF_SUPERCLASS
- Exception
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- lang
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that an attempt has been made to instantiate an abstract class or
- // an interface.
- DEF_ENDLIST
- DEF_METHOD
- public InstantiationException()
- // Constructs an InstantiationException with no detail message.
- // A detail message is a String that describes this particular exception.
- //
- DEF_ENDLIST
- DEF_METHOD
- public InstantiationException(String s)
- // Constructs an InstantiationException with the specified detail message.
- // A detail message is a String that describes this particular exception.
- //
- // Parameters:
- // s - the String containing a detail message
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- ContentHandler
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- net
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.net.ContentHandler
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A class to read data from a URLConnection and construct an
- // Object. Specific subclasses of ContentHandler handle
- // specific mime types. It is the responsibility of a ContentHandlerFactory
- // to select an appropriate ContentHandler for the mime-type
- // of the URLConnection. Applications should never call ContentHandlers
- // directly, rather they should use URL.getContent() or
- // URLConnection.getContent()
- DEF_ENDLIST
- DEF_METHOD
- public ContentHandler()
- // Given an input stream positioned at the beginning of the
- // representation of an object, reads that stream and recreates
- // the object from it.
- //
- // Throws: IOException
- // An IO error occurred while reading the object.
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- DatagramPacket
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- net
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.net.DatagramPacket
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A class that represents a datagram packet containing packet data, packet
- // length, internet addresses and port.
- DEF_ENDLIST
- DEF_METHOD
- public DatagramPacket(byte ibuf[],
- int ilength)
- // This constructor is used to create a DatagramPacket object used
- // for receiving datagrams.
- //
- // Parameters:
- // ibuf - is where packet data is to be received.
- // ilength - is the number of bytes to be received.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public DatagramPacket(byte ibuf[],
- int ilength,
- InetAddress iaddr,
- int iport)
- // This constructor is used construct the DatagramPacket to be sent.
- //
- // Parameters:
- // ibuf - contains the packet data.
- // ilength - contains the packet length
- // iaddr - and iport contains destination ip addr and port number.
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- DatagramSocket
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- net
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.net.DatagramSocket
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // The datagram socket class implements unreliable datagrams.
- DEF_ENDLIST
- DEF_METHOD
- public DatagramSocket() throws SocketException
- // Creates a datagram socket
- //
- DEF_ENDLIST
- DEF_METHOD
- public DatagramSocket(int port) throws SocketException
- // Creates a datagram socket
- //
- // Parameters:
- // local - port to use
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public void send(DatagramPacket p) throws IOException
- // Sends Datagram Packet to the destination address
- //
- // Parameters:
- // DatagramPacket - to be sent. The packet contains the buffer
- // of bytes, length and destination InetAddress and port.
- // Throws: IOException
- // i/o error occurred
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void receive(DatagramPacket p) throws IOException
- // Receives datagram packet.
- //
- // Parameters:
- // DatagramPacket - to be received.
- // On return, the DatagramPacket contains the buffer in which the
- // data is received, packet length, sender's address and sender's port
- // number. Blocks until some input is available.
- // Throws: IOException
- // i/o error occurred
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getLocalPort()
- // Returns the local port that this socket is bound to.
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void close()
- // Close the datagram socket.
- //
- DEF_ENDLIST
- DEF_METHOD
- protected synchronized void finalize()
- // Code to perform when this object is garbage collected.
- //
- // Overrides:
- // finalize in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- InetAddress
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- net
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.net.InetAddress
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A class that represents Internet addresses.
- DEF_ENDLIST
- DEF_METHOD
- public String getHostName()
- // Gets the hostname for this address; also the key in the
- // hashtable.
- // If the host is equal to null, then this address refers to any
- // of the local machine's available network addresses.
- //
- DEF_ENDLIST
- DEF_METHOD
- public byte[] getAddress()
- // Returns the raw IP address in network byte order. The highest
- // order byte position is in addr[0]. To be prepared for 64-bit
- // IP addresses n array of bytes is returned.
- //
- // Returns:
- // raw IP address in network byte order.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int hashCode()
- // Returns a hashcode for this InetAddress.
- //
- // Overrides:
- // hashCode in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean equals(Object obj)
- // Compares this object against the specified object.
- //
- // Parameters:
- // obj - the object to compare against.
- // Returns:
- // true if the objects are the same; false otherwise.
- // Overrides:
- // equals in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Converts the InetAddress to a String.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static synchronized InetAddress getByName(String host) throws UnknownHostException
- // Returns a network address for the indicated host. A host name
- // of null refers to default address for the local machine. A local
- // cache is used to speed access to addresses. If all
- // addresses for a host are needed, use the getAllByName() method.
- //
- // Parameters:
- // host - the specified host
- // Throws: UnknownHostException
- // If the address is unknown.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static synchronized InetAddress[] getAllByName(String host) throws UnknownHostException
- // Given a hostname, returns an array of all the corresponding InetAddresses.
- //
- // Throws: UnknownHostException
- // If the host name could not be resolved
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static InetAddress getLocalHost() throws UnknownHostException
- // Returns the local host.
- //
- // Throws: UnknownHostException
- // If the host name could not be resolved
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Date
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- util
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.util.Date
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // A wrapper for a date. This class lets you manipulate
- // dates in a system independent way. To print today's
- // date use:
- //
- // Date d = new Date();
- // System.out.println("today = " + d);
- //
- // To find out what day corresponds to a particular date:
- //
- // Date d = new Date(63, 0, 16); // January 16, 1963
- // System.out.println("Day of the week: " + d.getDay());
- //
- // The date can be set and examined
- // according to the local time zone into the
- // year, month, day, hour, minute and second.
- //
- // While the API is intended to reflect UTC, Coordinated Universal Time,
- // it doesn't do so exactly. This inexact behavior is inherited from
- // the time system of the underlying OS. All modern OS's that I (jag)
- // am aware of assume that 1 day = 24*60*60 seconds. In UTC, about once
- // a year there is an extra second, called a "leap second" added to
- // a day to account for the wobble of the earth. Most computer clocks
- // are not accurate enough to be able to reflect this distinction.
- // Some computer standards are defined in GMT, which is equivalent
- // to UT, Universal Time. GMT is the "civil" name for the standard,
- // UT is the "scientific" name for the same standard. The distinction
- // between UTC and UT is that the first is based on an atomic clock and
- // the second is based on astronomical observations, which for all
- // practical purposes is an invisibly fine hair to split.
- // An interesting source of further information is the
- // US Naval Observatory, particularly the
- // Directorate of Time
- // and their definitions of
- // Systems of Time.
- DEF_ENDLIST
- DEF_METHOD
- public Date()
- // Creates today's date/time.
- //
- DEF_ENDLIST
- DEF_METHOD
- public Date(long date)
- // Creates a date.
- // The fields are normalized before the Date object is created.
- // The argument does not have to be in the correct range. For
- // example, the 32nd of January is correctly interpreted as the
- // 1st of February. You can use this to figure out what day a
- // particular date falls on.
- //
- // Parameters:
- // date - the value of the argument to be created
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Date(int year,
- int month,
- int date)
- // Creates a date.
- // The fields are normalized before the Date object is created.
- // The arguments do not have to be in the correct range. For example,
- // the 32nd of January is correctly interpreted as the 1st of February.
- // You can use this to figure out what day a particular date falls on.
- //
- // Parameters:
- // year - a year after 1900
- // month - a month between 0-11
- // date - day of the month between 1-31
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Date(int year,
- int month,
- int date,
- int hrs,
- int min)
- // Creates a date.
- // The fields are normalized before the Date object is created.
- // The arguments do not have to be in the correct range. For example,
- // the 32nd of January is correctly interpreted as the 1st of February.
- // You can use this to figure out what day a particular date falls on.
- //
- // Parameters:
- // year - a year after 1900
- // month - a month between 0-11
- // date - day of the month between 1-31
- // hrs - hours between 0-23
- // min - minutes between 0-59
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Date(int year,
- int month,
- int date,
- int hrs,
- int min,
- int sec)
- // Creates a date. The fields are normalized before the Date object is
- // created. The arguments do not have to be in the correct range. For
- // example, the 32nd of January is correctly interpreted as the 1st of
- // February. You can use this to figure out what day a particular date
- // falls on.
- //
- // Parameters:
- // year - a year after 1900
- // month - a month between 0-11
- // date - day of the month between 1-31
- // hrs - hours between 0-23
- // min - minutes between 0-59
- // sec - seconds between 0-59
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Date(String s)
- // Creates a date from a string according to the syntax
- // accepted by parse().
- //
- DEF_ENDLIST
- DEF_METHOD
- public static long UTC(int year,
- int month,
- int date,
- int hrs,
- int min,
- int sec)
- // Calculates a UTC value from YMDHMS. Interpretes
- // the parameters in UTC, not in the local time zone.
- //
- // Parameters:
- // year - a year after 1900
- // month - a month between 0-11
- // date - day of the month between 1-31
- // hrs - hours between 0-23
- // min - minutes between 0-59
- // sec - seconds between 0-59
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public static long parse(String s)
- // Given a string representing a time, parse it and return the time value.
- // It accepts many syntaxes, but most importantly, in accepts the IETF
- // standard date syntax: "Sat, 12 Aug 1995 13:30:00 GMT". It understands
- // the continental US time zone abbreviations, but for general use, a
- // timezone offset should be used: "Sat, 12 Aug 1995 13:30:00 GMT+0430"
- // (4 hours, 30 minutes west of the Greenwich meridian).
- // If no time zone is specified, the local time zone is assumed.
- // GMT and UTC are considered equivalent.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getYear()
- // Returns the year after 1900.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setYear(int year)
- // Sets the year.
- //
- // Parameters:
- // year - the year value
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMonth()
- // Returns the month. This method assigns months with the
- // values 0-11, with January beginning at value 0.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setMonth(int month)
- // Sets the month.
- //
- // Parameters:
- // month - the month value (0-11)
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getDate()
- // Returns the day of the month. This method assigns days
- // with the values of 1 to 31.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setDate(int date)
- // Sets the date.
- //
- // Parameters:
- // date - the day value
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getDay()
- // Returns the day of the week. This method assigns days
- // of the week with the values 0-6, with 0 being Sunday.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getHours()
- // Returns the hour. This method assigns the value of the
- // hours of the day to range from 0 to 23, with midnight equal
- // to 0.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setHours(int hours)
- // Sets the hours.
- //
- // Parameters:
- // hours - the hour value
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getMinutes()
- // Returns the minute. This method assigns the minutes of an
- // hour to be any value from 0 to 59.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setMinutes(int minutes)
- // Sets the minutes.
- //
- // Parameters:
- // minutes - the value of the minutes
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getSeconds()
- // Returns the second. This method assigns the seconds of
- // a minute to values of 0-59.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setSeconds(int seconds)
- // Sets the seconds.
- //
- // Parameters:
- // seconds - the second value
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public long getTime()
- // Returns the time in milliseconds since the epoch.
- //
- DEF_ENDLIST
- DEF_METHOD
- public void setTime(long time)
- // Sets the time.
- //
- // Parameters:
- // time - The new time value in milliseconds since the epoch.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean before(Date when)
- // Checks whether this date comes before the specified date.
- //
- // Parameters:
- // when - the date to compare
- // Returns:
- // true if the original date comes before the specified
- // one; false otherwise.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean after(Date when)
- // Checks whether this date comes after the specified date.
- //
- // Parameters:
- // when - the date to compare
- // Returns:
- // true if the original date comes after the specified
- // one; false otherwise.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean equals(Object obj)
- // Compares this object against the specified object.
- //
- // Parameters:
- // obj - the object to compare with
- // Returns:
- // true if the objects are the same; false otherwise.
- // Overrides:
- // equals in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public int hashCode()
- // Computes a hashCode.
- //
- // Overrides:
- // hashCode in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toString()
- // Converts a date to a String, using the UNIX ctime conventions.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toLocaleString()
- // Converts a date to a String, using the locale conventions.
- //
- DEF_ENDLIST
- DEF_METHOD
- public String toGMTString()
- // Converts a date to a String, using the Internet GMT conventions.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int getTimezoneOffset()
- // Return the time zone offset in minutes for the current locale that is appropriate
- // for this time. This value would be a constant except for
- // daylight savings time.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Dictionary
- DEF_SUPERCLASS
- Object
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- util
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.util.Dictionary
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // The Dictionary class is the abstract parent of Hashtable, which maps
- // keys to values. Any object can be used as a key and/or value.
- //
- // See Also:
- // Hashtable, hashCode, equals
- //
- DEF_ENDLIST
- DEF_METHOD
- public Dictionary()
- // Returns the number of elements contained within the Dictionary.
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract boolean isEmpty()
- // Returns true if the Dictionary contains no elements.
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Enumeration keys()
- // Returns an enumeration of the Dictionary's keys.
- //
- // See Also:
- // elements, Enumeration
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Enumeration elements()
- // Returns an enumeration of the elements. Use the Enumeration methods
- // on the returned object to fetch the elements sequentially.
- //
- // See Also:
- // keys, Enumeration
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Object get(Object key)
- // Gets the object associated with the specified key in the Dictionary.
- //
- // Parameters:
- // key - the key in the hash table
- // Returns:
- // s the element for the key, or null if the key
- // is not defined in the hash table.
- // See Also:
- // put
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Object put(Object key,
- Object value)
- // Puts the specified element into the Dictionary, using the specified
- // key. The element may be retrieved by doing a get() with the same
- // key. The key and the element cannot be null.
- //
- // Parameters:
- // key - the specified hashtable key
- // value - the specified element
- // Returns:
- // the old value of the key, or null if it did not have one.
- // Throws: NullPointerException
- // If the value of the specified
- // element is null.
- // See Also:
- // get
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public abstract Object remove(Object key)
- // Removes the element corresponding to the key. Does nothing if the
- // key is not present.
- //
- // Parameters:
- // key - the key that needs to be removed
- // Returns:
- // the value of key, or null if the key was not found.
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- EmptyStackException
- DEF_SUPERCLASS
- RuntimeException
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- util
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.util.EmptyStackException
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- DEF_ENDLIST
- DEF_DECLARATION
- // Signals that the stack is empty.
- //
- // See Also:
- // Stack
- //
- DEF_ENDLIST
- DEF_METHOD
- public EmptyStackException()
- // Constructs a new EmptyStackException with no detail message.
- // A detail message is a String that describes the exception.
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
- DEF_COMPONENTNAME
- Hashtable
- DEF_SUPERCLASS
- Dictionary
- DEF_SUPERCOMPONENT
-
- DEF_PACKAGE
- java
- util
- DEF_ENDLIST
- DEF_SUBCOMPONENTLIST
- DEF_ENDLIST
- DEF_SUBCOMPONENTCLASSLIST
- DEF_ENDLIST
- DEF_CATEGORY
-
- DEF_BITMAP
-
- DEF_THUMBNAIL_UP
-
- DEF_THUMBNAIL_DOWN
-
- DEF_BASE
- DEF_IMPORTS
- java.util.Hashtable
- DEF_ENDLIST
- DEF_REQUIRES
- DEF_ENDLIST
- DEF_IMPLEMENTS
- Cloneable
- DEF_ENDLIST
- DEF_DECLARATION
- // Hashtable class. Maps keys to values. Any object can be used as
- // a key and/or value.
- // To sucessfully store and retrieve objects from a hash table, the
- // object used as the key must implement the hashCode() and equals()
- // methods.
- // This example creates a hashtable of numbers. It uses the names of
- // the numbers as keys:
- //
- // Hashtable numbers = new Hashtable();
- // numbers.put("one", new Integer(1));
- // numbers.put("two", new Integer(2));
- // numbers.put("three", new Integer(3));
- //
- // To retrieve a number use:
- //
- // Integer n = (Integer)numbers.get("two");
- // if (n != null) {
- // System.out.println("two = " + n);
- // }
- //
- //
- // See Also:
- // hashCode, equals
- //
- DEF_ENDLIST
- DEF_METHOD
- public Hashtable(int initialCapacity,
- float loadFactor)
- // Constructs a new, empty hashtable with the specified initial
- // capacity and the specified load factor.
- //
- // Parameters:
- // initialCapacity - the initial number of buckets
- // loadFactor - a number between 0.0 and 1.0, it defines
- // the threshold for rehashing the hashtable into
- // a bigger one.
- // Throws: IllegalArgumentException
- // If the initial capacity
- // is less than or equal to zero.
- // Throws: IllegalArgumentException
- // If the load factor is
- // less than or equal to zero.
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Hashtable(int initialCapacity)
- // Constructs a new, empty hashtable with the specified initial
- // capacity.
- //
- // Parameters:
- // initialCapacity - the initial number of buckets
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public Hashtable()
- // Constructs a new, empty hashtable. A default capacity and load factor
- // is used. Note that the hashtable will automatically grow when it gets
- // full.
- //
- DEF_ENDLIST
- DEF_METHOD
- public int size()
- // Returns the number of elements contained in the hashtable.
- //
- // Overrides:
- // size in class Dictionary
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public boolean isEmpty()
- // Returns true if the hashtable contains no elements.
- //
- // Overrides:
- // isEmpty in class Dictionary
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized Enumeration keys()
- // Returns an enumeration of the hashtable's keys.
- //
- // Overrides:
- // keys in class Dictionary
- // See Also:
- // elements, Enumeration
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized Enumeration elements()
- // Returns an enumeration of the elements. Use the Enumeration methods
- // on the returned object to fetch the elements sequentially.
- //
- // Overrides:
- // elements in class Dictionary
- // See Also:
- // keys, Enumeration
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized boolean contains(Object value)
- // Returns true if the specified object is an element of the hashtable.
- // This operation is more expensive than the containsKey() method.
- //
- // Parameters:
- // value - the value that we are looking for
- // Throws: NullPointerException
- // If the value being searched
- // for is equal to null.
- // See Also:
- // containsKey
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized boolean containsKey(Object key)
- // Returns true if the collection contains an element for the key.
- //
- // Parameters:
- // key - the key that we are looking for
- // See Also:
- // contains
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized Object get(Object key)
- // Gets the object associated with the specified key in the
- // hashtable.
- //
- // Parameters:
- // key - the specified key
- // Returns:
- // s the element for the key or null if the key
- // is not defined in the hash table.
- // Overrides:
- // get in class Dictionary
- // See Also:
- // put
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- protected void rehash()
- // Rehashes the content of the table into a bigger table.
- // This method is called automatically when the hashtable's
- // size exceeds the threshold.
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized Object put(Object key,
- Object value)
- // Puts the specified element into the hashtable, using the specified
- // key. The element may be retrieved by doing a get() with the same key.
- // The key and the element cannot be null.
- //
- // Parameters:
- // key - the specified key in the hashtable
- // value - the specified element
- // Returns:
- // the old value of the key, or null if it did not have one.
- // Throws: NullPointerException
- // If the value of the element
- // is equal to null.
- // Overrides:
- // put in class Dictionary
- // See Also:
- // get
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized Object remove(Object key)
- // Removes the element corresponding to the key. Does nothing if the
- // key is not present.
- //
- // Parameters:
- // key - the key that needs to be removed
- // Returns:
- // the value of key, or null if the key was not found.
- // Overrides:
- // remove in class Dictionary
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized void clear()
- // Clears the hash table so that it has no more elements in it.
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized Object clone()
- // Creates a clone of the hashtable. A shallow copy is made,
- // the keys and elements themselves are NOT cloned. This is a
- // relatively expensive operation.
- //
- // Overrides:
- // clone in class Object
- //
- //
- DEF_ENDLIST
- DEF_METHOD
- public synchronized String toString()
- // Converts to a rather lengthy String.
- //
- // Overrides:
- // toString in class Object
- //
- //
- DEF_ENDLIST
- DEF_ENDCOMPONENT
-