Kagetaka

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

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

public class TextField
extends TextComponent

縦表示のボタンです。

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

入れ子クラスの概要
 
クラス 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
 
コンストラクタの概要
TextField(Option option, ImageCreator ic)
          新しいインスタンスを作成します。
TextField(Option option, ImageCreator ic, int columns)
          指定された列数の幅のインスタンスを作成します。
TextField(Option option, ImageCreator ic, String text)
          指定されたテキストを含むインスタンスを作成します。
TextField(Option option, ImageCreator ic, String text, int columns)
          指定されたテキストと幅のインスタンスを作成します。
 
メソッドの概要
 void addActionListener(ActionListener l)
          状態リスナを登録します。
 boolean echoCharIsSet()
          TextField がエコー文字を持っているかどうかを返します。
 String getActionCommand()
          このボタンで発生するアクションイベントのコマンド名を返します。
 int getColumns()
          この TextField の列数を返します。
 char getEchoChar()
          エコーする文字を返します。
 int getMaxLength()
          入力できる最大文字数を返します。
protected  String paramString()
          このテキストフィールドのパラメータ文字列を返します。
protected  void processActionEvent(ActionEvent e)
          このコンポーネントで発生するアクションイベントを、 登録されているすべての ActionListener に送ることにより、 アクションイベントを処理します。
protected  void processEvent(AWTEvent e)
          このコンポーネントで発生するコンポーネントイベントを処理します。
 void removeActionListener(ActionListener l)
          状態リスナを解除します。
 void setActionCommand(String command)
          このボタンで発生するアクションイベントのコマンド名を設定します。
 void setColumns(int columns)
          この TextField の列数を設定します。
 void setEchoChar(char c)
          この TextField のエコー文字を設定します。
 void setMaxLength(int max)
          入力できる最大文字数を設定します。
 
クラス net.hizlab.kagetaka.awt.tate.TextComponent から継承したメソッド
createPreferredSize, getText, isLocked, refresh, setEnabled, setLocked, setText
 
クラス net.hizlab.kagetaka.awt.tate.Component から継承したメソッド
addNotify, getBorder, getName, getPreferredSize, getText, getViewState, invalidate, isFocusTraversable, paint, removeNotify, repaintForce, setBorder, setFont, setName, setViewState, update
 
クラス java.awt.Component から継承したメソッド
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, 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, 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, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, 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
 

コンストラクタの詳細

TextField

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

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

TextField

public TextField(Option option,
                 ImageCreator ic,
                 int columns)
指定された列数の幅のインスタンスを作成します。

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

TextField

public TextField(Option option,
                 ImageCreator ic,
                 String text)
指定されたテキストを含むインスタンスを作成します。

パラメータ:
option - オプション
ic - イメージクリエータ
text - テキスト

TextField

public TextField(Option option,
                 ImageCreator ic,
                 String text,
                 int columns)
指定されたテキストと幅のインスタンスを作成します。

パラメータ:
option - オプション
ic - イメージクリエータ
text - テキスト
columns - 列数
メソッドの詳細

addActionListener

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

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

echoCharIsSet

public boolean echoCharIsSet()
TextField がエコー文字を持っているかどうかを返します。

戻り値:
エコー文字を持っている場合は true、 それ以外の場合は false

getActionCommand

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

戻り値:
コマンド名

getColumns

public int getColumns()
この TextField の列数を返します。

戻り値:
列数

getEchoChar

public char getEchoChar()
エコーする文字を返します。

戻り値:
エコー文字

getMaxLength

public int getMaxLength()
入力できる最大文字数を返します。

戻り値:
最大文字数、無制限の場合は 0

paramString

protected String paramString()
このテキストフィールドのパラメータ文字列を返します。

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

processActionEvent

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

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

processEvent

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

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

removeActionListener

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

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

setActionCommand

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

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

setColumns

public void setColumns(int columns)
この TextField の列数を設定します。

パラメータ:
columns - 列数

setEchoChar

public void setEchoChar(char c)
この TextField のエコー文字を設定します。 これは、パスワードを表す TextField のように、 ユーザの入力を画面にエコーさせたくないフィールドに便利です。

パラメータ:
c - エコー文字

setMaxLength

public void setMaxLength(int max)
入力できる最大文字数を設定します。 無制限にする場合は 0 を設定します。

パラメータ:
max - 入力できる最大文字数

Kagetaka

Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'