org.boxed_economy.besp.presentation.bface.menu
クラス MenuElementGroup

java.lang.Object
  拡張javax.swing.AbstractAction
      拡張org.boxed_economy.besp.presentation.bface.menu.MenuElement
          拡張org.boxed_economy.besp.presentation.bface.menu.MenuElementGroup
すべての実装インタフェース:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, MenuElementGroupListener, java.io.Serializable
直系の既知のサブクラス:
Menu, MenuBar, MenuGroup

public abstract class MenuElementGroup
extends MenuElement
implements MenuElementGroupListener

メニュの要素をグループ化するためのクラス メニュー要素をグループに追加する方針にすることによって、メニュー要素の順序の制御が容易になります。 サブクラス ○MenuBar(メニューバー) ○MenuGroup(メニューの順番を制御するためのグループ) ○Menu(メニュー) ○ActionGroup(メニュー内においてセパレータで区切られるグループ)

バージョン:
$Id: MenuElementGroup.java,v 1.1 2004/03/21 12:07:49 macchan Exp $
作成者:
macchan
関連項目:
直列化された形式

フィールドの概要
 
クラス org.boxed_economy.besp.presentation.bface.menu.MenuElement から継承したフィールド
ICON
 
クラス javax.swing.AbstractAction から継承したフィールド
changeSupport, enabled
 
インタフェース javax.swing.Action から継承したフィールド
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
コンストラクタの概要
MenuElementGroup()
           
MenuElementGroup(java.lang.String name)
           
 
メソッドの概要
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void add(MenuElement element)
          子要素を追加します
 void add(MenuElement element, int index)
          Index指定で子要素を追加します
 void addActionGroupListener(MenuElementGroupListener l)
           
protected  void fireStateChanged(MenuElementGroupEvent e)
           
 java.util.List getElements()
          子要素の集合を取得します
protected  void refresh()
           
 MenuElement remove(int index)
          Index指定で子要素を削除します
 void remove(MenuElement element)
          子要素を削除します
 void removeActionGroupListener(MenuElementGroupListener l)
           
 void setEnabled(boolean enabled)
          子要素が全て設定されるようにオーバーライドします
protected  void setPresentationContainer(PresentationContainer container)
          ツリー配下の全ての要素に設定します (少しパフォーマンスは落ちますが、ツリーをツリーに足すことが考えられるので、このコードは確実です)
 void stateChanged(MenuElementGroupEvent ev)
           
 
クラス org.boxed_economy.besp.presentation.bface.menu.MenuElement から継承したメソッド
getAccelerator, getContainer, getIcon, getModelContainer, getName, getPresentationContainer, getSmallIcon, setAccelerator, setIcon, setIcon, setName, setSmallIcon, setSmallIcon
 
クラス javax.swing.AbstractAction から継承したメソッド
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
 
クラス java.lang.Object から継承したメソッド
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

MenuElementGroup

public MenuElementGroup()
関連項目:
Object.Object()

MenuElementGroup

public MenuElementGroup(java.lang.String name)
関連項目:
AbstractAction.AbstractAction(String)
メソッドの詳細

add

public void add(MenuElement element)
子要素を追加します

パラメータ:
element -

add

public void add(MenuElement element,
                int index)
Index指定で子要素を追加します

パラメータ:
element -
index -

remove

public MenuElement remove(int index)
Index指定で子要素を削除します

パラメータ:
index -
戻り値:
MenuElement

remove

public void remove(MenuElement element)
子要素を削除します

パラメータ:
element -

getElements

public java.util.List getElements()
子要素の集合を取得します

戻り値:
List

setPresentationContainer

protected void setPresentationContainer(PresentationContainer container)
ツリー配下の全ての要素に設定します (少しパフォーマンスは落ちますが、ツリーをツリーに足すことが考えられるので、このコードは確実です)

オーバーライド:
クラス MenuElement 内の setPresentationContainer

stateChanged

public void stateChanged(MenuElementGroupEvent ev)
定義:
インタフェース MenuElementGroupListener 内の stateChanged

refresh

protected void refresh()

actionPerformed

public final void actionPerformed(java.awt.event.ActionEvent e)
定義:
インタフェース java.awt.event.ActionListener 内の actionPerformed
関連項目:
ActionListener.actionPerformed(ActionEvent)

setEnabled

public void setEnabled(boolean enabled)
子要素が全て設定されるようにオーバーライドします

定義:
インタフェース javax.swing.Action 内の setEnabled
関連項目:
AbstractAction.setEnabled(boolean)

addActionGroupListener

public void addActionGroupListener(MenuElementGroupListener l)

removeActionGroupListener

public void removeActionGroupListener(MenuElementGroupListener l)

fireStateChanged

protected void fireStateChanged(MenuElementGroupEvent e)