Kagetaka

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

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

public class Choice
extends Component

縦表示のコンボボックスです。

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

入れ子クラスの概要
 
クラス 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
 
コンストラクタの概要
Choice(Option option, ImageCreator ic)
          新しいインスタンスを作成します。
 
メソッドの概要
 void add(String item)
          この Choice に項目を追加します。
 void addItem(String item)
          この Choice に項目を追加します。
 String getItem(int index)
          Choice 内の指定された添字の文字列を返します。
 int getItemCount()
          この Choice の項目数を返します。
 Dimension getPreferredSize()
          推奨サイズを返します。
 int getSelectedIndex()
          現在選択されている項目の添字を返します。
 String getSelectedItem()
          現在選択されている項目の文字列を返します。
 void insert(String item, int index)
          この Choice の指定された位置に項目を追加します。
protected  String paramString()
          このコンボボックスのパラメータ文字列を返します。
protected  void refresh(Graphics g, Dimension size, int state, boolean focus)
          現在のステータスにあった状態に再描画
 void remove(int index)
          この Choice から指定した項目を削除します。
 void remove(String item)
          この Choice から指定した項目を削除します。
 void removeAll()
          この Choice からすべての項目を削除します。
 void select(int index)
          指定された位置の項目を選択します。
 void select(String item)
          指定された項目を選択します。
 
クラス 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, processEvent, 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
 

コンストラクタの詳細

Choice

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

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

add

public void add(String item)
この Choice に項目を追加します。

パラメータ:
item - 追加される項目

addItem

public void addItem(String item)
この Choice に項目を追加します。

パラメータ:
item - 追加される項目

getItem

public String getItem(int index)
Choice 内の指定された添字の文字列を返します。

パラメータ:
index - 項目の添字
戻り値:
文字列

getItemCount

public int getItemCount()
この Choice の項目数を返します。

戻り値:
項目数

getPreferredSize

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

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

getSelectedIndex

public int getSelectedIndex()
現在選択されている項目の添字を返します。

戻り値:
選択中の項目の添字

getSelectedItem

public String getSelectedItem()
現在選択されている項目の文字列を返します。

戻り値:
選択中の項目の文字列

insert

public void insert(String item,
                   int index)
この Choice の指定された位置に項目を追加します。

パラメータ:
item - 追加される項目
index - 追加する位置

paramString

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

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

refresh

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

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

remove

public void remove(int index)
この Choice から指定した項目を削除します。

パラメータ:
index - 項目の添字

remove

public void remove(String item)
この Choice から指定した項目を削除します。

パラメータ:
item - 項目の文字列

removeAll

public void removeAll()
この Choice からすべての項目を削除します。


select

public void select(int index)
指定された位置の項目を選択します。

パラメータ:
index - 選択項目の位置
例外:
IllegalArgumentException - 選択項目の位置が無効の場合

select

public void select(String item)
指定された項目を選択します。

パラメータ:
item - 選択する項目

Kagetaka

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