soc.client
Class SOCFaceButton.FaceButtonPopupMenu

java.lang.Object
  extended by java.awt.MenuComponent
      extended by java.awt.MenuItem
          extended by java.awt.Menu
              extended by java.awt.PopupMenu
                  extended by soc.client.SOCFaceButton.FaceButtonPopupMenu
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Enclosing class:
SOCFaceButton

protected static class SOCFaceButton.FaceButtonPopupMenu
extends java.awt.PopupMenu
implements java.awt.event.ActionListener

Menu for right-click on face icon to choose a new face (Player's hand only).

Author:
Jeremy D Monin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.PopupMenu
java.awt.PopupMenu.AccessibleAWTPopupMenu
 
Nested classes/interfaces inherited from class java.awt.Menu
java.awt.Menu.AccessibleAWTMenu
 
Nested classes/interfaces inherited from class java.awt.MenuItem
java.awt.MenuItem.AccessibleAWTMenuItem
 
Nested classes/interfaces inherited from class java.awt.MenuComponent
java.awt.MenuComponent.AccessibleAWTMenuComponent
 
Field Summary
(package private)  java.awt.MenuItem changeFaceItem
           
(package private)  SOCFaceButton fb
           
(package private)  FaceChooserFrame fsf
           
 
Constructor Summary
SOCFaceButton.FaceButtonPopupMenu(SOCFaceButton fbutton)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Handling the menu item
 void clearPreviousChooser()
          The previous face-chooser window has been disposed.
 void show(int x, int y)
          Show menu at this position.
private  void showFaceChooserFrame()
          Create or show a face-chooser frame, from handpanel right-click or triple-click.
 
Methods inherited from class java.awt.PopupMenu
addNotify, getAccessibleContext, getParent, show
 
Methods inherited from class java.awt.Menu
add, add, addSeparator, countItems, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotify
 
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getActionListeners, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getPeer, getTreeLock, postEvent, setFont, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

fb

SOCFaceButton fb

changeFaceItem

java.awt.MenuItem changeFaceItem

fsf

FaceChooserFrame fsf
Constructor Detail

SOCFaceButton.FaceButtonPopupMenu

public SOCFaceButton.FaceButtonPopupMenu(SOCFaceButton fbutton)
Method Detail

show

public void show(int x,
                 int y)
Show menu at this position.

Parameters:
x - Mouse x-position relative to facebutton
y - Mouse y-position relative to facebutton

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Handling the menu item

Specified by:
actionPerformed in interface java.awt.event.ActionListener

showFaceChooserFrame

private void showFaceChooserFrame()
Create or show a face-chooser frame, from handpanel right-click or triple-click.

Since:
1.1.09

clearPreviousChooser

public void clearPreviousChooser()
The previous face-chooser window has been disposed. If menu item is chosen, don't show it, create a new one.