|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswingwt.awt.Component
swingwt.awt.AWTSwingWrapper
Provides convenience functionality for implementing an AWT component by wrapping around the corresponding Swing version.
Field Summary | |
protected JComponent |
swingPeer
|
Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AWTSwingWrapper()
|
Method Summary | |
void |
addActionListener(ActionListener l)
Add an ActionListener to this component |
void |
addComponentListener(ComponentListener l)
Add an ComponentListener to this component |
void |
addFocusListener(FocusListener l)
Add a KeyListener to this component |
void |
addInputMethodListener(InputMethodListener l)
Add an InputMethodListener to this component |
void |
addKeyListener(KeyListener l)
Add a KeyListener to this component |
void |
addMouseListener(MouseListener l)
Add a MouseListener to this component |
void |
addMouseMotionListener(MouseMotionListener l)
Add a MouseMotionListener to this component |
void |
addNotify()
|
protected Dimension |
calculatePreferredSize()
Override in subclasses to return the preferred size for a given (non-realised) component. |
void |
componentOnlyDispose()
Because dispose() can be overridden to do more, calling this routine guarantees that destruction of the component occurs (and nothing else). |
protected Dimension |
computePreferredSize()
This is called by getPreferredSize() when we want the peer to compute it's own size. |
boolean |
contains(int x,
int y)
|
Image |
createImage(int width,
int height)
Creates and returns an image |
VolatileImage |
createVolatileImage(int width,
int height)
Creates and returns a volatile image |
void |
dispatchEvent(AWTEvent awtEvent)
|
void |
dispose()
Destroys the component and stops all listeners |
AccessibleContext |
getAccessibleContext()
Returns the component's accessible context |
java.lang.String |
getActionCommand()
Returns the action command for this component |
float |
getAlignmentX()
NOT IMPLEMENTED |
float |
getAlignmentY()
NOT IMPLEMENTED |
Color |
getBackground()
Returns the background colour of the component |
Rectangle |
getBounds()
Returns the actual bounds of the component (or 0,0,0,0 if it isn't realised yet) |
ComponentOrientation |
getComponentOrientation()
|
Cursor |
getCursor()
Returns the components cursor |
Font |
getFont()
Returns the Font used on the component |
FontMetrics |
getFontMetrics(Font f)
Returns the font metrics for the given font |
Color |
getForeground()
Returns the foreground colour of the component |
Graphics |
getGraphics()
Return a graphics context for drawing on this object. |
GraphicsConfiguration |
getGraphicsConfiguration()
Gets the GraphicsConfiguration for this component |
int |
getHeight()
Returns the height of the component |
Point |
getLocation()
Returns the component's location on screen |
Point |
getLocationOnScreen()
FIXME: Bad algorithm here, but can't find appropriate routine. |
Dimension |
getMaximumSize()
Returns the maximum size of the component |
Dimension |
getMinimumSize()
Returns the minimum size of the component |
java.lang.String |
getName()
Returns the components name |
Container |
getParent()
Returns the component's parent |
ComponentPeer |
getPeer()
|
Dimension |
getPeerSize()
Returns the peers actual size, or 0,0 if it hasn't been created yet/is invisible |
Dimension |
getPreferredSize()
Returns the preferred size the component would like to be displayed at - very important for proper layout managers. |
Dimension |
getSize()
Returns the peers actual size. |
org.eclipse.swt.widgets.Control |
getSWTPeer()
Returns the SWT peer |
Toolkit |
getToolkit()
Gets the Toolkit for this component |
java.lang.String |
getToolTipText()
Returns the tooltip text used on the component |
java.lang.Object |
getTreeLock()
For compatibility with 3rd party layout managers - SwingWT doesn't need this as all laying out is marshalled onto a queued single thread |
int |
getWidth()
Returns the width of the component |
int |
getX()
Returns the component's X position in it's parent container |
int |
getY()
Returns the component's Y position in it's parent container |
void |
grabFocus()
Forces keyboard focus to the component |
boolean |
hasFocus()
Returns true if this component has the focus |
boolean |
hasSetFont()
Returns true if a calling process has set the font on this component. |
void |
hide()
Makes the component invisible |
boolean |
imageUpdate(Image img,
int infoflags,
int x,
int y,
int width,
int height)
Here for compatibility - I'm not sure what it's for. |
void |
invalidate()
Override in container classes to relayout child components - calls repaint here |
boolean |
isEnabled()
Returns true if the component is enabled |
boolean |
isFocusable()
Returns true if the component can receive the focus |
boolean |
isMinimumSizeSet()
|
boolean |
isShowing()
Returns true if the component is visible |
boolean |
isVisible()
Returns true if the component is visible |
Dimension |
minimumSize()
|
Dimension |
preferredSize()
|
void |
removeActionListener(ActionListener l)
Remove an ActionListener from the component |
void |
removeComponentListener(ComponentListener l)
Remove an ComponentListener from the component |
void |
removeFocusListener(FocusListener l)
Remove an KeyListener from the component |
void |
removeInputMethodListener(InputMethodListener l)
Remove an InputMethodListener to this component |
void |
removeKeyListener(KeyListener l)
Remove an KeyListener from the component |
void |
removeMouseListener(MouseListener l)
Remove an MouseListener from the component |
void |
removeMouseMotionListener(MouseMotionListener l)
Remove an MouseMotionListener from the component |
void |
removeNotify()
|
void |
repaint()
Redraws the component |
void |
repaint(int x,
int y,
int width,
int height)
|
void |
repaint(long tm,
int x,
int y,
int width,
int height)
|
void |
requestFocus()
Requests the component receives the focus |
void |
setActionCommand(java.lang.String command)
Sets the action command for this component |
void |
setAlignmentX(float val)
NOT IMPLEMENTED |
void |
setAlignmentY(float val)
NOT IMPLEMENTED |
void |
setBackground(Color c)
Sets the background colour of the component |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the physical bounds of the component - used by layout managers |
void |
setBounds(Rectangle r)
Sets the physical bounds of the component |
void |
setComponentOrientation(ComponentOrientation o)
|
void |
setCursor(Cursor c)
Sets the components cursor |
void |
setEnabled(boolean b)
Change the enabled state of the component |
void |
setFocusable(boolean b)
Set whether the component can be focused |
void |
setFocusTraversalKeysEnabled(boolean b)
FIXME: NOT IMPLEMENTED |
void |
setFont(Font f)
Sets the font used by the component |
void |
setForeground(Color c)
Sets the foreground colour of the component |
void |
setHeight(int height)
Sets the height of the component. |
void |
setLocation(int x,
int y)
Sets the component's location in it's container |
void |
setLocation(Point p)
Sets the component's location in it's container |
void |
setMaximumSize(Dimension d)
Sets the maximum size of the component |
void |
setMinimumSize(Dimension d)
Sets the minimum size of the component |
void |
setName(java.lang.String newName)
Sets the components name |
void |
setPreferredSize(Dimension d)
Sets the preferred size of the object for layout purposes |
void |
setSize(Dimension d)
Sets the peer's actual size |
void |
setSize(int width,
int height)
Sets the peer's actual size |
void |
setSwingWTParent(Container parent)
Once a parent component receives an "add" call for a child, this being the child, this should be called to tell us to instantiate the peer and load in any cached properties. |
void |
setToolTipText(java.lang.String text)
Sets the tooltip text used on the component |
void |
setVisible(boolean b)
Change the visibility of the component |
void |
setWidth(int width)
Sets the width of the component. |
void |
show()
Makes the component visible |
void |
transferFocus()
Sets the focus to the next component as if tab was pressed |
void |
transferFocusBackward()
Sets the focus to the next component as if shift+tab was pressed |
void |
transferFocusUpCycle()
NOT IMPLEMENTED: FIXME - focusCycleRoot not done |
void |
validate()
NOT IMPLEMENTED |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JComponent swingPeer
Constructor Detail |
public AWTSwingWrapper()
Method Detail |
public void setSwingWTParent(Container parent) throws java.lang.Exception
Component
setSwingWTParent
in class Component
java.lang.Exception
public org.eclipse.swt.widgets.Control getSWTPeer()
Component
getSWTPeer
in class Component
public ComponentPeer getPeer()
getPeer
in class Component
public void show()
Component
show
in class Component
public void hide()
Component
hide
in class Component
public void setVisible(boolean b)
Component
setVisible
in class Component
public boolean isVisible()
Component
isVisible
in class Component
public boolean isShowing()
Component
isShowing
in class Component
public void setEnabled(boolean b)
Component
setEnabled
in class Component
public boolean isEnabled()
Component
isEnabled
in class Component
public void requestFocus()
Component
requestFocus
in class Component
public void grabFocus()
Component
grabFocus
in class Component
public void repaint(int x, int y, int width, int height)
repaint
in class Component
public void repaint(long tm, int x, int y, int width, int height)
repaint
in class Component
public void repaint()
Component
repaint
in class Component
public Color getBackground()
Component
getBackground
in class Component
public void setBackground(Color c)
Component
setBackground
in class Component
public Color getForeground()
Component
getForeground
in class Component
public void setForeground(Color c)
Component
setForeground
in class Component
public int getWidth()
Component
getWidth
in class Component
public int getHeight()
Component
getHeight
in class Component
public void setWidth(int width)
Component
setWidth
in class Component
public void setHeight(int height)
Component
setHeight
in class Component
public Graphics getGraphics()
Component
getGraphics
in class Component
public Dimension getPreferredSize()
Component
getPreferredSize
in class Component
protected Dimension computePreferredSize()
Component
computePreferredSize
in class Component
public void setPreferredSize(Dimension d)
Component
setPreferredSize
in class Component
protected Dimension calculatePreferredSize()
Component
calculatePreferredSize
in class Component
public Dimension getMaximumSize()
Component
getMaximumSize
in class Component
public void setMaximumSize(Dimension d)
Component
setMaximumSize
in class Component
public Dimension getMinimumSize()
Component
getMinimumSize
in class Component
public void setMinimumSize(Dimension d)
Component
setMinimumSize
in class Component
public boolean isMinimumSizeSet()
isMinimumSizeSet
in class Component
public Dimension minimumSize()
public Dimension preferredSize()
public void setSize(int width, int height)
Component
setSize
in class Component
public void setSize(Dimension d)
Component
setSize
in class Component
public Dimension getSize()
Component
getSize
in class Component
public Dimension getPeerSize()
Component
getPeerSize
in class Component
public void setFocusTraversalKeysEnabled(boolean b)
Component
setFocusTraversalKeysEnabled
in class Component
public Point getLocation()
Component
getLocation
in class Component
public Point getLocationOnScreen()
Component
getLocationOnScreen
in class Component
public Image createImage(int width, int height)
Component
createImage
in class Component
public VolatileImage createVolatileImage(int width, int height)
Component
createVolatileImage
in class Component
public FontMetrics getFontMetrics(Font f)
Component
getFontMetrics
in class Component
public Font getFont()
Component
getFont
in interface MenuContainer
getFont
in class Component
public void setFont(Font f)
Component
setFont
in class Component
public boolean hasSetFont()
Component
hasSetFont
in class Component
public java.lang.String getToolTipText()
Component
getToolTipText
in class Component
public void setToolTipText(java.lang.String text)
Component
setToolTipText
in class Component
public void setBounds(int x, int y, int width, int height)
Component
setBounds
in class Component
public void setBounds(Rectangle r)
Component
setBounds
in class Component
public Rectangle getBounds()
Component
getBounds
in class Component
public float getAlignmentX()
Component
getAlignmentX
in class Component
public float getAlignmentY()
Component
getAlignmentY
in class Component
public void setAlignmentX(float val)
Component
setAlignmentX
in class Component
public void setAlignmentY(float val)
Component
setAlignmentY
in class Component
public void transferFocus()
Component
transferFocus
in class Component
public void transferFocusBackward()
Component
transferFocusBackward
in class Component
public void transferFocusUpCycle()
Component
transferFocusUpCycle
in class Component
public boolean contains(int x, int y)
contains
in class Component
public void invalidate()
Component
invalidate
in class Component
public void validate()
Component
validate
in class Component
public java.lang.String getActionCommand()
Component
getActionCommand
in class Component
public void setActionCommand(java.lang.String command)
Component
setActionCommand
in class Component
public void setLocation(Point p)
Component
setLocation
in class Component
public void setLocation(int x, int y)
Component
setLocation
in class Component
public int getX()
Component
getX
in class Component
public int getY()
Component
getY
in class Component
public Container getParent()
Component
getParent
in class Component
public java.lang.String getName()
Component
getName
in class Component
public void setName(java.lang.String newName)
Component
setName
in class Component
public void setCursor(Cursor c)
Component
setCursor
in class Component
public boolean isFocusable()
Component
isFocusable
in class Component
public void setFocusable(boolean b)
Component
setFocusable
in class Component
public Cursor getCursor()
Component
getCursor
in class Component
public Toolkit getToolkit()
Component
getToolkit
in class Component
public GraphicsConfiguration getGraphicsConfiguration()
Component
getGraphicsConfiguration
in class Component
public ComponentOrientation getComponentOrientation()
getComponentOrientation
in class Component
public void setComponentOrientation(ComponentOrientation o)
setComponentOrientation
in class Component
public void dispose()
Component
dispose
in class Component
public void componentOnlyDispose()
Component
componentOnlyDispose
in class Component
public void addActionListener(ActionListener l)
Component
ActionListener
to this component
addActionListener
in class Component
public void removeActionListener(ActionListener l)
Component
ActionListener
from the component
removeActionListener
in class Component
public void addComponentListener(ComponentListener l)
Component
ComponentListener
to this component
addComponentListener
in class Component
public void removeComponentListener(ComponentListener l)
Component
ComponentListener
from the component
removeComponentListener
in class Component
public void addMouseListener(MouseListener l)
Component
MouseListener
to this component
addMouseListener
in class Component
public void removeMouseListener(MouseListener l)
Component
MouseListener
from the component
removeMouseListener
in class Component
public void addMouseMotionListener(MouseMotionListener l)
Component
MouseMotionListener
to this component
addMouseMotionListener
in class Component
public void removeMouseMotionListener(MouseMotionListener l)
Component
MouseMotionListener
from the component
removeMouseMotionListener
in class Component
public void addKeyListener(KeyListener l)
Component
KeyListener
to this component
addKeyListener
in class Component
public void removeKeyListener(KeyListener l)
Component
KeyListener
from the component
removeKeyListener
in class Component
public void addFocusListener(FocusListener l)
Component
KeyListener
to this component
addFocusListener
in class Component
public void removeFocusListener(FocusListener l)
Component
KeyListener
from the component
removeFocusListener
in class Component
public void addInputMethodListener(InputMethodListener l)
Component
InputMethodListener
to this component
addInputMethodListener
in class Component
public void removeInputMethodListener(InputMethodListener l)
Component
InputMethodListener
to this component
removeInputMethodListener
in class Component
public void dispatchEvent(AWTEvent awtEvent)
dispatchEvent
in class Component
public void addNotify()
addNotify
in class Component
public void removeNotify()
removeNotify
in class Component
public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
Component
imageUpdate
in interface ImageObserver
imageUpdate
in class Component
public boolean hasFocus()
Component
hasFocus
in class Component
public java.lang.Object getTreeLock()
Component
getTreeLock
in class Component
public AccessibleContext getAccessibleContext()
Component
getAccessibleContext
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |