|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectswingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
Nested Class Summary | |
protected class |
JComponent.InternalFrameSelectionListener
Event adapter for managing internal frame selection if this component is an internal frame child. |
Field Summary | |
protected AccessibleContext |
accessibleContext
The component's accessible context |
protected ActionMap |
actionMap
|
protected InputMap |
ancestorInputMap
|
protected Border |
border
The border for the component |
protected java.util.Hashtable |
clientProperties
The table of client properties |
protected boolean |
descendantHasPeer
Whether or not subclasses are supplying a peer in their setSwingWTParent() call - if they don't, this component will supply a Composite peer (this is for Swing code that descends JComopnent and paints on it) |
protected InputMap |
focusInputMap
|
protected JComponent.InternalFrameSelectionListener |
internalFrameAdapter
Event adapter for calling the setSelection on the JInternalFrame parent if there is one. |
protected JInternalFrame |
internalFrameParent
JInternalFrame parent if this component has one |
protected boolean |
opaque
|
protected java.util.Vector |
propertyChangeListeners
|
static int |
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
|
static int |
WHEN_FOCUSED
|
static int |
WHEN_IN_FOCUSED_WINDOW
|
protected InputMap |
windowInputMap
|
Fields inherited from class swingwt.awt.Container |
composite, comps, containerListeners, layout, queuedValidateRequest |
Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JComponent()
Creates an empty JComponent which by default will use a Composite peer (allowing you to paint on it). |
Method Summary | |
Component |
add(Component c)
|
Component |
add(Component c,
int index)
|
void |
add(Component c,
java.lang.Object layoutModifier)
Addition for layouts requiring object based modifiers |
void |
add(Component c,
java.lang.Object layoutModifier,
int index)
|
Component |
add(java.lang.String name,
Component c)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the component |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the component |
protected void |
checkInternalFrameChild()
Checks whether this JComponent is a child of a JInternalFrame and if so, attaches a focus and mouse listener - when the component is clicked/gets the focus, the desktop pane of the JInternalFrame is called to tell it to make the frame active. |
void |
dispose()
Destroys the component |
AccessibleContext |
getAccessibleContext()
Override in subclass to return something more specific |
ActionMap |
getActionMap()
|
boolean |
getAutoscrolls()
NOT IMPLEMENTED |
Border |
getBorder()
Returns the components border. |
java.lang.Object |
getClientProperty(java.lang.Object key)
Retrieves a property from the client, or null if the key does not exist. |
InputMap |
getInputMap(int condition,
boolean create)
Gets the InputMap for this component |
Insets |
getInsets()
Returns the Insets for the components (taking into account any Border) |
Point |
getToolTipLocation(MouseEvent e)
Returns the appropriate location for the tooltip text for a given mouse event. |
java.lang.String |
getToolTipText(MouseEvent e)
Returns the appropriate tooltip text for a given MouseEvent . |
Container |
getTopLevelAncestor()
Retrieves the top-level ancestor of this component (submitted by Fernando Petrola) |
Rectangle |
getVisibleRect()
Not implemented correctly - rather than returning the visible portion of the component, this returns a Rectangle sized to match the component |
boolean |
isDoubleBuffered()
Whether or not this component is using double-buffering. |
boolean |
isOpaque()
Hardcoded to return true - there's no other way for platform widgets. |
boolean |
isOptimizedDrawingEnabled()
Always returns true - we're using native widgets! |
boolean |
isValidateRoot()
Used to determine whether this component is a top level container (overriden in subclasses), so validation code knows to work up the tree to that point before validating down. |
void |
paint(Graphics g)
Paints this component and any associated borders on it. |
void |
paintBackground(int x,
int y,
int width,
int height)
|
protected void |
paintChildren(Graphics g)
NOT IMPLEMENTED |
protected void |
paintComponent(Graphics g)
Override in subclass |
void |
paintImmediately(int x,
int y,
int w,
int h)
Forces a repaint of the whole component |
void |
paintImmediately(Rectangle r)
Forces a repaint of the whole component. |
void |
putClientProperty(java.lang.Object key,
java.lang.Object value)
Sets a property against the component |
void |
remove(Component c)
Removes a component from the the container by destroying the peer. |
void |
remove(int index)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the component |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the component |
void |
repaint(Rectangle r)
Forces a repaint of a specified rectangle (actually repaints the whole thing) |
void |
revalidate()
Calls invalidate |
void |
scrollRectToVisible(Rectangle aRect)
NOT IMPLEMENTED - used to scroll parent JViewPort containers to the specified rectangle |
void |
setActionMap(ActionMap actionMap)
|
void |
setAutoscrolls(boolean b)
NOT IMPLEMENTED |
void |
setBorder(Border b)
Sets the components border |
void |
setDoubleBuffered(boolean b)
Used to determine whether or not to double buffer the component. |
void |
setInputMap(int condition,
InputMap inputMap)
Sets the InputMap for this component |
void |
setMargin(Insets i)
NOT IMPLEMENTED |
void |
setNextFocusableComponent(Component acomponent)
NOT IMPLEMENTED |
void |
setOpaque(boolean b)
Ignored - platform widgets are always opaque |
void |
setPreferredSize(Dimension d)
Overridden here - we still use the implementation in the superclass, but we are just checking if we are in a scrollpane container and set the preferred size on that if necessary. |
void |
setRequestFocusEnabled(boolean b)
NOT IMPLEMENTED |
void |
setSwingWTParent(Container parent)
Callback for when this JComponent is added to a container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Border border
protected AccessibleContext accessibleContext
protected boolean descendantHasPeer
protected java.util.Hashtable clientProperties
protected boolean opaque
protected InputMap focusInputMap
protected InputMap ancestorInputMap
protected InputMap windowInputMap
protected ActionMap actionMap
protected java.util.Vector propertyChangeListeners
public static final int WHEN_FOCUSED
public static final int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
public static final int WHEN_IN_FOCUSED_WINDOW
protected JComponent.InternalFrameSelectionListener internalFrameAdapter
protected JInternalFrame internalFrameParent
Constructor Detail |
public JComponent()
Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener l)
public void add(Component c, java.lang.Object layoutModifier)
Container
add
in class Container
public void add(Component c, java.lang.Object layoutModifier, int index)
add
in class Container
public Component add(java.lang.String name, Component c)
add
in class Container
public Component add(Component c)
add
in class Container
public Component add(Component c, int index)
add
in class Container
public void remove(Component c)
Container
remove
in class Container
public void remove(int index)
remove
in class Container
protected void checkInternalFrameChild()
public void paintImmediately(int x, int y, int w, int h)
public void paintImmediately(Rectangle r)
public void repaint(Rectangle r)
protected void paintComponent(Graphics g)
paintComponent
in class Component
protected void paintChildren(Graphics g)
public void paintBackground(int x, int y, int width, int height)
public void paint(Graphics g)
paint
in class Component
public Border getBorder()
public void setBorder(Border b)
public void setRequestFocusEnabled(boolean b)
public void setAutoscrolls(boolean b)
public java.lang.String getToolTipText(MouseEvent e)
MouseEvent
. Since platform lacks Swing's
flexibility in this regard, always returns super.getToolTipText()
public Container getTopLevelAncestor()
public Point getToolTipLocation(MouseEvent e)
public boolean getAutoscrolls()
public boolean isOpaque()
public void setOpaque(boolean b)
public boolean isDoubleBuffered()
public void setDoubleBuffered(boolean b)
public void scrollRectToVisible(Rectangle aRect)
public void revalidate()
revalidate
in class Container
public final java.lang.Object getClientProperty(java.lang.Object key)
public Rectangle getVisibleRect()
public final void putClientProperty(java.lang.Object key, java.lang.Object value)
public void setMargin(Insets i)
public AccessibleContext getAccessibleContext()
getAccessibleContext
in class Component
public boolean isValidateRoot()
public boolean isOptimizedDrawingEnabled()
public void setNextFocusableComponent(Component acomponent)
public Insets getInsets()
getInsets
in class Container
public void setPreferredSize(Dimension d)
setPreferredSize
in class Component
public final void setInputMap(int condition, InputMap inputMap)
public final InputMap getInputMap(int condition, boolean create)
public final void setActionMap(ActionMap actionMap)
public final ActionMap getActionMap()
public void dispose()
dispose
in class Container
public void setSwingWTParent(Container parent) throws java.lang.Exception
setSwingWTParent
in class Container
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |