/[classpath]/classpath/java/awt/Toolkit.java
ViewVC logotype

Diff of /classpath/java/awt/Toolkit.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by mkoch, Thu Feb 13 07:07:08 2003 UTC revision 1.17 by mkoch, Tue Mar 25 12:20:30 2003 UTC
# Line 448  public abstract class Toolkit Line 448  public abstract class Toolkit
448     * Returns the names of the available fonts.     * Returns the names of the available fonts.
449     *     *
450     * @return The names of the available fonts.     * @return The names of the available fonts.
451       *
452       * @deprecated
453     */     */
454    public abstract String[] getFontList();    public abstract String[] getFontList();
455    
# Line 457  public abstract class Toolkit Line 459  public abstract class Toolkit
459     * @param name The name of the font to return metrics for.     * @param name The name of the font to return metrics for.
460     *     *
461     * @return The requested font metrics.     * @return The requested font metrics.
462       *
463       * @deprecated
464     */     */
465    public abstract FontMetrics getFontMetrics(Font name);    public abstract FontMetrics getFontMetrics(Font name);
466    
# Line 597  public abstract class Toolkit Line 601  public abstract class Toolkit
601     *     *
602     * @return The requested print job, or <code>null</code> if the job     * @return The requested print job, or <code>null</code> if the job
603     * was cancelled.     * was cancelled.
604       *
605       * @exception NullPointerException If frame is null,
606       * or GraphicsEnvironment.isHeadless() returns true.
607       * @exception SecurityException If this thread is not allowed to initiate
608       * a print job request.
609     */     */
610    public abstract PrintJob getPrintJob(Frame frame, String title,    public abstract PrintJob getPrintJob(Frame frame, String title,
611                                         Properties props);                                         Properties props);
612    
   
613    /**    /**
614       * Returns a instance of <code>PrintJob</code> for the specified
615       * arguments.
616       *
617       * @param frame The window initiating the print job.
618       * @param title The print job title.
619       * @param jobAttr A set of job attributes which will control the print job.
620       * @param pageAttr A set of page attributes which will control the print job.
621       *
622       * @exception NullPointerException If frame is null, and either jobAttr is null
623       * or jobAttr.getDialog() returns JobAttributes.DialogType.NATIVE.
624       * @exception IllegalArgumentException If pageAttrspecifies differing cross
625       * feed and feed resolutions, or when GraphicsEnvironment.isHeadless() returns
626       * true.
627       * @exception SecurityException If this thread is not allowed to initiate
628       * a print job request.
629       *
630     * @since 1.3     * @since 1.3
631     */     */
632    public PrintJob getPrintJob(Frame frame, String title,    public PrintJob getPrintJob(Frame frame, String title,
# Line 626  public abstract class Toolkit Line 650  public abstract class Toolkit
650    public abstract Clipboard getSystemClipboard();    public abstract Clipboard getSystemClipboard();
651    
652    /**    /**
653       * Gets the singleton instance of the system selection as a Clipboard object.
654       *
655     * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.     * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
656     *     *
657     * @since 1.4     * @since 1.4
# Line 649  public abstract class Toolkit Line 675  public abstract class Toolkit
675      return Event.CTRL_MASK;      return Event.CTRL_MASK;
676    }    }
677    
678      /**
679       * Returns whether the given locking key on the keyboard is currently in its
680       * "on" state.
681       *
682       * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
683       * @exception IllegalArgumentException If keyCode is not one of the valid keys.
684       * @exception UnsupportedOperationException If the host system doesn't allow
685       * getting the state of this key programmatically, or if the keyboard doesn't
686       * have this key.
687       */
688    public boolean getLockingKeyState(int keyCode)    public boolean getLockingKeyState(int keyCode)
689    {    {
690      if (keyCode != KeyEvent.VK_CAPS_LOCK      if (keyCode != KeyEvent.VK_CAPS_LOCK
691          && keyCode != KeyEvent.VK_NUM_LOCK          && keyCode != KeyEvent.VK_NUM_LOCK
692          && keyCode != KeyEvent.VK_SCROLL_LOCK)          && keyCode != KeyEvent.VK_SCROLL_LOCK)
693        throw new IllegalArgumentException();        throw new IllegalArgumentException();
694        
695      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
696    }    }
697    
698      /**
699       * Sets the state of the given locking key on the keyboard.
700       *
701       * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
702       * @exception IllegalArgumentException If keyCode is not one of the valid keys.
703       * @exception UnsupportedOperationException If the host system doesn't allow
704       * getting the state of this key programmatically, or if the keyboard doesn't
705       * have this key.
706       */
707    public void setLockingKeyState(int keyCode, boolean on)    public void setLockingKeyState(int keyCode, boolean on)
708    {    {
709      if (keyCode != KeyEvent.VK_CAPS_LOCK      if (keyCode != KeyEvent.VK_CAPS_LOCK
710          && keyCode != KeyEvent.VK_NUM_LOCK          && keyCode != KeyEvent.VK_NUM_LOCK
711          && keyCode != KeyEvent.VK_SCROLL_LOCK)          && keyCode != KeyEvent.VK_SCROLL_LOCK)
712        throw new IllegalArgumentException();        throw new IllegalArgumentException();
713        
714      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
715    }    }
716    
# Line 697  public abstract class Toolkit Line 744  public abstract class Toolkit
744        }        }
745    }    }
746    
747      /**
748       * Creates a new custom cursor object.
749       *
750       * @exception IndexOutOfBoundsException If the hotSpot values are outside
751       * the bounds of the cursor.
752       * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
753       */
754    public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)    public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
755    {    {
756      // Presumably the only reason this isn't abstract is for backwards      // Presumably the only reason this isn't abstract is for backwards
# Line 704  public abstract class Toolkit Line 758  public abstract class Toolkit
758      return null;      return null;
759    }    }
760    
761      /**
762       * Returns the supported cursor dimension which is closest to the
763       * desired sizes.
764       *
765       * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
766       */
767    public Dimension getBestCursorSize(int preferredWidth, int preferredHeight)    public Dimension getBestCursorSize(int preferredWidth, int preferredHeight)
768    {    {
769      return new Dimension (0,0);      return new Dimension (0,0);
770    }    }
771    
772      /**
773       * Returns the maximum number of colors the Toolkit supports in a custom
774       * cursor palette.
775       *
776       * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
777       */
778    public int getMaximumCursorColors()    public int getMaximumCursorColors()
779    {    {
780      return 0;      return 0;
781    }    }
782    
783    /**    /**
784       * Returns whether Toolkit supports this state for Frames.
785       *
786       * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
787       *
788     * @since 1.4     * @since 1.4
789     */     */
790    public boolean isFrameStateSupported(int state)    public boolean isFrameStateSupported(int state)

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26