APIdia Launch Partner
Top Description Methods
sun.awt

public Interface ComponentFactory

Additional top-level class in compilation unit: LightweightPeerHolder.

Known Direct Implementers
sun.awt.HeadlessToolkit, sun.awt.SunToolkit
Imports
java.awt.AWTException, .Button, .Canvas, .Checkbox, .CheckboxMenuItem, .Choice, .Component, .Desktop, .Dialog, .FileDialog, .Frame, .GraphicsDevice, .HeadlessException, .Label, .Menu, .MenuBar, .MenuItem, .Panel, .PopupMenu, .ScrollPane, .Scrollbar, .Taskbar, .TextArea, .TextField, .Window, java.awt.dnd.DragGestureEvent, .InvalidDnDOperationException, java.awt.dnd.peer.DragSourceContextPeer, java.awt.peer.ButtonPeer, .CanvasPeer, .CheckboxMenuItemPeer, .CheckboxPeer, .ChoicePeer, .DesktopPeer, .DialogPeer, .FileDialogPeer, .FontPeer, .FramePeer, .LabelPeer, .LightweightPeer, .ListPeer, .MenuBarPeer, .MenuItemPeer, .MenuPeer, .MouseInfoPeer, .PanelPeer, .PopupMenuPeer, .RobotPeer, .ScrollPanePeer, .ScrollbarPeer, .TaskbarPeer, .TextAreaPeer, .TextFieldPeer, .WindowPeer, sun.awt.datatransfer.DataTransferer

Interface for component creation support in toolkits.

Method Summary

Modifier and TypeMethod and Description
public default ButtonPeer

Returns:

this toolkit's implementation of Button
createButton
(Button
the button to be implemented
target
)

Creates this toolkit's implementation of Button using the specified peer interface.

public default CanvasPeer

Returns:

this toolkit's implementation of Canvas
createCanvas
(Canvas
the canvas to be implemented
target
)

Creates this toolkit's implementation of Canvas using the specified peer interface.

public default CheckboxPeer

Returns:

this toolkit's implementation of Checkbox
createCheckbox
(Checkbox
the check box to be implemented
target
)

Creates this toolkit's implementation of Checkbox using the specified peer interface.

public default CheckboxMenuItemPeer

Returns:

this toolkit's implementation of CheckboxMenuItem
createCheckboxMenuItem
(CheckboxMenuItem
the checkbox menu item to be implemented
target
)

Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.

public default ChoicePeer

Returns:

this toolkit's implementation of Choice
createChoice
(Choice
the choice to be implemented
target
)

Creates this toolkit's implementation of Choice using the specified peer interface.

public default LightweightPeer

Returns:

the peer for the specified component
createComponent
(Component
The Component to be created
target
)

Creates a peer for a component or container.

public default DesktopPeer

Returns:

this toolkit's implementation of the Desktop
createDesktopPeer
(Desktop
the desktop to be implemented
target
)

Creates this toolkit's implementation of the Desktop using the specified peer interface.

public default DialogPeer

Returns:

this toolkit's implementation of Dialog
createDialog
(Dialog
the dialog to be implemented
target
)

Creates this toolkit's implementation of Dialog using the specified peer interface.

public default DragSourceContextPeer

Returns:

the peer created
createDragSourceContextPeer
(DragGestureEvent
the DragGestureEvent
dge
)

Creates the peer for a DragSourceContext.

public default FileDialogPeer

Returns:

this toolkit's implementation of FileDialog
createFileDialog
(FileDialog
the file dialog to be implemented
target
)

Creates this toolkit's implementation of FileDialog using the specified peer interface.

public default FramePeer

Returns:

this toolkit's implementation of Frame
createFrame
(Frame
the frame to be implemented
target
)

Creates this toolkit's implementation of Frame using the specified peer interface.

public default LabelPeer

Returns:

this toolkit's implementation of Label
createLabel
(Label
the label to be implemented
target
)

Creates this toolkit's implementation of Label using the specified peer interface.

public default ListPeer

Returns:

this toolkit's implementation of List
createList
(List
the list to be implemented
target
)

Creates this toolkit's implementation of List using the specified peer interface.

public default MenuPeer

Returns:

this toolkit's implementation of Menu
createMenu
(Menu
the menu to be implemented
target
)

Creates this toolkit's implementation of Menu using the specified peer interface.

public default MenuBarPeer

Returns:

this toolkit's implementation of MenuBar
createMenuBar
(MenuBar
the menu bar to be implemented
target
)

Creates this toolkit's implementation of MenuBar using the specified peer interface.

public default MenuItemPeer

Returns:

this toolkit's implementation of MenuItem
createMenuItem
(MenuItem
the menu item to be implemented
target
)

Creates this toolkit's implementation of MenuItem using the specified peer interface.

public default PanelPeer

Returns:

this toolkit's implementation of Panel
createPanel
(Panel
the panel to be implemented
target
)

Creates this toolkit's implementation of Panel using the specified peer interface.

public default PopupMenuPeer

Returns:

this toolkit's implementation of PopupMenu
createPopupMenu
(PopupMenu
the popup menu to be implemented
target
)

Creates this toolkit's implementation of PopupMenu using the specified peer interface.

public default RobotPeer

Returns:

the peer created
createRobot
(GraphicsDevice
the GraphicsDevice indicating the coordinate system the Robot will operate in
screen
)

Creates the peer for a Robot.

public default ScrollbarPeer

Returns:

this toolkit's implementation of Scrollbar
createScrollbar
(Scrollbar
the scroll bar to be implemented
target
)

Creates this toolkit's implementation of Scrollbar using the specified peer interface.

public default ScrollPanePeer

Returns:

this toolkit's implementation of ScrollPane
createScrollPane
(ScrollPane
the scroll pane to be implemented
target
)

Creates this toolkit's implementation of ScrollPane using the specified peer interface.

public default TaskbarPeer

Returns:

this toolkit's implementation of the Taskbar
createTaskbarPeer
(Taskbar
the taskbar to be implemented
target
)

Creates this toolkit's implementation of the Taskbar using the specified peer interface.

public default TextAreaPeer

Returns:

this toolkit's implementation of TextArea
createTextArea
(TextArea
the text area to be implemented
target
)

Creates this toolkit's implementation of TextArea using the specified peer interface.

public default TextFieldPeer

Returns:

this toolkit's implementation of TextField
createTextField
(TextField
the text field to be implemented
target
)

Creates this toolkit's implementation of TextField using the specified peer interface.

public default WindowPeer

Returns:

this toolkit's implementation of Window
createWindow
(Window
the window to be implemented
target
)

Creates this toolkit's implementation of Window using the specified peer interface.

public default DataTransferer
public default FontPeer

Returns:

this toolkit's implementation of Font
getFontPeer
(String
the font to be implemented
name
,
int
the style of the font, such as PLAIN, BOLD, ITALIC, or a combination
style
)

Creates this toolkit's implementation of Font using the specified peer interface.

public default MouseInfoPeer

Returns:

this toolkit's implementation of helper for MouseInfo
getMouseInfoPeer
()

Obtains this toolkit's implementation of helper class for MouseInfo operations.

Method Detail

createButtonback to summary
public default ButtonPeer createButton(Button target)

Creates this toolkit's implementation of Button using the specified peer interface.

Parameters
target:Button

the button to be implemented

Returns:ButtonPeer

this toolkit's implementation of Button

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Button, java.awt.peer.ButtonPeer
createCanvasback to summary
public default CanvasPeer createCanvas(Canvas target)

Creates this toolkit's implementation of Canvas using the specified peer interface.

Parameters
target:Canvas

the canvas to be implemented

Returns:CanvasPeer

this toolkit's implementation of Canvas

See Also
java.awt.Canvas, java.awt.peer.CanvasPeer
createCheckboxback to summary
public default CheckboxPeer createCheckbox(Checkbox target)

Creates this toolkit's implementation of Checkbox using the specified peer interface.

Parameters
target:Checkbox

the check box to be implemented

Returns:CheckboxPeer

this toolkit's implementation of Checkbox

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Checkbox, java.awt.peer.CheckboxPeer
createCheckboxMenuItemback to summary
public default CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target)

Creates this toolkit's implementation of CheckboxMenuItem using the specified peer interface.

Parameters
target:CheckboxMenuItem

the checkbox menu item to be implemented

Returns:CheckboxMenuItemPeer

this toolkit's implementation of CheckboxMenuItem

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.CheckboxMenuItem, java.awt.peer.CheckboxMenuItemPeer
createChoiceback to summary
public default ChoicePeer createChoice(Choice target)

Creates this toolkit's implementation of Choice using the specified peer interface.

Parameters
target:Choice

the choice to be implemented

Returns:ChoicePeer

this toolkit's implementation of Choice

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Choice, java.awt.peer.ChoicePeer
createComponentback to summary
public default LightweightPeer createComponent(Component target)

Creates a peer for a component or container. This peer is windowless and allows the Component and Container classes to be extended directly to create windowless components that are defined entirely in java.

Parameters
target:Component

The Component to be created

Returns:LightweightPeer

the peer for the specified component

createDesktopPeerback to summary
public default DesktopPeer createDesktopPeer(Desktop target)

Creates this toolkit's implementation of the Desktop using the specified peer interface.

Parameters
target:Desktop

the desktop to be implemented

Returns:DesktopPeer

this toolkit's implementation of the Desktop

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
Since
1.6
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Desktop, java.awt.peer.DesktopPeer
createDialogback to summary
public default DialogPeer createDialog(Dialog target)

Creates this toolkit's implementation of Dialog using the specified peer interface.

Parameters
target:Dialog

the dialog to be implemented

Returns:DialogPeer

this toolkit's implementation of Dialog

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Dialog, java.awt.peer.DialogPeer
createDragSourceContextPeerback to summary
public default DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge)

Creates the peer for a DragSourceContext. Always throws InvalidDndOperationException if GraphicsEnvironment.isHeadless() returns true.

Parameters
dge:DragGestureEvent

the DragGestureEvent

Returns:DragSourceContextPeer

the peer created

See Also
java.awt.GraphicsEnvironment#isHeadless
createFileDialogback to summary
public default FileDialogPeer createFileDialog(FileDialog target)

Creates this toolkit's implementation of FileDialog using the specified peer interface.

Parameters
target:FileDialog

the file dialog to be implemented

Returns:FileDialogPeer

this toolkit's implementation of FileDialog

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.FileDialog, java.awt.peer.FileDialogPeer
createFrameback to summary
public default FramePeer createFrame(Frame target)

Creates this toolkit's implementation of Frame using the specified peer interface.

Parameters
target:Frame

the frame to be implemented

Returns:FramePeer

this toolkit's implementation of Frame

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Frame, java.awt.peer.FramePeer
createLabelback to summary
public default LabelPeer createLabel(Label target)

Creates this toolkit's implementation of Label using the specified peer interface.

Parameters
target:Label

the label to be implemented

Returns:LabelPeer

this toolkit's implementation of Label

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Label, java.awt.peer.LabelPeer
createListback to summary
public default ListPeer createList(List target)

Creates this toolkit's implementation of List using the specified peer interface.

Parameters
target:List

the list to be implemented

Returns:ListPeer

this toolkit's implementation of List

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.List, java.awt.peer.ListPeer
createMenuback to summary
public default MenuPeer createMenu(Menu target)

Creates this toolkit's implementation of Menu using the specified peer interface.

Parameters
target:Menu

the menu to be implemented

Returns:MenuPeer

this toolkit's implementation of Menu

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Menu, java.awt.peer.MenuPeer
createMenuBarback to summary
public default MenuBarPeer createMenuBar(MenuBar target)

Creates this toolkit's implementation of MenuBar using the specified peer interface.

Parameters
target:MenuBar

the menu bar to be implemented

Returns:MenuBarPeer

this toolkit's implementation of MenuBar

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.MenuBar, java.awt.peer.MenuBarPeer
createMenuItemback to summary
public default MenuItemPeer createMenuItem(MenuItem target)

Creates this toolkit's implementation of MenuItem using the specified peer interface.

Parameters
target:MenuItem

the menu item to be implemented

Returns:MenuItemPeer

this toolkit's implementation of MenuItem

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.MenuItem, java.awt.peer.MenuItemPeer
createPanelback to summary
public default PanelPeer createPanel(Panel target)

Creates this toolkit's implementation of Panel using the specified peer interface.

Parameters
target:Panel

the panel to be implemented

Returns:PanelPeer

this toolkit's implementation of Panel

See Also
java.awt.Panel, java.awt.peer.PanelPeer
createPopupMenuback to summary
public default PopupMenuPeer createPopupMenu(PopupMenu target)

Creates this toolkit's implementation of PopupMenu using the specified peer interface.

Parameters
target:PopupMenu

the popup menu to be implemented

Returns:PopupMenuPeer

this toolkit's implementation of PopupMenu

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
Since
1.1
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.PopupMenu, java.awt.peer.PopupMenuPeer
createRobotback to summary
public default RobotPeer createRobot(GraphicsDevice screen) throws AWTException

Creates the peer for a Robot.

Parameters
screen:GraphicsDevice

the GraphicsDevice indicating the coordinate system the Robot will operate in

Returns:RobotPeer

the peer created

Exceptions
AWTException:
if the platform configuration does not allow low-level input control
createScrollbarback to summary
public default ScrollbarPeer createScrollbar(Scrollbar target)

Creates this toolkit's implementation of Scrollbar using the specified peer interface.

Parameters
target:Scrollbar

the scroll bar to be implemented

Returns:ScrollbarPeer

this toolkit's implementation of Scrollbar

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Scrollbar, java.awt.peer.ScrollbarPeer
createScrollPaneback to summary
public default ScrollPanePeer createScrollPane(ScrollPane target)

Creates this toolkit's implementation of ScrollPane using the specified peer interface.

Parameters
target:ScrollPane

the scroll pane to be implemented

Returns:ScrollPanePeer

this toolkit's implementation of ScrollPane

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
Since
1.1
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.ScrollPane, java.awt.peer.ScrollPanePeer
createTaskbarPeerback to summary
public default TaskbarPeer createTaskbarPeer(Taskbar target)

Creates this toolkit's implementation of the Taskbar using the specified peer interface.

Parameters
target:Taskbar

the taskbar to be implemented

Returns:TaskbarPeer

this toolkit's implementation of the Taskbar

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
Since
9
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Taskbar, java.awt.peer.TaskbarPeer
createTextAreaback to summary
public default TextAreaPeer createTextArea(TextArea target)

Creates this toolkit's implementation of TextArea using the specified peer interface.

Parameters
target:TextArea

the text area to be implemented

Returns:TextAreaPeer

this toolkit's implementation of TextArea

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.TextArea, java.awt.peer.TextAreaPeer
createTextFieldback to summary
public default TextFieldPeer createTextField(TextField target)

Creates this toolkit's implementation of TextField using the specified peer interface.

Parameters
target:TextField

the text field to be implemented

Returns:TextFieldPeer

this toolkit's implementation of TextField

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.TextField, java.awt.peer.TextFieldPeer
createWindowback to summary
public default WindowPeer createWindow(Window target)

Creates this toolkit's implementation of Window using the specified peer interface.

Parameters
target:Window

the window to be implemented

Returns:WindowPeer

this toolkit's implementation of Window

Exceptions
HeadlessException:
if GraphicsEnvironment.isHeadless() returns true
See Also
java.awt.GraphicsEnvironment#isHeadless, java.awt.Window, java.awt.peer.WindowPeer
getDataTransfererback to summary
public default DataTransferer getDataTransferer()
getFontPeerback to summary
public default FontPeer getFontPeer(String name, int style)

Creates this toolkit's implementation of Font using the specified peer interface.

Parameters
name:String

the font to be implemented

style:int

the style of the font, such as PLAIN, BOLD, ITALIC, or a combination

Returns:FontPeer

this toolkit's implementation of Font

See Also
java.awt.Font, java.awt.peer.FontPeer, java.awt.GraphicsEnvironment#getAllFonts
getMouseInfoPeerback to summary
public default MouseInfoPeer getMouseInfoPeer()

Obtains this toolkit's implementation of helper class for MouseInfo operations.

Returns:MouseInfoPeer

this toolkit's implementation of helper for MouseInfo

Exceptions
UnsupportedOperationException:
if this operation is not implemented
Since
1.5
See Also
java.awt.peer.MouseInfoPeer, java.awt.MouseInfo