gnu.java.awt.peer.gtk

Class GtkToolkit


public class GtkToolkit
extends ClasspathToolkit

Field Summary

Fields inherited from class java.awt.Toolkit

Object>(), desktopProperties, desktopPropsSupport

Constructor Summary

GtkToolkit()

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 b)
protected CanvasPeer
createCanvas(Canvas c)
protected CheckboxPeer
createCheckbox(Checkbox cb)
protected CheckboxMenuItemPeer
createCheckboxMenuItem(CheckboxMenuItem cmi)
protected ChoicePeer
createChoice(Choice c)
Cursor
createCustomCursor(Image image, Point hotspot, String name)
protected DialogPeer
createDialog(Dialog d)
DragSourceContextPeer
createDragSourceContextPeer(DragGestureEvent e)
EmbeddedWindowPeer
createEmbeddedWindow(EmbeddedWindow w)
protected FileDialogPeer
createFileDialog(FileDialog fd)
Font
createFont(int format, InputStream stream)
protected FramePeer
createFrame(Frame f)
Image
createImage(byte[] imagedata, int imageoffset, int imagelength)
Image
createImage(ImageProducer producer)
Image
createImage(String filename)
Image
createImage(URL url)
ImageProducer
createImageProducer(URL url)
Creates an ImageProducer from the specified URL.
protected LabelPeer
createLabel(Label label)
protected ListPeer
createList(List list)
protected MenuPeer
createMenu(Menu m)
protected MenuBarPeer
createMenuBar(MenuBar mb)
protected MenuItemPeer
createMenuItem(MenuItem mi)
protected PanelPeer
createPanel(Panel p)
protected PopupMenuPeer
createPopupMenu(PopupMenu target)
RobotPeer
createRobot(GraphicsDevice screen)
protected ScrollPanePeer
createScrollPane(ScrollPane sp)
protected ScrollbarPeer
createScrollbar(Scrollbar sb)
protected TextAreaPeer
createTextArea(TextArea ta)
protected TextFieldPeer
createTextField(TextField tf)
protected WindowPeer
createWindow(Window w)
extends DragGestureRecognizer> T createDragGestureRecognizer(Class recognizer, DragSource ds, Component comp, int actions, DragGestureListener l)
Rectangle
getBounds()
ClasspathFontPeer
getClasspathFontPeer(String name, Map attrs)
Newer method to produce a peer for a Font object, even though Sun's design claims Font should now be peerless, we do not agree with this model, hence "ClasspathFontPeer".
ColorModel
getColorModel()
Returns the native color model (which isn't the same as the default ARGB color model, but doesn't have to be).
String[]
getFontList()
FontMetrics
getFontMetrics(Font font)
protected FontPeer
getFontPeer(String name, int style)
Deprecated. part of the older "logical font" system in earlier AWT implementations.
Image
getImage(String filename)
Image
getImage(URL url)
GraphicsEnvironment
getLocalGraphicsEnvironment()
protected int
getLockState(int keyCode)
boolean
getLockingKeyState(int keyCode)
protected MouseInfoPeer
getMouseInfoPeer()
int
getMouseNumberOfButtons()
PrintJob
getPrintJob(Frame frame, String jobtitle, Properties props)
int
getScreenResolution()
Dimension
getScreenSize()
Clipboard
getSystemClipboard()
protected EventQueue
getSystemEventQueueImpl()
Clipboard
getSystemSelection()
boolean
isFrameStateSupported(int state)
protected void
loadSystemColors(int[] systemColors)
Map
mapInputMethodHighlight(InputMethodHighlight highlight)
boolean
prepareImage(Image image, int width, int height, ImageObserver observer)
Prepares a GtkImage.
void
registerImageIOSpis(IIORegistry reg)
protected void
setComponentState(Component c, GtkComponentPeer cp)
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

GtkToolkit

public GtkToolkit()

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 b)
Overrides:
createButton in interface Toolkit

createCanvas

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

createCheckbox

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

createCheckboxMenuItem

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

createChoice

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

createCustomCursor

public Cursor createCustomCursor(Image image,
                                 Point hotspot,
                                 String name)
Overrides:
createCustomCursor in interface Toolkit

createDialog

protected DialogPeer createDialog(Dialog d)
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 fd)
Overrides:
createFileDialog in interface Toolkit

createFont

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

createFrame

protected FramePeer createFrame(Frame f)
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

createImageProducer

public ImageProducer createImageProducer(URL url)
Creates an ImageProducer from the specified URL. The image is assumed to be in a recognised format.
Parameters:
url - URL to read image data from.

createLabel

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

createList

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

createMenu

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

createMenuBar

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

createMenuItem

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

createPanel

protected PanelPeer createPanel(Panel p)
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 sp)
Overrides:
createScrollPane in interface Toolkit

createScrollbar

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

createTextArea

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

createTextField

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

createWindow

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

extends DragGestureRecognizer> T createDragGestureRecognizer

public extends DragGestureRecognizer> T
  createDragGestureRecognizer(Class recognizer,
                                                                         DragSource ds,
                                                                         Component comp,
                                                                         int actions,
                                                                         DragGestureListener l)

getBounds

public Rectangle getBounds()

getClasspathFontPeer

public ClasspathFontPeer getClasspathFontPeer(String name,
                                              Map attrs)
Newer method to produce a peer for a Font object, even though Sun's design claims Font should now be peerless, we do not agree with this model, hence "ClasspathFontPeer".
Overrides:
getClasspathFontPeer in interface ClasspathToolkit

getColorModel

public ColorModel getColorModel()
Returns the native color model (which isn't the same as the default ARGB color model, but doesn't have to be).
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)

Deprecated. part of the older "logical font" system in earlier AWT implementations. Our newer Font class uses getClasspathFontPeer.

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()
Overrides:
getLocalGraphicsEnvironment in interface ClasspathToolkit

getLockState

protected int getLockState(int keyCode)

getLockingKeyState

public boolean getLockingKeyState(int keyCode)
Overrides:
getLockingKeyState in interface Toolkit

getMouseInfoPeer

protected MouseInfoPeer getMouseInfoPeer()
Overrides:
getMouseInfoPeer in interface Toolkit

getMouseNumberOfButtons

public int getMouseNumberOfButtons()
Overrides:
getMouseNumberOfButtons in interface ClasspathToolkit

getPrintJob

public PrintJob getPrintJob(Frame frame,
                            String jobtitle,
                            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

getSystemSelection

public Clipboard getSystemSelection()
Overrides:
getSystemSelection in interface Toolkit

isFrameStateSupported

public boolean isFrameStateSupported(int state)
Overrides:
isFrameStateSupported in interface Toolkit

loadSystemColors

protected void loadSystemColors(int[] systemColors)

mapInputMethodHighlight

public Map mapInputMethodHighlight(InputMethodHighlight highlight)
Overrides:
mapInputMethodHighlight in interface Toolkit

prepareImage

public boolean prepareImage(Image image,
                            int width,
                            int height,
                            ImageObserver observer)
Prepares a GtkImage. For every other kind of Image it just assumes the image is already prepared for rendering.
Overrides:
prepareImage in interface Toolkit

registerImageIOSpis

public void registerImageIOSpis(IIORegistry reg)
Overrides:
registerImageIOSpis in interface ClasspathToolkit

setComponentState

protected void setComponentState(Component c,
                                 GtkComponentPeer cp)

sync

public void sync()
Overrides:
sync in interface Toolkit

GtkToolkit.java -- Implements an AWT Toolkit using GTK for peers Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005, 2006, 2007 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.