public abstract class KComponent
extends java.awt.Component
The KComponent class is the abstract base class for all components in this package.
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected static java.awt.Toolkit |
DefaultToolkit |
protected boolean |
doubleBuffered
The double buffering.
|
protected boolean |
focusTraversable
True if the keyboard focus traversal is enabled.
|
protected java.awt.Image |
offscreenBuffer |
protected ToolTip |
toolTip
The tooltip for this component.
|
| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
KComponent() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addNotify()
Notifies this component that it has been added to a container
and if a peer is required, it should be created.
|
java.awt.Rectangle |
bounds() |
void |
disable()
Disables this component.
|
void |
doLayout()
Lays out this component.
|
void |
enable()
Enables this component.
|
void |
enable(boolean b) |
java.awt.Rectangle |
getBounds()
Returns the bounds of this component.
|
java.awt.Frame |
getFrame()
Returns the top fram of this component.
|
java.awt.Point |
getLocation()
Returns the location of this component.
|
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of this component.
|
protected java.awt.Graphics |
getPreferredGraphics()
Creates a preferred graphics context for this component.
|
protected java.awt.Graphics |
getPreferredGraphics(java.awt.Graphics g)
Creates a preferred graphics context for this component with the
specified graphics context.
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this component.
|
java.awt.Dimension |
getSize()
Returns the size of this component.
|
java.lang.String |
getToolTipText()
Return the tooltip string that has been set with
setToolTipText(). |
Visualizable |
getToolTipVisual()
Return the tooltip visual object that has been set with
setToolTipVisual(). |
void |
hide() |
boolean |
isDirectNotification()
If true, notifies listeners directly without using the event queue.
|
boolean |
isDoubleBuffered()
Checks if this component should use a buffer to paint.
|
boolean |
isFocusTraversable()
Checks if the keyboard focus traversal is enabled.
|
void |
layout()
Lays out this component.
|
java.awt.Point |
location()
Returns the location of this component.
|
java.awt.Dimension |
minimumSize()
Returns the minimum size of this component.
|
void |
paint(java.awt.Graphics g)
Paints this component.
|
protected void |
paintOn(java.awt.Graphics g)
Paints this component on the specified graphics object.
|
protected void |
postOldEvent(java.awt.AWTEvent e)
Posts a 1.0 style event.
|
java.awt.Dimension |
preferredSize()
Returns the preferred size of this component.
|
protected void |
processMouseEvent(java.awt.event.MouseEvent e) |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent e) |
void |
repaintNow()
Paints this component and all of its subcomponents immediately.
|
void |
requestFocus()
Requests that this component get the input focus.
|
void |
reshape(int x,
int y,
int width,
int height)
Moves and resizes this component.
|
void |
setBackground(java.awt.Color c)
Sets the background color of this component.
|
void |
setBounds(int x,
int y,
int width,
int height)
Moves and resizes this component.
|
void |
setDoubleBuffered(boolean b)
Set whether this component should use a buffer to paint.
|
void |
setEnabled(boolean b)
Enables or disables this component.
|
void |
setFocusTraversable(boolean b)
Enables or disables the keyboard focus traversal.
|
void |
setForeground(java.awt.Color c)
Sets the foreground color of this component.
|
void |
setToolTipText(java.lang.String string)
Registers the string to display in a ToolTip.
|
void |
setToolTipText(Text text)
Registers the text object to display in a ToolTip.
|
void |
setToolTipVisual(Visualizable visual)
Registers the visual object to display in a ToolTip.
|
void |
setVisible(boolean b)
Shows or hides this component.
|
void |
show() |
void |
show(boolean b) |
java.awt.Dimension |
size()
Returns the size of this component.
|
void |
syncGraphics()
Synchronizes this graphics state.
|
void |
syncGraphics(java.awt.Graphics g)
Synchronizes this graphics state on the specified graphics context.
|
void |
syncGraphics(int x,
int y,
int width,
int height)
Synchronizes this graphics state with the specified clip rectangle.
|
void |
update(java.awt.Graphics g)
Updates this component.
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disableEvents, dispatchEvent, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, list, list, locate, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validateprotected boolean doubleBuffered
protected transient java.awt.Image offscreenBuffer
protected boolean focusTraversable
protected static java.awt.Toolkit DefaultToolkit
protected ToolTip toolTip
public boolean isDoubleBuffered()
isDoubleBuffered クラス内 java.awt.Componentpublic void setDoubleBuffered(boolean b)
public boolean isFocusTraversable()
isFocusTraversable クラス内 java.awt.Componentpublic void setFocusTraversable(boolean b)
public boolean isDirectNotification()
public void setEnabled(boolean b)
setEnabled クラス内 java.awt.Componentpublic void enable()
enable クラス内 java.awt.Componentpublic void enable(boolean b)
enable クラス内 java.awt.Componentpublic void disable()
disable クラス内 java.awt.Componentpublic void setVisible(boolean b)
setVisible クラス内 java.awt.Componentpublic void show()
show クラス内 java.awt.Componentpublic void show(boolean b)
show クラス内 java.awt.Componentpublic void hide()
hide クラス内 java.awt.Componentpublic java.awt.Point getLocation()
getLocation クラス内 java.awt.Componentpublic java.awt.Point location()
location クラス内 java.awt.Componentpublic java.awt.Dimension getSize()
getSize クラス内 java.awt.Componentpublic java.awt.Dimension size()
size クラス内 java.awt.Componentpublic java.awt.Rectangle getBounds()
getBounds クラス内 java.awt.Componentpublic java.awt.Rectangle bounds()
bounds クラス内 java.awt.Componentpublic void setBounds(int x,
int y,
int width,
int height)
setBounds クラス内 java.awt.Componentpublic void reshape(int x,
int y,
int width,
int height)
reshape クラス内 java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize クラス内 java.awt.Componentpublic java.awt.Dimension preferredSize()
preferredSize クラス内 java.awt.Componentpublic java.awt.Dimension getMinimumSize()
getMinimumSize クラス内 java.awt.Componentpublic java.awt.Dimension minimumSize()
minimumSize クラス内 java.awt.Componentpublic void doLayout()
doLayout クラス内 java.awt.Componentpublic void layout()
layout クラス内 java.awt.Componentpublic void setForeground(java.awt.Color c)
setForeground クラス内 java.awt.Componentpublic void setBackground(java.awt.Color c)
setBackground クラス内 java.awt.Componentpublic void paint(java.awt.Graphics g)
paint クラス内 java.awt.Componentprotected void paintOn(java.awt.Graphics g)
public void update(java.awt.Graphics g)
update クラス内 java.awt.Componentpublic void repaintNow()
public void syncGraphics()
public void syncGraphics(int x,
int y,
int width,
int height)
x - the x coordinate of the rectangle to intersect the clip withy - the y coordinate of the rectangle to intersect the clip withwidth - the width of the rectangle to intersect the clip withheight - the height of the rectangle to intersect the clip withpublic void syncGraphics(java.awt.Graphics g)
protected java.awt.Graphics getPreferredGraphics()
protected java.awt.Graphics getPreferredGraphics(java.awt.Graphics g)
public void requestFocus()
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.
requestFocus クラス内 java.awt.ComponentAWTResources.HAS_FOCUS_BUGpublic void addNotify()
The component state is checked for avoiding the JDK bug.
addNotify クラス内 java.awt.ComponentAWTResources.checkComponentState(java.awt.Component)public java.awt.Frame getFrame()
protected void postOldEvent(java.awt.AWTEvent e)
public java.lang.String getToolTipText()
setToolTipText().public Visualizable getToolTipVisual()
setToolTipVisual().public void setToolTipText(java.lang.String string)
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.public void setToolTipText(Text text)
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.public void setToolTipVisual(Visualizable visual)
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.protected void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent クラス内 java.awt.Componentprotected void processMouseMotionEvent(java.awt.event.MouseEvent e)
processMouseMotionEvent クラス内 java.awt.Component