1 /*
   2  * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   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.awt;
  27 
  28 import sun.awt.datatransfer.DataTransferer;
  29 
  30 import java.awt.*;
  31 import java.awt.dnd.*;
  32 import java.awt.dnd.peer.DragSourceContextPeer;
  33 import java.awt.peer.*;
  34 
  35 /**
  36  * Interface for component creation support in toolkits
  37  */
  38 public interface ComponentFactory {
  39 
  40     CanvasPeer createCanvas(Canvas target) throws HeadlessException;
  41 
  42     PanelPeer createPanel(Panel target) throws HeadlessException;
  43 
  44     WindowPeer createWindow(Window target) throws HeadlessException;
  45 
  46     FramePeer createFrame(Frame target) throws HeadlessException;
  47 
  48     DialogPeer createDialog(Dialog target) throws HeadlessException;
  49 
  50     ButtonPeer createButton(Button target) throws HeadlessException;
  51 
  52     TextFieldPeer createTextField(TextField target)
  53         throws HeadlessException;
  54 
  55     ChoicePeer createChoice(Choice target) throws HeadlessException;
  56 
  57     LabelPeer createLabel(Label target) throws HeadlessException;
  58 
  59     ListPeer createList(List target) throws HeadlessException;
  60 
  61     CheckboxPeer createCheckbox(Checkbox target)
  62         throws HeadlessException;
  63 
  64     ScrollbarPeer createScrollbar(Scrollbar target)
  65         throws HeadlessException;
  66 
  67     ScrollPanePeer createScrollPane(ScrollPane target)
  68         throws HeadlessException;
  69 
  70     TextAreaPeer createTextArea(TextArea target)
  71         throws HeadlessException;
  72 
  73     FileDialogPeer createFileDialog(FileDialog target)
  74         throws HeadlessException;
  75 
  76     MenuBarPeer createMenuBar(MenuBar target) throws HeadlessException;
  77 
  78     MenuPeer createMenu(Menu target) throws HeadlessException;
  79 
  80     PopupMenuPeer createPopupMenu(PopupMenu target)
  81         throws HeadlessException;
  82 
  83     MenuItemPeer createMenuItem(MenuItem target)
  84         throws HeadlessException;
  85 
  86     CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)
  87         throws HeadlessException;
  88 
  89     DragSourceContextPeer createDragSourceContextPeer(
  90         DragGestureEvent dge)
  91         throws InvalidDnDOperationException, HeadlessException;
  92 
  93     FontPeer getFontPeer(String name, int style);
  94 
  95     RobotPeer createRobot(Robot target, GraphicsDevice screen)
  96         throws AWTException, HeadlessException;
  97 
  98     DataTransferer getDataTransferer();
  99 
 100 }