gnu.awt.xlib

Class XToolkit


public class XToolkit
extends ClasspathToolkit

Field Summary

Fields inherited from class java.awt.Toolkit

Object>(), desktopProperties, desktopPropsSupport

Constructor Summary

XToolkit()

Method Summary

void
beep()
int
checkImage(Image image, int width, int height, ImageObserver observer)
protected ButtonPeer
createButton(Button frontend)
protected CanvasPeer
createCanvas(Canvas frontend)
protected CheckboxPeer
createCheckbox(Checkbox frontend)
protected CheckboxMenuItemPeer
createCheckboxMenuItem(CheckboxMenuItem frontend)
protected ChoicePeer
createChoice(Choice frontend)
protected DialogPeer
createDialog(Dialog frontend)
DragGestureRecognizer
createDragGestureRecognizer(Class<T> abstractRecognizerClass, DragSource ds, Component c, int srcActions, DragGestureListener dgl)
DragSourceContextPeer
createDragSourceContextPeer(DragGestureEvent dge)
EmbeddedWindowPeer
createEmbeddedWindow(EmbeddedWindow w)
protected FileDialogPeer
createFileDialog(FileDialog frontend)
Font
createFont(int format, InputStream stream)
Creates a font, reading the glyph definitions from a stream.
protected FramePeer
createFrame(Frame frontend)
Image
createImage(byte[] imagedata, int imageoffset, int imagelength)
Image
createImage(ImageProducer producer)
Image
createImage(String filename)
Image
createImage(URL url)
protected LabelPeer
createLabel(Label frontend)
protected ListPeer
createList(List frontend)
protected MenuPeer
createMenu(Menu frontend)
protected MenuBarPeer
createMenuBar(MenuBar frontend)
protected MenuItemPeer
createMenuItem(MenuItem frontend)
protected PanelPeer
createPanel(Panel frontend)
protected PopupMenuPeer
createPopupMenu(PopupMenu frontend)
RobotPeer
createRobot(GraphicsDevice screen)
protected ScrollPanePeer
createScrollPane(ScrollPane frontend)
protected ScrollbarPeer
createScrollbar(Scrollbar frontend)
protected TextAreaPeer
createTextArea(TextArea frontend)
protected TextFieldPeer
createTextField(TextField frontend)
protected WindowPeer
createWindow(Window frontend)
void
flushIfIdle()
ClasspathFontPeer
getClasspathFontPeer(String name, Map<K,V> attrs)
Acquires an appropriate ClasspathFontPeer, for use in classpath's implementation of Font.
ColorModel
getColorModel()
String[]
getFontList()
FontMetrics
getFontMetrics(Font font)
protected FontPeer
getFontPeer(String name, int style)
Image
getImage(String filename)
Image
getImage(URL url)
GraphicsEnvironment
getLocalGraphicsEnvironment()
Returns a shared instance of the local, platform-specific graphics environment.
PrintJob
getPrintJob(Frame frame, String title, Properties props)
int
getScreenResolution()
Dimension
getScreenSize()
Clipboard
getSystemClipboard()
protected EventQueue
getSystemEventQueueImpl()
boolean
isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType)
boolean
isModalityTypeSupported(Dialog.ModalityType modalityType)
void
iterateNativeQueue(EventQueue locked, boolean block)
Checks the native event queue for events.
Map<K,V>
mapInputMethodHighlight(InputMethodHighlight highlight)
boolean
nativeQueueEmpty()
boolean
prepareImage(Image image, int width, int height, ImageObserver observer)
void
setAlwaysOnTop(boolean b)
void
sync()
void
wakeNativeQueue()

Methods inherited from class gnu.java.awt.ClasspathToolkit

createDesktopPeer, createEmbeddedWindow, createFont, createRobot, getClasspathFontPeer, getFont, getLocalGraphicsEnvironment, getMouseNumberOfButtons, registerImageIOSpis

Methods inherited from class java.awt.Toolkit

addAWTEventListener, addPropertyChangeListener, beep, checkImage, createButton, createCanvas, createCheckbox, createCheckboxMenuItem, createChoice, createComponent, createCustomCursor, createDesktopPeer, createDialog, createDragSourceContextPeer, createFileDialog, createFrame, createImage, createImage, createImage, createImage, createImage, createLabel, createList, createMenu, createMenuBar, createMenuItem, createPanel, createPopupMenu, createScrollPane, createScrollbar, createTextArea, createTextField, createWindow, extends DragGestureRecognizer> T createDragGestureRecognizer, getAWTEventListeners, getAWTEventListeners, getBestCursorSize, getColorModel, getDefaultToolkit, getDesktopProperty, getFontList, getFontMetrics, getFontPeer, getImage, getImage, getLockingKeyState, getMaximumCursorColors, getMenuShortcutKeyMask, getMouseInfoPeer, getNativeContainer, getPrintJob, getPrintJob, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getScreenInsets, getScreenResolution, getScreenSize, getSystemClipboard, getSystemEventQueue, getSystemEventQueueImpl, getSystemSelection, initializeDesktopProperties, isDynamicLayoutActive, isDynamicLayoutSet, isFrameStateSupported, isModalExclusionTypeSupported, isModalityTypeSupported, lazilyLoadDesktopProperty, loadSystemColors, mapInputMethodHighlight, prepareImage, removeAWTEventListener, removePropertyChangeListener, setDesktopProperty, setDynamicLayout, setLockingKeyState, sync

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

XToolkit

public XToolkit()

Method Details

beep

public void beep()
Overrides:
beep in interface Toolkit

checkImage

public int checkImage(Image image,
                      int width,
                      int height,
                      ImageObserver observer)
Overrides:
checkImage in interface Toolkit

createButton

protected ButtonPeer createButton(Button frontend)
Overrides:
createButton in interface Toolkit

createCanvas

protected CanvasPeer createCanvas(Canvas frontend)
Overrides:
createCanvas in interface Toolkit

createCheckbox

protected CheckboxPeer createCheckbox(Checkbox frontend)
Overrides:
createCheckbox in interface Toolkit

createCheckboxMenuItem

protected CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem frontend)
Overrides:
createCheckboxMenuItem in interface Toolkit

createChoice

protected ChoicePeer createChoice(Choice frontend)
Overrides:
createChoice in interface Toolkit

createDialog

protected DialogPeer createDialog(Dialog frontend)
Overrides:
createDialog in interface Toolkit

createDragGestureRecognizer

public DragGestureRecognizer createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                                         DragSource ds,
                                                         Component c,
                                                         int srcActions,
                                                         DragGestureListener dgl)

createDragSourceContextPeer

public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge)
            throws InvalidDnDOperationException
Overrides:
createDragSourceContextPeer in interface Toolkit

createEmbeddedWindow

public EmbeddedWindowPeer createEmbeddedWindow(EmbeddedWindow w)
Overrides:
createEmbeddedWindow in interface ClasspathToolkit

createFileDialog

protected FileDialogPeer createFileDialog(FileDialog frontend)
Overrides:
createFileDialog in interface Toolkit

createFont

public Font createFont(int format,
                       InputStream stream)
Creates a font, reading the glyph definitions from a stream.

This method provides the platform-specific implementation for the static factory method Font.createFont(int,InputStream).

Overrides:
createFont in interface ClasspathToolkit
Parameters:
format - the format of the font data, such as Font.TRUETYPE_FONT. An implementation may ignore this argument if it is able to automatically recognize the font format from the provided data.
stream - an input stream from where the font data is read in. The stream will be advanced to the position after the font data, but not closed.
Throws:
IllegalArgumentException - if format is not supported.

createFrame

protected FramePeer createFrame(Frame frontend)
Overrides:
createFrame in interface Toolkit

createImage

public Image createImage(byte[] imagedata,
                         int imageoffset,
                         int imagelength)
Overrides:
createImage in interface Toolkit

createImage

public Image createImage(ImageProducer producer)
Overrides:
createImage in interface Toolkit

createImage

public Image createImage(String filename)
Overrides:
createImage in interface Toolkit

createImage

public Image createImage(URL url)
Overrides:
createImage in interface Toolkit

createLabel

protected LabelPeer createLabel(Label frontend)
Overrides:
createLabel in interface Toolkit

createList

protected ListPeer createList(List frontend)
Overrides:
createList in interface Toolkit

createMenu

protected MenuPeer createMenu(Menu frontend)
Overrides:
createMenu in interface Toolkit

createMenuBar

protected MenuBarPeer createMenuBar(MenuBar frontend)
Overrides:
createMenuBar in interface Toolkit

createMenuItem

protected MenuItemPeer createMenuItem(MenuItem frontend)
Overrides:
createMenuItem in interface Toolkit

createPanel

protected PanelPeer createPanel(Panel frontend)
Overrides:
createPanel in interface Toolkit

createPopupMenu

protected PopupMenuPeer createPopupMenu(PopupMenu frontend)
Overrides:
createPopupMenu in interface Toolkit

createRobot

public RobotPeer createRobot(GraphicsDevice screen)
            throws AWTException
Overrides:
createRobot in interface ClasspathToolkit

createScrollPane

protected ScrollPanePeer createScrollPane(ScrollPane frontend)
Overrides:
createScrollPane in interface Toolkit

createScrollbar

protected ScrollbarPeer createScrollbar(Scrollbar frontend)
Overrides:
createScrollbar in interface Toolkit

createTextArea

protected TextAreaPeer createTextArea(TextArea frontend)
Overrides:
createTextArea in interface Toolkit

createTextField

protected TextFieldPeer createTextField(TextField frontend)
Overrides:
createTextField in interface Toolkit

createWindow

protected WindowPeer createWindow(Window frontend)
Overrides:
createWindow in interface Toolkit

flushIfIdle

public void flushIfIdle()

getClasspathFontPeer

public ClasspathFontPeer getClasspathFontPeer(String name,
                                              Map<K,V> attrs)
Acquires an appropriate ClasspathFontPeer, for use in classpath's implementation of Font.
Parameters:
name - The logical name of the font. This may be either a face name or a logical font name, or may even be null. A default implementation of name decoding is provided in ClasspathFontPeer, but may be overridden in other toolkits.
attrs - Any extra TextAttribute attributes this font peer should have, such as size, weight, family name, or transformation.

getColorModel

public ColorModel getColorModel()
Overrides:
getColorModel in interface Toolkit

getFontList

public String[] getFontList()
Overrides:
getFontList in interface Toolkit

getFontMetrics

public FontMetrics getFontMetrics(Font font)
Overrides:
getFontMetrics in interface Toolkit

getFontPeer

protected FontPeer getFontPeer(String name,
                               int style)
Overrides:
getFontPeer in interface Toolkit

getImage

public Image getImage(String filename)
Overrides:
getImage in interface Toolkit

getImage

public Image getImage(URL url)
Overrides:
getImage in interface Toolkit

getLocalGraphicsEnvironment

public GraphicsEnvironment getLocalGraphicsEnvironment()
Returns a shared instance of the local, platform-specific graphics environment.

This method is specific to GNU Classpath. It gets called by the Classpath implementation of GraphicsEnvironment.getLocalGraphcisEnvironment().

Overrides:
getLocalGraphicsEnvironment in interface ClasspathToolkit

getPrintJob

public PrintJob getPrintJob(Frame frame,
                            String title,
                            Properties props)
Overrides:
getPrintJob in interface Toolkit

getScreenResolution

public int getScreenResolution()
Overrides:
getScreenResolution in interface Toolkit

getScreenSize

public Dimension getScreenSize()
Overrides:
getScreenSize in interface Toolkit

getSystemClipboard

public Clipboard getSystemClipboard()
Overrides:
getSystemClipboard in interface Toolkit

getSystemEventQueueImpl

protected EventQueue getSystemEventQueueImpl()
Overrides:
getSystemEventQueueImpl in interface Toolkit

isModalExclusionTypeSupported

public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType)
Overrides:
isModalExclusionTypeSupported in interface Toolkit

isModalityTypeSupported

public boolean isModalityTypeSupported(Dialog.ModalityType modalityType)
Overrides:
isModalityTypeSupported in interface Toolkit

iterateNativeQueue

public void iterateNativeQueue(EventQueue locked,
                               boolean block)
Checks the native event queue for events. If blocking, waits until an event is available before returning, unless interrupted by wakeNativeQueue. If non-blocking, returns immediately even if no event is available.
Parameters:
locked - The calling EventQueue
block - If true, waits for a native event before returning

mapInputMethodHighlight

public Map<K,V> mapInputMethodHighlight(InputMethodHighlight highlight)
Overrides:
mapInputMethodHighlight in interface Toolkit

nativeQueueEmpty

public boolean nativeQueueEmpty()

prepareImage

public boolean prepareImage(Image image,
                            int width,
                            int height,
                            ImageObserver observer)
Overrides:
prepareImage in interface Toolkit

setAlwaysOnTop

public void setAlwaysOnTop(boolean b)

sync

public void sync()
Overrides:
sync in interface Toolkit

wakeNativeQueue

public void wakeNativeQueue()

Copyright (C) 2000, 2002, 2003, 2005 Free Software Foundation This file is part of libgcj. This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details.