< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java

Print this page




   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt.macosx;
  27 

  28 import java.awt.*;
  29 import java.awt.datatransfer.Clipboard;
  30 import java.awt.dnd.*;
  31 import java.awt.dnd.peer.DragSourceContextPeer;
  32 import java.awt.event.InputEvent;
  33 import java.awt.event.InvocationEvent;
  34 import java.awt.event.KeyEvent;
  35 import java.awt.font.TextAttribute;
  36 import java.awt.im.InputMethodHighlight;
  37 import java.awt.im.spi.InputMethodDescriptor;
  38 import java.awt.peer.*;
  39 import java.lang.reflect.*;
  40 import java.net.URL;
  41 import java.security.*;
  42 import java.util.*;
  43 import java.util.concurrent.Callable;
  44 import java.net.MalformedURLException;
  45 
  46 import sun.awt.*;
  47 import sun.awt.datatransfer.DataTransferer;


 278         PopupMenuPeer peer = new CPopupMenu(target);
 279         targetCreatedPeer(target, peer);
 280         return peer;
 281     }
 282 
 283     @Override
 284     public SystemTrayPeer createSystemTray(SystemTray target) {
 285         return new CSystemTray();
 286     }
 287 
 288     @Override
 289     public TrayIconPeer createTrayIcon(TrayIcon target) {
 290         TrayIconPeer peer = new CTrayIcon(target);
 291         targetCreatedPeer(target, peer);
 292         return peer;
 293     }
 294 
 295     @Override
 296     public DesktopPeer createDesktopPeer(Desktop target) {
 297         return new CDesktopPeer();





 298     }
 299 
 300     @Override
 301     public LWCursorManager getCursorManager() {
 302         return CCursorManager.getInstance();
 303     }
 304 
 305     @Override
 306     public Cursor createCustomCursor(final Image cursor, final Point hotSpot,
 307                                      final String name)
 308             throws IndexOutOfBoundsException, HeadlessException {
 309         return new CCustomCursor(cursor, hotSpot, name);
 310     }
 311 
 312     @Override
 313     public Dimension getBestCursorSize(final int preferredWidth,
 314                                        final int preferredHeight)
 315             throws HeadlessException {
 316         return CCustomCursor.getBestCursorSize(preferredWidth, preferredHeight);
 317     }




   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import java.awt.peer.TaskbarPeer;
  29 import java.awt.*;
  30 import java.awt.datatransfer.Clipboard;
  31 import java.awt.dnd.*;
  32 import java.awt.dnd.peer.DragSourceContextPeer;
  33 import java.awt.event.InputEvent;
  34 import java.awt.event.InvocationEvent;
  35 import java.awt.event.KeyEvent;
  36 import java.awt.font.TextAttribute;
  37 import java.awt.im.InputMethodHighlight;
  38 import java.awt.im.spi.InputMethodDescriptor;
  39 import java.awt.peer.*;
  40 import java.lang.reflect.*;
  41 import java.net.URL;
  42 import java.security.*;
  43 import java.util.*;
  44 import java.util.concurrent.Callable;
  45 import java.net.MalformedURLException;
  46 
  47 import sun.awt.*;
  48 import sun.awt.datatransfer.DataTransferer;


 279         PopupMenuPeer peer = new CPopupMenu(target);
 280         targetCreatedPeer(target, peer);
 281         return peer;
 282     }
 283 
 284     @Override
 285     public SystemTrayPeer createSystemTray(SystemTray target) {
 286         return new CSystemTray();
 287     }
 288 
 289     @Override
 290     public TrayIconPeer createTrayIcon(TrayIcon target) {
 291         TrayIconPeer peer = new CTrayIcon(target);
 292         targetCreatedPeer(target, peer);
 293         return peer;
 294     }
 295 
 296     @Override
 297     public DesktopPeer createDesktopPeer(Desktop target) {
 298         return new CDesktopPeer();
 299     }
 300     
 301     @Override
 302     public TaskbarPeer createTaskbarPeer(Taskbar target) {
 303         return new CTaskbarPeer();
 304     }
 305 
 306     @Override
 307     public LWCursorManager getCursorManager() {
 308         return CCursorManager.getInstance();
 309     }
 310 
 311     @Override
 312     public Cursor createCustomCursor(final Image cursor, final Point hotSpot,
 313                                      final String name)
 314             throws IndexOutOfBoundsException, HeadlessException {
 315         return new CCustomCursor(cursor, hotSpot, name);
 316     }
 317 
 318     @Override
 319     public Dimension getBestCursorSize(final int preferredWidth,
 320                                        final int preferredHeight)
 321             throws HeadlessException {
 322         return CCustomCursor.getBestCursorSize(preferredWidth, preferredHeight);
 323     }


< prev index next >