All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.KComponent

java.lang.Object
   |
   +----java.awt.Component
           |
           +----jp.kyasu.awt.KComponent

public abstract class KComponent
extends Component
A KComponent is an object having a graphical representation that can be displayed on the screen and that can interact with the user.

The KComponent class is the abstract base class for all components in this package.

Version:
20 Nov 1999
Author:
Kazuki YASUMATSU

Method Index

 o addNotify()
Notifies this component that it has been added to a container and if a peer is required, it should be created.
 o bounds()
 o disable()
Disables this component.
 o doLayout()
Lays out this component.
 o enable()
Enables this component.
 o enable(boolean)
 o getBounds()
Returns the bounds of this component.
 o getFrame()
Returns the top fram of this component.
 o getLocation()
Returns the location of this component.
 o getMinimumSize()
Returns the minimum size of this component.
 o getPreferredSize()
Returns the preferred size of this component.
 o getSize()
Returns the size of this component.
 o getToolTipText()
Return the tooltip string that has been set with setToolTipText().
 o getToolTipVisual()
Return the tooltip visual object that has been set with setToolTipVisual().
 o hide()
 o isDirectNotification()
If true, notifies listeners directly without using the event queue.
 o isDoubleBuffered()
Checks if this component should use a buffer to paint.
 o isFocusTraversable()
Checks if the keyboard focus traversal is enabled.
 o layout()
Lays out this component.
 o location()
Returns the location of this component.
 o minimumSize()
Returns the minimum size of this component.
 o paint(Graphics)
Paints this component.
 o preferredSize()
Returns the preferred size of this component.
 o repaintNow()
Paints this component and all of its subcomponents immediately.
 o requestFocus()
Requests that this component get the input focus.
 o reshape(int, int, int, int)
Moves and resizes this component.
 o setBackground(Color)
Sets the background color of this component.
 o setBounds(int, int, int, int)
Moves and resizes this component.
 o setDoubleBuffered(boolean)
Set whether this component should use a buffer to paint.
 o setEnabled(boolean)
Enables or disables this component.
 o setFocusTraversable(boolean)
Enables or disables the keyboard focus traversal.
 o setForeground(Color)
Sets the foreground color of this component.
 o setToolTipText(String)
Registers the string to display in a ToolTip.
 o setToolTipText(Text)
Registers the text object to display in a ToolTip.
 o setToolTipVisual(Visualizable)
Registers the visual object to display in a ToolTip.
 o setVisible(boolean)
Shows or hides this component.
 o show()
 o show(boolean)
 o size()
Returns the size of this component.
 o syncGraphics()
Synchronizes this graphics state.
 o syncGraphics(Graphics)
Synchronizes this graphics state on the specified graphics context.
 o syncGraphics(int, int, int, int)
Synchronizes this graphics state with the specified clip rectangle.
 o update(Graphics)
Updates this component.

Methods

 o isDoubleBuffered
 public boolean isDoubleBuffered()
Checks if this component should use a buffer to paint.

 o setDoubleBuffered
 public void setDoubleBuffered(boolean b)
Set whether this component should use a buffer to paint. If set to true, all the drawing from this component will be done in an offscreen painting buffer. The offscreen painting buffer will the be copied onto the screen.

 o isFocusTraversable
 public boolean isFocusTraversable()
Checks if the keyboard focus traversal is enabled.

Overrides:
isFocusTraversable in class Component
 o setFocusTraversable
 public void setFocusTraversable(boolean b)
Enables or disables the keyboard focus traversal.

 o isDirectNotification
 public boolean isDirectNotification()
If true, notifies listeners directly without using the event queue.

 o setEnabled
 public void setEnabled(boolean b)
Enables or disables this component.

Overrides:
setEnabled in class Component
 o enable
 public void enable()
Enables this component.

Overrides:
enable in class Component
 o enable
 public void enable(boolean b)
Overrides:
enable in class Component
 o disable
 public void disable()
Disables this component.

Overrides:
disable in class Component
 o setVisible
 public void setVisible(boolean b)
Shows or hides this component.

Overrides:
setVisible in class Component
 o show
 public void show()
Overrides:
show in class Component
 o show
 public void show(boolean b)
Overrides:
show in class Component
 o hide
 public void hide()
Overrides:
hide in class Component
 o getLocation
 public Point getLocation()
Returns the location of this component.

Overrides:
getLocation in class Component
 o location
 public Point location()
Returns the location of this component.

Overrides:
location in class Component
 o getSize
 public Dimension getSize()
Returns the size of this component.

Overrides:
getSize in class Component
 o size
 public Dimension size()
Returns the size of this component.

Overrides:
size in class Component
 o getBounds
 public Rectangle getBounds()
Returns the bounds of this component.

Overrides:
getBounds in class Component
 o bounds
 public Rectangle bounds()
Overrides:
bounds in class Component
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height)
Moves and resizes this component.

Overrides:
setBounds in class Component
 o reshape
 public void reshape(int x,
                     int y,
                     int width,
                     int height)
Moves and resizes this component.

Overrides:
reshape in class Component
 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this component.

Overrides:
getPreferredSize in class Component
 o preferredSize
 public Dimension preferredSize()
Returns the preferred size of this component.

Overrides:
preferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minimum size of this component.

Overrides:
getMinimumSize in class Component
 o minimumSize
 public Dimension minimumSize()
Returns the minimum size of this component.

Overrides:
minimumSize in class Component
 o doLayout
 public void doLayout()
Lays out this component.

Overrides:
doLayout in class Component
 o layout
 public void layout()
Lays out this component.

Overrides:
layout in class Component
 o setForeground
 public void setForeground(Color c)
Sets the foreground color of this component.

Overrides:
setForeground in class Component
 o setBackground
 public void setBackground(Color c)
Sets the background color of this component.

Overrides:
setBackground in class Component
 o paint
 public void paint(Graphics g)
Paints this component.

Overrides:
paint in class Component
 o update
 public void update(Graphics g)
Updates this component.

Overrides:
update in class Component
 o repaintNow
 public void repaintNow()
Paints this component and all of its subcomponents immediately.

 o syncGraphics
 public void syncGraphics()
Synchronizes this graphics state.

 o syncGraphics
 public void syncGraphics(int x,
                          int y,
                          int width,
                          int height)
Synchronizes this graphics state with the specified clip rectangle.

Parameters:
x - the x coordinate of the rectangle to intersect the clip with
y - the y coordinate of the rectangle to intersect the clip with
width - the width of the rectangle to intersect the clip with
height - the height of the rectangle to intersect the clip with
 o syncGraphics
 public void syncGraphics(Graphics g)
Synchronizes this graphics state on the specified graphics context.

 o requestFocus
 public void requestFocus()
Requests that this component get the input focus.

For the sun.awt.windows.WWindowPeer#getFocusPeer() bug (it exists in the JDK for Windows 95/NT version 1.1.4 or before), if a lightwight component is focus traversable, an application will be hung up.

Overrides:
requestFocus in class Component
See Also:
HAS_FOCUS_BUG
 o addNotify
 public void addNotify()
Notifies this component that it has been added to a container and if a peer is required, it should be created.

The component state is checked for avoiding the JDK bug.

Overrides:
addNotify in class Component
See Also:
checkComponentState
 o getFrame
 public Frame getFrame()
Returns the top fram of this component.

 o getToolTipText
 public String getToolTipText()
Return the tooltip string that has been set with setToolTipText().

Returns:
the string of the tool tip.
 o getToolTipVisual
 public Visualizable getToolTipVisual()
Return the tooltip visual object that has been set with setToolTipVisual().

Returns:
the visual object of the tool tip.
 o setToolTipText
 public synchronized void setToolTipText(String string)
Registers the string to display in a ToolTip.

Parameters:
string - The string to display when the cursor lingers over the component. If string is null, then it turns off tool tip for this component.
 o setToolTipText
 public synchronized void setToolTipText(Text text)
Registers the text object to display in a ToolTip.

Parameters:
text - The text object to display when the cursor lingers over the component. If text is null, then it turns off tool tip for this component.
 o setToolTipVisual
 public synchronized void setToolTipVisual(Visualizable visual)
Registers the visual object to display in a ToolTip.

Parameters:
visual - The visual object to display when the cursor lingers over the component. If visual is null, then it turns off tool tip for this component.

All Packages  Class Hierarchy  This Package  Previous  Next  Index