Kagetaka

net.hizlab.kagetaka.awt.tate
クラス Button

java.lang.Object
  拡張java.awt.Component
      拡張net.hizlab.kagetaka.awt.tate.Component
          拡張net.hizlab.kagetaka.awt.tate.Button
すべての実装インタフェース:
ImageObserver, MenuContainer, Serializable

public class Button
extends Component

縦表示のボタンです。

バージョン:
$Revision: 1.3 $
関連項目:
直列化された形式
バグ:
直列化は、リスナが保存されないため出来ません。

入れ子クラスの概要
 
クラス java.awt.Component から継承した入れ子クラス
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
フィールドの概要
 
クラス net.hizlab.kagetaka.awt.tate.Component から継承したフィールド
DISABLE, KEY_DOWN, MOUSE_DOWN, MOUSE_OVER, NORMAL
 
クラス java.awt.Component から継承したフィールド
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
インタフェース java.awt.image.ImageObserver から継承したフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
コンストラクタの概要
Button(Option option, ImageCreator ic)
          新しいインスタンスを作成します。
Button(Option option, ImageCreator ic, String label)
          指定されたラベルを表示する、新しいインスタンスを作成します。
 
メソッドの概要
 void addActionListener(ActionListener l)
          状態リスナを登録します。
 String getActionCommand()
          このボタンで発生するアクションイベントのコマンド名を返します。
 String getLabel()
          ボタンに表示するラベルを返します。
 Dimension getPreferredSize()
          推奨サイズを返します。
protected  String paramString()
          このボタンのパラメータ文字列を返します。
protected  void processActionEvent(ActionEvent e)
          このコンポーネントで発生するアクションイベントを、 登録されているすべての ActionListener に送ることにより、 アクションイベントを処理します。
protected  void processEvent(AWTEvent e)
          このコンポーネントで発生するコンポーネントイベントを処理します。
protected  void refresh(Graphics g, Dimension size, int state, boolean focus)
          現在のステータスにあった状態に再描画
 void removeActionListener(ActionListener l)
          状態リスナを解除します。
 void setActionCommand(String command)
          このボタンで発生するアクションイベントのコマンド名を設定します。
 void setLabel(String label)
          ボタンに表示するラベルを設定します。
 
クラス net.hizlab.kagetaka.awt.tate.Component から継承したメソッド
getBorder, getName, getText, getViewState, isFocusTraversable, paint, repaintForce, setBorder, setEnabled, setName, setPreferredSize, setViewState, update
 
クラス java.awt.Component から継承したメソッド
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, 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, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Button

public Button(Option option,
              ImageCreator ic)
新しいインスタンスを作成します。

パラメータ:
option - オプション
ic - イメージクリエータ

Button

public Button(Option option,
              ImageCreator ic,
              String label)
指定されたラベルを表示する、新しいインスタンスを作成します。

パラメータ:
option - オプション
ic - イメージクリエータ
label - ボタンのラベル
メソッドの詳細

addActionListener

public void addActionListener(ActionListener l)
状態リスナを登録します。

パラメータ:
l - 登録する状態リスナ

getActionCommand

public String getActionCommand()
このボタンで発生するアクションイベントのコマンド名を返します。

戻り値:
コマンド名

getLabel

public String getLabel()
ボタンに表示するラベルを返します。

戻り値:
ボタンのラベル

getPreferredSize

public Dimension getPreferredSize()
推奨サイズを返します。

オーバーライド:
クラス Component 内の getPreferredSize
戻り値:
推奨サイズ

paramString

protected String paramString()
このボタンのパラメータ文字列を返します。

オーバーライド:
クラス Component 内の paramString
戻り値:
パラメータ文字列

processActionEvent

protected void processActionEvent(ActionEvent e)
このコンポーネントで発生するアクションイベントを、 登録されているすべての ActionListener に送ることにより、 アクションイベントを処理します。

パラメータ:
e - イベント

processEvent

protected void processEvent(AWTEvent e)
このコンポーネントで発生するコンポーネントイベントを処理します。

パラメータ:
e - イベント

refresh

protected void refresh(Graphics g,
                       Dimension size,
                       int state,
                       boolean focus)
現在のステータスにあった状態に再描画

定義:
クラス Component 内の refresh
パラメータ:
g - グラフィックス
size - 描画域の大きさ
state - 新しい状態
focus - フォーカスを持っているか

removeActionListener

public void removeActionListener(ActionListener l)
状態リスナを解除します。

パラメータ:
l - 解除する状態リスナ

setActionCommand

public void setActionCommand(String command)
このボタンで発生するアクションイベントのコマンド名を設定します。 デフォルトでは、このコマンド名がボタンのラベルに設定されます。

パラメータ:
command - コマンド名

setLabel

public void setLabel(String label)
ボタンに表示するラベルを設定します。

パラメータ:
label - ボタンのラベル

Kagetaka

Copyright (c) 2002-2003 The Kagetaka Project 'September 12, 2003'