gnu.java.awt.peer.x

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()
@Override
boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType)
@Override
boolean isModalityTypeSupported(Dialog.ModalityType modalityType)
int
checkImage(Image image, int width, int height, ImageObserver observer)
protected ButtonPeer
createButton(Button target)
protected CanvasPeer
createCanvas(Canvas target)
protected CheckboxPeer
createCheckbox(Checkbox target)
protected CheckboxMenuItemPeer
createCheckboxMenuItem(CheckboxMenuItem target)
protected ChoicePeer
createChoice(Choice target)
protected DialogPeer
createDialog(Dialog target)
DragSourceContextPeer
createDragSourceContextPeer(DragGestureEvent e)
EmbeddedWindowPeer
createEmbeddedWindow(EmbeddedWindow w)
protected FileDialogPeer
createFileDialog(FileDialog target)
Font
createFont(int format, InputStream stream)
protected FramePeer
createFrame(Frame target)
Image
createImage(byte[] data, int offset, int len)
Image
createImage(ImageProducer producer)
Image
createImage(String filename)
Returns an image that has its pixel data loaded from a file with the specified name.
Image
createImage(URL url)
Returns an image that has its pixel data loaded from the specified URL.
protected LabelPeer
createLabel(Label target)
protected ListPeer
createList(List target)
protected MenuPeer
createMenu(Menu target)
protected MenuBarPeer
createMenuBar(MenuBar target)
protected MenuItemPeer
createMenuItem(MenuItem target)
protected PanelPeer
createPanel(Panel target)
protected PopupMenuPeer
createPopupMenu(PopupMenu target)
RobotPeer
createRobot(GraphicsDevice screen)
protected ScrollPanePeer
createScrollPane(ScrollPane target)
protected ScrollbarPeer
createScrollbar(Scrollbar target)
protected TextAreaPeer
createTextArea(TextArea target)
protected TextFieldPeer
createTextField(TextField target)
protected WindowPeer
createWindow(Window target)
ClasspathFontPeer
getClasspathFontPeer(String name, Map<K,V> attrs)
Returns the font peer for a font with the specified name and attributes.
ColorModel
getColorModel()
Returns the color model used by this toolkit.
String[]
getFontList()
FontMetrics
getFontMetrics(Font name)
protected FontPeer
getFontPeer(String name, int style)
Image
getImage(String name)
Returns an image that has its pixel data loaded from a file with the specified name.
Image
getImage(URL url)
Returns an image that has its pixel data loaded from the specified URL.
GraphicsEnvironment
getLocalGraphicsEnvironment()
PrintJob
getPrintJob(Frame frame, String title, Properties props)
int
getScreenResolution()
Dimension
getScreenSize()
Clipboard
getSystemClipboard()
protected EventQueue
getSystemEventQueueImpl()
Returns the eventqueue used by the XLib peers.
Map<K,V>
mapInputMethodHighlight(InputMethodHighlight highlight)
boolean
prepareImage(Image image, int width, int height, ImageObserver observer)
void
sync()

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

boolean isModalExclusionTypeSupported

public @Override boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType)

boolean isModalityTypeSupported

public @Override boolean isModalityTypeSupported(Dialog.ModalityType modalityType)

checkImage

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

createButton

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

createCanvas

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

createCheckbox

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

createCheckboxMenuItem

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

createChoice

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

createDialog

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

createDragSourceContextPeer

public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent e)
Overrides:
createDragSourceContextPeer in interface Toolkit

createEmbeddedWindow

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

createFileDialog

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

createFont

public Font createFont(int format,
                       InputStream stream)
Overrides:
createFont in interface ClasspathToolkit

createFrame

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

createImage

public Image createImage(byte[] data,
                         int offset,
                         int len)
Overrides:
createImage in interface Toolkit

createImage

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

createImage

public Image createImage(String filename)
Returns an image that has its pixel data loaded from a file with the specified name. If that file doesn't exist, an empty or error image is returned instead.
Overrides:
createImage in interface Toolkit
Parameters:
filename - the filename of the file that contains the pixel data
Returns:
the image

createImage

public Image createImage(URL url)
Returns an image that has its pixel data loaded from the specified URL. If the image cannot be loaded for some reason, an empty or error image is returned instead.
Overrides:
createImage in interface Toolkit
Parameters:
url - the URL to the image data
Returns:
the image

createLabel

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

createList

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

createMenu

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

createMenuBar

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

createMenuItem

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

createPanel

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

createPopupMenu

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

createRobot

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

createScrollPane

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

createScrollbar

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

createTextArea

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

createTextField

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

createWindow

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

getClasspathFontPeer

public ClasspathFontPeer getClasspathFontPeer(String name,
                                              Map<K,V> attrs)
Returns the font peer for a font with the specified name and attributes.
Parameters:
name - the font name
attrs - the font attributes
Returns:
the font peer for a font with the specified name and attributes

getColorModel

public ColorModel getColorModel()
Returns the color model used by this toolkit.
Overrides:
getColorModel in interface Toolkit
Returns:
the color model used by this toolkit

getFontList

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

getFontMetrics

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

getFontPeer

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

getImage

public Image getImage(String name)
Returns an image that has its pixel data loaded from a file with the specified name. If that file doesn't exist, an empty or error image is returned instead.
Overrides:
getImage in interface Toolkit
Parameters:
name - the filename of the file that contains the pixel data
Returns:
the image

getImage

public Image getImage(URL url)
Returns an image that has its pixel data loaded from the specified URL. If the image cannot be loaded for some reason, an empty or error image is returned instead.
Overrides:
getImage in interface Toolkit
Parameters:
url - the URL to the image data
Returns:
the image

getLocalGraphicsEnvironment

public GraphicsEnvironment getLocalGraphicsEnvironment()
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()
Returns the eventqueue used by the XLib peers.
Overrides:
getSystemEventQueueImpl in interface Toolkit
Returns:
the eventqueue used by the XLib peers

mapInputMethodHighlight

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

prepareImage

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

sync

public void sync()
Overrides:
sync in interface Toolkit

XToolkit.java -- The central AWT Toolkit for the X peers Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.