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