Docstoc

API

Document Sample
API Powered By Docstoc
					       FLASHMEDIUM (fm)
       //JAVA




 #           PACKAGE NAME             CLASS NAME           METHOD NAME       PARAMETER LIST                COMMENTS
     1 java.lang             System                print( )              string               Output data screen.
     2 java.lang             System                read( )               none                 Reads input from keyboard one byte
                                                                                              at a time. This method returns the
                                                                                              interger equivalent of the byte.
     3 java.lang             Math                  pow (x,y)             2 interger values    Calculates powers, x raised to the
                                                                                              power of y.
     4 java.lang             Math                  round (x)             double or float      Rounds closest interger to x, where x
                                                                                              is a flow or a double, and returns an
                                                                                              interger or long.
     5 java.lang             String                length ( )            None                 Returns the number of characters
                                                                                              within a string (interger).
     6 java.lang             String                equals( )             string               Case sensitive method used to
                                                                                              compare 2 strings and returns a
                                                                                              true/false boolean.
     7 java.lang             String                equalIgnoreCase( )    string               Ignores case, method used to
                                                                                              compare 2 strings and returns a
                                                                                              true/false boolian.
     8 java.lang             String                compareTo( )          string               Returns integer. Used to sort arrays,
                                                                                              will compare the calling string to the
                                                                                              called string, will return zero if both
                                                                                              strins are =, will return a negative
                                                                                              number if the calling string is < the
                                                                                              called string, will return a positive
                                                                                              number if the calling string > the
                                                                                              called string.
     9 java.lang             String                toUpperCase( )                             Returns the capitalized equivalence of
                                                                                              the string.
  10 java.lang               String                toLowerCase( )                             Returns the lower case equivalence of
                                                                                              the string.
  11 java.lang               String                indexOf( )            character            Returns integer, this function will
                                                                                              return the position of the first
                                                                                              occurance of a character and a string.




ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                1
 #        PACKAGE NAME                CLASS NAME         METHOD NAME            PARAMETER LIST                 COMMENTS
 12 java.lang                String                charAt( )              int                     This method will return the character
                                                                                                  at the position, which the parameter
                                                                                                  specifies.

  13 java.lang               String                endsWith( )            ( "String" )            This method will return a true/false,
                                                                                                  will determine if the string ends with
                                                                                                  the specified parameter.
  14 java.lang               String                startsWith( )          ( " String " )          This method will return a true/false,
                                                                                                  will determine if the string starts with
                                                                                                  the specified parameter.
  15 java.lang               String                replace( )             (char,char)             This method returns void and will
                                                                                                  replace all occurrences of the letter.
  14 java.lang               String                subString( )           (int,int)               This method will return a string, it
                                                                                                  allows to extract any part of a string
                                                                                                  where the 1st argument of the
                                                                                                  parameter is a starting point and the
                                                                                                  2nd argument is the end point.
  15 java.lang               String                toString( )            (primitive data type)
                                                                                                  This method will return a string.
  16 java.lang               Double                parseDouble( )         string                  This method will return a double.
 17 java.lang                Float                 parseFloat( )          string                  This method will return a float.
 18 java.lang                Interger              parseInt( )            string                  This method will return an interger.
 19 javax.swing              JOptionPane           showInputDialogue( )   string                  This method outputs to the screen a
                                                                                                  graphic dialogue box.
  20 java.text               DecimalFormat         format( )              float,double            Format masks float and doubles to
                                                                                                  the programmer' specifications e.g.
                                                                                                  ("0.00")
 21 java.lang                StringBuffer          append( )              string                  Appends the parameter to the end of
                                                                                                  a string.
 22 java.lang                StringBuffer          insert( )              (int,"String")          This method will insert the second
                                                                                                  argument (a string) into the position
                                                                                                  indicated by the first argument.
 23 java.lang                StringBuffer          setCharAt( )           (int, ' ')              This method will replace a single
                                                                                                  character with the character in the
                                                                                                  second argument to the position
                                                                                                  indicated by the first argument.
 24 java.applet.*            Applet                init ( )                                       Execute the applet.
 25 java.applet.*            Applet                start ( )                                      This method is performed when the
                                                                                                  applet's window is active.



ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                     2
 #       PACKAGE NAME                 CLASS NAME             METHOD NAME      PARAMETER LIST                   COMMENTS
 26 java.applet.*            Applet                stop( )                                        This method is performed when the
                                                                                                  applet's window is inactive.
 27 java.applet.*            Applet                destroy( )                                     This method is performed when the
                                                                                                  applet is closed.
 28 java.applet.*            Applet                add( )                  (receives component)   This method adds a previously
                                                                                                  instantiated object (component) to the
                                                                                                  applet.
 29 java.applet.*            Applet                remove( )               (receives component)   This method removes a component
                                                                                                  from the applet.
 30 java.awt                 Label                 setText( )              ( "String" )           This method allows to set or change
                                                                                                  text on a label.
 31 java.awt                 Button                setLabel( )             ( "String" )           This method allows to change or
                                                                                                  apply the text to a button.
 32 java.awt                 Font                  setFont( )              ( Font object )        This method allows to apply font
                                                                                                  styles.
 33 java.awt                 EventObject           getSource( )                                   This method returns the object
                                                                                                  involved in the event.
 34 java.awt                 Applet                setLocation( )          ( x,y )                This method allows to place the
                                                                                                  component to a specific location
                                                                                                  whithin the applet.
 35 java.awt                 Applet                setEnabled( )           true/false             This method allows a component to
                                                                                                  be available or unavailable.
 36 java.awt                 Applet                invalidate( )                                  This method tells applet it's out of
                                                                                                  date.
 36 java.awt                 Applet                validate( )                                    This method updates applet to
                                                                                                  automatically resize to accommodate
                                                                                                  any changes.
 37 java.awt                 Graphics              paint( )                ( Graphics g )         This method runs when java displays
                                                                                                  an applet and execute automatically
                                                                                                  every time the applet minimizes or
                                                                                                  maximizes.
 38 java.awt                 Graphics              repaint( )                                     This method is used to call the paint
                                                                                                  method for the fact that paint cannot
                                                                                                  be directly called. This method
                                                                                                  actually calls on the update method.
 39 java.awt                 Graphics              update( )                                      This method calls paint.
 40 java.awt                 Graphics              drawLine( )             ( x, y, x, y )         This method draws a line starting at
                                                                                                  the first set of xy coordinates and
                                                                                                  ends at the second set of xy
                                                                                                  coordinates.

ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                   3
 #       PACKAGE NAME               CLASS NAME        METHOD NAME       PARAMETER LIST                          COMMENTS
 41 java.awt                 Graphics            drawRect( )        ( x, y, w, h )                 This method draws a rectangle
                                                                                                   starting at the xy coordinates with a
                                                                                                   width and height specified in the third
                                                                                                   and forth arguments.
 42 java.awt                 Graphics            drawOval( )        ( x,, y, w, h )                This method draws an oval starting at
                                                                                                   the xy coordinates with a width and
                                                                                                   height specified in the third and forth
                                                                                                   arguments.
 43 java.awt                 Graphics            drawString( )      ( "string", x, y )             This method draws a string starting at
                                                                                                   the bottom left of the xy coordinates.

 44 java.awt                 Graphics            fillOval( )        ( x, y, w, h )                 This method fills an oval starting at
                                                                                                   the xy coordinates with a specified
                                                                                                   width and height.
 45 java.awt                 Graphics            fillRect( )        ( x, y, w, h )                 This method fills a rectangle starting
                                                                                                   at the xy coordinates with a specified
                                                                                                   width and height.
 46 java.awt                 Graphics            drawRoundRect( )   ( x, y, w, h, arc w, arc h )   This method draws a rectangle with
                                                                                                   rounded edges starting at the xy
                                                                                                   coordinates with a width and height
                                                                                                   specified in the argument list and
                                                                                                   width and height arcs specified in the
                                                                                                   last two arguments.
 47 java.awt                 Graphics            fillRoundRect( )   ( x, y, w, h, arc w, arc h )   This method fills a rectangle with
                                                                                                   rounded edges starting at the xy
                                                                                                   coordinates with a width and height
                                                                                                   specified in the argument list and
                                                                                                   width and height arcs specified in the
                                                                                                   last two arguments.
 48 java.awt                 Graphics            setColor( )        ( Color object or Color        This method sets the color to all
                                                                    constant )                     objects following its execution.
 49 java.awt                 Graphics            setBackground( )   ( Color object or Color        This method sets the background
                                                                    constant )                     color of the applet.
 50 java.awt                 Graphics            getRed( )          ( Color object or Color        This method returns an integer
                                                                    constant )                     equivalent to the amount of red in a
                                                                                                   color.
 51 java.awt                 Graphics            getGreen( )        ( Color object or Color        This method returns an integer
                                                                    constant )                     equivalent to the amount of green in a
                                                                                                   color.

ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                     4
 #       PACKAGE NAME               CLASS NAME         METHOD NAME         PARAMETER LIST                           COMMENTS
 52 java.awt                 Graphics            getBlue( )             ( Color object or Color         This method returns an integer
                                                                        constant )                      equivalent to the amount of blue in a
                                                                                                        color.
 53 java.awt                 Graphics            getGraphics( )                                         This method gives a particular
                                                                                                        reference (gr); all the methods in the
                                                                                                        Graphics Class.
 54 java.awt                 Graphics            clearRect( )           ( x, y, w, h )                  This method draws a rectangle with
                                                                                                        the background color of the applet.
 55 java.awt                 Graphics            drawArc( )             ( x, y, w, h, beginning of arc This method draws an arc.
                                                                        position, arc angle )
 56 java.awt                 Graphics            drawPolygon( )         ( int array, int array, int )      This method is used to create a
                                                                                                           complex shape. It uses the
                                                                                                           coordinates in both arrays and the last
                                                                                                           argument is number of points to be
                                                                                                           connected.
 57 java.awt                 Graphics            fillPolygon( )         ( int array, int array, int ) or ( This method fills a complex shape.
                                                                        Polygon object )
 58 java.awt                 Graphics            draw3DRect( )          ( x, y, w, h, true/false )         This method draws a raised rectangle
                                                                                                           effect. If the boolian value is false
                                                                                                           then it gives a lower rectangle effect
                                                                                                           and vice versa.
 59 java.awt                 Frame               setTitle( )            ( "String" )                    Assigns a title to a frame
 60 java.awt                 Frame               setSize( )             ( int, int )                    Sets the size of the frame according to
                                                                                                        the arguments specified (measured in
                                                                                                        pixels).
 61 java.awt                 Frame               setVisible( )          ( true/false )                  Sets the frame visible or hides it.
 62 java.awt                 Component           getComponentCount( )                                   This method returns an int, equivalent
                                                                                                        to the number of Components in a
                                                                                                        Container.
 63 java.awt                 Component           getComponent( )        ( int )                         This method returns an object name.
                                                                                                        An object's number is actually reflects
                                                                                                        the order it was placed into the
                                                                                                        Container (like an element in an
                                                                                                        array).
 64 java.awt                 Component           removeAll( )                                           Removes all Components in a
                                                                                                        Container
 65 java.awt                 Component           getFont( )                                             Returns the Font used to draw a
                                                                                                        Component.
 66 java.awt                 Component           isEnabled( )                                           This method returns whether a
                                                                                                        component can respond to a user or
ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                             5
 #      PACKAGE NAME                  CLASS NAME            METHOD NAME        PARAMETER LIST               This method returns whether a
                                                                                                                      COMMENTS
                                                                                                            component can respond to a user or

 67 java.awt                 Component             isVisible( )                                             Returns whether a Component is
                                                                                                            visible.
 68 java.awt                 Component             isShowing( )                                             Returns whether a Component is set
                                                                                                            as visible and not obscurred by other
                                                                                                            Components.
 69 java.awt                 Checkbox              setState( )              ( true/false )                  Sets the Checkbox to true for checked
                                                                                                            or false for unchecked.
 70 java.awt                 Checkbox              getState( )                                              Gets the current state of a Checkbox

 71 java.awt                 CheckboxGroup         getSelectedCheckbox( )                                   Returns the currently selected
                                                                                                            Checkbox
 72 java.awt                 CheckboxGroup         setSelectedCheckbox( )   ( Checkbox box )                Selects, or makes true the named box.
                                                                                                            All other boxes in group will become
                                                                                                            false.
 73 java.awt                 Choice                select( )                ( int )                         Selects item at the index specified by
                                                                                                            the argument.
 74 java.awt                 Choice                getSelectedItem( )                                       Returns the name of the currently
                                                                                                            selected item.
 75 java.awt                 Choice                getItemCount( )                                          Returns the number of items in a
                                                                                                            Choice/List.
 76 java.awt                 Choice                getItem( )               ( String )                      Returns the name of the item at the
                                                                                                            desired index position.
 77 java.awt                 Choice                getSelectedIndex( )      ( int )                         Returns the position of the currently
                                                                                                            selected item.
 78 java.awt                 List                  add( )                   ( String item )                 Adds an item to the list

 79 java.awt                 List                  add( )                   ( String item, int position )   Adds an item to the indicated position
                                                                                                            in the list.
 80 java.awt                 List                  remove( )                ( int position )                Removes the item at the indicated
                                                                                                            position
 81 java.awt                 List                  deselect( )              ( int position )                Deselects the item at the indicated
                                                                                                            position
 82 java.awt                 List                  isSelected( )            ( int position )                Determines in the item at the
                                                                                                            indicated position is selected
 83 java.awt                 List                  setMultipleMode( )       ( boolean )                     Allows the List to accept multiple
                                                                                                            selections based on a true or false
                                                                                                            argument
 84 java.awt                 List                  isMultipleMode( )                                        Returns wether multiple selections are
                                                                                                            allowed ( boolean).
ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                             6
 #        PACKAGE NAME                CLASS NAME              METHOD NAME      PARAMETER LIST             Returns wether multiple selections are
                                                                                                                       COMMENTS
                                                                                                          allowed ( boolean).
  85 java.awt                List                  getSelectedIndexes( )                                  Returns an array of integers with
                                                                                                          positions of all selected items( int [ ] )
  86 java.awt                List                  getSelectedItems( )                                    Returns an array of names of the
                                                                                                          selected items
  87 java.lang               Thread                start( )                                               Starts the thread, causing the run( )
                                                                                                          method to execute
  88 java.lang               Thread                stop( )                                                Stops the thread

  89 java.lang               Thread                suspend ( )                                            Suspends the Thread until you use the
                                                                                                          resume( ) method
  90 java.lang               Thread                resume( )                                              Resumes the Thread you suspend

 100 java.lang               Thread                isAlive( )                                             Returns true/false to indicate whether
                                                                                                          the thread is currently running

 101 java.lang               Thread                setPriority( )           ( int )                       Lets you set a priority from 1 to 10
                                                                                                          for the Thread by passing in an
                                                                                                          integer.
 102 java.lang               Thread                run( )                                                 Tells system to execute the Thread
 103 java.lang               Thread                sleep( )                 ( int )                       Stops thread execution for a number
                                                                                                          of specified milliseconds
 104 java.awt                Image                 getImage( )              ( getDocumentBase( ),         Loads image to applet. Defaults to
                                                                            "name of image.ext"" )        local drive.
 105 java.awt                Image                 drawImage( )             ( imagename, x , y , this )   This method draw the image onto the
                                                                                                          applet to the specified coordinates.
                                                                                                          The last argument is the image
                                                                                                          observer. It updates the image as it
                                                                                                          loads. ( i.e. the applet itself )
 106 java.lang               System                gc( )                                                  Request system to run garbage
                                                                                                          collection. Has a low priority Thread.




ddb1d31b-16d9-43fa-82ad-cfa627e73fc5.xls                                                                                                               7
//Java Interfaces

                               Interface                                              Methods                            Comments
ActionListener - interface or set of specifications for methods you can   addActionListener( this )        Tells applet to expect an
use with Event objects form the java.awt.event package ( examples of                                       ActionEvent. You can specify from
event classes: ActionEvent, ComponentEvent, TextEvent )                                                    which component the applet should
                                                                                                           expect an action from
                                                                          actionPerformed( ActionEvent e ) When an applet registers as a Listener
                                                                                                           this method will execute depending
                                                                                                           which button is clicked
WindowListener - inteface which responds to WindowEvent objects. It       windowClosing( )                 Executes when button to close
has 7 abstract methods which must be overwritten.                                                          window is clicked
                                                                          windowClosed( )                  Executes when window is closed

                                                                          windowOpened( )                    Executes when window opened

                                                                          windowDeactivated( )               Executes when window is
                                                                                                             deactivated
                                                                          windowActivated( )                 Executes when window is activated
                                                                          windowIconified( )
                                                                                                          Executes when window is minimized
                                                                          windowDeiconified( )            Executes when window is
                                                                                                          maximized
ItemListener - this interface has one abstract method whichresponds to    addItemListener( this )         Tells applet to expect an ItemEvent.
ItemEvent objects                                                                                         You can specify from which item the
                                                                                                          applet should expect an event from
                                                                          itemStateChanged( ItemEvent e ) Executes when user changes status of
                                                                                                          a registered ItemListener




                                                                                                                                                    8

				
DOCUMENT INFO
Categories:
Tags:
Stats:
views:16
posted:7/30/2012
language:Latin
pages:8