@@ -1493,66 +1493,66 @@ public Cursor createCustomCursor(Image cursor, Point hotSpot, String name)
14931493// }
14941494 }
14951495
1496- // /**
1497- // * Returns the supported cursor dimension which is closest to the desired
1498- // * sizes. Systems which only support a single cursor size will return that
1499- // * size regardless of the desired sizes. Systems which don't support custom
1500- // * cursors will return a dimension of 0, 0. <p>
1501- // * Note: if an image is used whose dimensions don't match a supported size
1502- // * (as returned by this method), the Toolkit implementation will attempt to
1503- // * resize the image to a supported size.
1504- // * Since converting low-resolution images is difficult,
1505- // * no guarantees are made as to the quality of a cursor image which isn't a
1506- // * supported size. It is therefore recommended that this method
1507- // * be called and an appropriate image used so no image conversion is made.
1508- // *
1509- // * @param preferredWidth the preferred cursor width the component would like
1510- // * to use.
1511- // * @param preferredHeight the preferred cursor height the component would like
1512- // * to use.
1513- // * @return the closest matching supported cursor size, or a dimension of 0,0 if
1514- // * the Toolkit implementation doesn't support custom cursors.
1515- // * @exception HeadlessException if GraphicsEnvironment.isHeadless()
1516- // * returns true
1517- // * @see java.awt.GraphicsEnvironment#isHeadless
1518- // * @since 1.2
1519- // */
1520- // public Dimension getBestCursorSize(int preferredWidth,
1521- // int preferredHeight) {
1496+ /**
1497+ * Returns the supported cursor dimension which is closest to the desired
1498+ * sizes. Systems which only support a single cursor size will return that
1499+ * size regardless of the desired sizes. Systems which don't support custom
1500+ * cursors will return a dimension of 0, 0. <p>
1501+ * Note: if an image is used whose dimensions don't match a supported size
1502+ * (as returned by this method), the Toolkit implementation will attempt to
1503+ * resize the image to a supported size.
1504+ * Since converting low-resolution images is difficult,
1505+ * no guarantees are made as to the quality of a cursor image which isn't a
1506+ * supported size. It is therefore recommended that this method
1507+ * be called and an appropriate image used so no image conversion is made.
1508+ *
1509+ * @param preferredWidth the preferred cursor width the component would like
1510+ * to use.
1511+ * @param preferredHeight the preferred cursor height the component would like
1512+ * to use.
1513+ * @return the closest matching supported cursor size, or a dimension of 0,0 if
1514+ * the Toolkit implementation doesn't support custom cursors.
1515+ * @exception HeadlessException if GraphicsEnvironment.isHeadless()
1516+ * returns true
1517+ * @see java.awt.GraphicsEnvironment#isHeadless
1518+ * @since 1.2
1519+ */
1520+ public Dimension getBestCursorSize (int preferredWidth ,
1521+ int preferredHeight ) {
15221522// // Override to implement custom cursor support.
15231523// if (this != Toolkit.getDefaultToolkit()) {
15241524// return Toolkit.getDefaultToolkit().
15251525// getBestCursorSize(preferredWidth, preferredHeight);
15261526// } else {
1527- // return new Dimension(0, 0);
1527+ return new Dimension (0 , 0 );
15281528// }
1529- // }
1529+ }
15301530
1531- // /**
1532- // * Returns the maximum number of colors the Toolkit supports in a custom cursor
1533- // * palette.<p>
1534- // * Note: if an image is used which has more colors in its palette than
1535- // * the supported maximum, the Toolkit implementation will attempt to flatten the
1536- // * palette to the maximum. Since converting low-resolution images is difficult,
1537- // * no guarantees are made as to the quality of a cursor image which has more
1538- // * colors than the system supports. It is therefore recommended that this method
1539- // * be called and an appropriate image used so no image conversion is made.
1540- // *
1541- // * @return the maximum number of colors, or zero if custom cursors are not
1542- // * supported by this Toolkit implementation.
1543- // * @exception HeadlessException if GraphicsEnvironment.isHeadless()
1544- // * returns true
1545- // * @see java.awt.GraphicsEnvironment#isHeadless
1546- // * @since 1.2
1547- // */
1548- // public int getMaximumCursorColors() {
1549- // // Override to implement custom cursor support.
1531+ /**
1532+ * Returns the maximum number of colors the Toolkit supports in a custom cursor
1533+ * palette.<p>
1534+ * Note: if an image is used which has more colors in its palette than
1535+ * the supported maximum, the Toolkit implementation will attempt to flatten the
1536+ * palette to the maximum. Since converting low-resolution images is difficult,
1537+ * no guarantees are made as to the quality of a cursor image which has more
1538+ * colors than the system supports. It is therefore recommended that this method
1539+ * be called and an appropriate image used so no image conversion is made.
1540+ *
1541+ * @return the maximum number of colors, or zero if custom cursors are not
1542+ * supported by this Toolkit implementation.
1543+ * @exception HeadlessException if GraphicsEnvironment.isHeadless()
1544+ * returns true
1545+ * @see java.awt.GraphicsEnvironment#isHeadless
1546+ * @since 1.2
1547+ */
1548+ public int getMaximumCursorColors () {
1549+ // Override to implement custom cursor support.
15501550// if (this != Toolkit.getDefaultToolkit()) {
15511551// return Toolkit.getDefaultToolkit().getMaximumCursorColors();
15521552// } else {
1553- // return 0;
1553+ return 0 ;
15541554// }
1555- // }
1555+ }
15561556
15571557 /**
15581558 * Returns whether Toolkit supports this state for
0 commit comments