Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.awt.menu
Class CheckboxMenuItem  view CheckboxMenuItem download CheckboxMenuItem.java

java.lang.Object
  extended byjava.awt.MenuComponent
      extended byjava.awt.MenuItem
          extended byjava.awt.CheckboxMenuItem
              extended bycom.flexstor.common.awt.menu.CheckboxMenuItem
All Implemented Interfaces:
javax.accessibility.Accessible, com.flexstor.common.awt.ActionComponentI, java.awt.ItemSelectable, java.io.Serializable

public class CheckboxMenuItem
extends java.awt.CheckboxMenuItem
implements com.flexstor.common.awt.ActionComponentI

This class adds an identifier to each menu item in order to uniquely determine an item independant of its label. The code is identical with MenuItem, because of hierarchy constraints, this class cannot inherit from java.awt.CheckboxMenuItem AND com.flexstor.common.awt.menu.MenuItem. It sends a ActionEvent with its action id to its container class when selected. In addition, this class implements an Observable behavior in order to create exclusive menu item groups.


Nested Class Summary
 
Nested classes inherited from class java.awt.CheckboxMenuItem
java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
 
Nested classes inherited from class java.awt.MenuItem
java.awt.MenuItem.AccessibleAWTMenuItem
 
Nested classes inherited from class java.awt.MenuComponent
java.awt.MenuComponent.AccessibleAWTMenuComponent
 
Field Summary
(package private)  int nActionIdFalse
           
(package private)  int nActionIdTrue
           
(package private)  com.flexstor.common.util.FlexObservable observable
           
 
Fields inherited from class java.awt.CheckboxMenuItem
 
Fields inherited from class java.awt.MenuItem
 
Fields inherited from class java.awt.MenuComponent
 
Fields inherited from interface com.flexstor.common.awt.ActionComponentI
ACTION_ADD, ACTION_ADD_ALL, ACTION_ADDRESS_BOOK, ACTION_ADM_OPEN_UGSD, ACTION_ADV_SEARCH, ACTION_ARCHIVE, ACTION_BASIC_SEARCH, ACTION_BROWSE_HIGHCPY, ACTION_BROWSE_HIGHRES, ACTION_BROWSE_LOCAL, ACTION_BROWSE_LOWCPY, ACTION_BROWSE_LOWRES, ACTION_BROWSE_MACHINES, ACTION_BROWSE_NEW_FOLDER, ACTION_BROWSE_PICTURE_GALLERY_TEMPLATES, ACTION_BROWSE_REFRESH, ACTION_BROWSE_SERVER, ACTION_BROWSE_SOURCE_FILES, ACTION_BROWSE_THUMB, ACTION_CANCEL, ACTION_CHANGE_APP, ACTION_CHECKBOX_LOCAL, ACTION_CHECKBOX_MKCOPY, ACTION_CHECKBOX_MKTHUMB, ACTION_CLASSIFY, ACTION_CLOSE, ACTION_CLOSE_FULL_THUMB, ACTION_COLLAPSE_TREE_ROW, ACTION_CREATE_FULL_THUMB, ACTION_DEBUG_HIDE_INSTANCE_IDS, ACTION_DEBUG_SHOW_INSTANCE_IDS, ACTION_DEBUG_SHOW_REG_DEBUGGER, ACTION_DELETE, ACTION_DELETE_ALL, ACTION_DELETE_ASSET, ACTION_DELETE_TREE_ROW, ACTION_DISP_FULLSIZE, ACTION_DISP_RECORD, ACTION_DISP_SUMMARY, ACTION_DISP_THUMB_DATA, ACTION_DISP_THUMB_FLAT, ACTION_DISP_THUMB_RECORD, ACTION_DISP_THUMBNAIL, ACTION_EDT_COPY, ACTION_EDT_CUT, ACTION_EDT_DELETE, ACTION_EDT_NEW_BUCKET, ACTION_EDT_NEW_ELEMENT, ACTION_EDT_PASTE, ACTION_EXPAND_TREE_ROW, ACTION_EXPORT, ACTION_FIELD_VALUE_CHANGED, ACTION_FILEBASED_SEARCH, ACTION_FSV_CLOSE, ACTION_FSV_COPY, ACTION_FSV_DRAG_SELECT, ACTION_FSV_FIT_HEIGHT, ACTION_FSV_FIT_WIDTH, ACTION_FSV_FIT_WINDOW, ACTION_FSV_NEXT_IMAGE, ACTION_FSV_PRINT, ACTION_FSV_PRIOR_IMAGE, ACTION_FSV_RESTORE, ACTION_FSV_ROTATE_FLIP, ACTION_FSV_ROTATE_LEFT, ACTION_FSV_ROTATE_RIGHT, ACTION_FSV_SELECT_ALL, ACTION_FSV_ZOOM_IN, ACTION_FSV_ZOOM_OUT, ACTION_FSV_ZOOM_TO_SELECTION, ACTION_FULL_SIZE_AVAILABLE, ACTION_FULL_SIZE_ERROR, ACTION_FULL_TEXT_SEARCH, ACTION_GO_SAVED_SEARCH, ACTION_GOTO_PAGE, ACTION_HLP_ABOUT, ACTION_HLP_CONTENTS, ACTION_HLP_CONTEXT, ACTION_IMPORT, ACTION_IMPORT_REFRESH, ACTION_INSERT_PICTURE_GALLERY_TEMPLATES, ACTION_MODIFY, ACTION_NEXT_PAGE, ACTION_OK, ACTION_OPEN, ACTION_OPT_ADD_DATA, ACTION_OPT_APPLY, ACTION_OPT_CHECK_IN, ACTION_OPT_CHECK_OUT, ACTION_OPT_CLEAR, ACTION_OPT_CLEAR_ALL, ACTION_OPT_CLEAR_ALL_MARKS, ACTION_OPT_CREATE_REPORT, ACTION_OPT_DELETE_ELEMENTS, ACTION_OPT_DISCARD, ACTION_OPT_EDITMODE, ACTION_OPT_KEEP, ACTION_OPT_KEEP_ON_APPLY, ACTION_OPT_LOCATIONS, ACTION_OPT_MARK, ACTION_OPT_PROCESS, ACTION_OPT_REFRESH, ACTION_OPT_REFRESH_THUMBNAIL, ACTION_OPT_RELEASE_LOCK, ACTION_OPT_REMOVE, ACTION_OPT_SAVED_SEARCH, ACTION_OPT_SEARCH, ACTION_OPT_SETTINGS, ACTION_OPT_STOP, ACTION_OPT_UNMARK, ACTION_OPT_UPDATE, ACTION_OPT_VIEW_TRANSACTIONS, ACTION_OPT_VIEWLOG, ACTION_OPT_VISUAL_SEARCH, ACTION_PASTE_ASSET, ACTION_PREV_PAGE, ACTION_PUT_ELEMENT, ACTION_RESTORE, ACTION_RPT_FIRST, ACTION_RPT_GEN_CSV, ACTION_RPT_GEN_HTML, ACTION_RPT_GEN_PDF, ACTION_RPT_GOTO, ACTION_RPT_LAST, ACTION_RPT_NEXT, ACTION_RPT_PREV, ACTION_RPT_PRINT, ACTION_RPT_SHOW_TOC, ACTION_RPT_ZOOM_100, ACTION_RPT_ZOOM_150, ACTION_RPT_ZOOM_200, ACTION_RPT_ZOOM_50, ACTION_RPT_ZOOM_75, ACTION_SAVE_SEARCH, ACTION_SAVE_SEARCH_AS, ACTION_SEARCH, ACTION_SELECT_TREE_ROW, ACTION_SEND, ACTION_SERVER_MAINTENANCE, ACTION_SRCH_CHANGE_APPL, ACTION_SRCH_FEWER, ACTION_SRCH_GO, ACTION_SRCH_GO_SAVED, ACTION_SRCH_IGNORE_CASE, ACTION_SRCH_MODE_ADV, ACTION_SRCH_MODE_BASIC, ACTION_SRCH_MODE_FILEBASED, ACTION_SRCH_MODE_FULL_TEXT, ACTION_SRCH_MORE, ACTION_SRCH_NEW_FRAME, ACTION_THUMB_CREATE_FULL_THUMB, ACTION_THUMB_VIEW_ELEMENT_DETAILS, ACTION_THUMB_VIEW_MULTI_PAGE, ACTION_TRANSACTION_LOGGING, ACTION_TREE_COLLAPSE_ALL, ACTION_TREE_COLLAPSE_BRANCH, ACTION_TREE_EXPAND_ALL, ACTION_TREE_EXPAND_BRANCH, ACTION_TREE_EXPAND_ONE_LEVEL, ACTION_UTL_TRASH_CAN, ACTION_UTL_VIEW_TRANSACTIONS, ACTION_VIEW_ELEMENT_DETAILS, ACTION_VIEW_HISTORY, ACTION_VIEW_MARKED_ITEMS, ACTION_VIEW_MULTI_PAGE, ACTION_VIEW_RELOAD_THUMBNAIL, ACTION_VIEW_VERSIONS, ACTION_VIR_EXECUTE, ACTION_VIR_NEW_FRAME, ACTION_VIR_SET_WEIGHTS, IDENTIFIER
 
Constructor Summary
CheckboxMenuItem(int nTextId, int nActionId)
          Create a new CheckboxMenuItem with the given label id(text resource number) and action id.
CheckboxMenuItem(int nTextId, int nActionIdTrue, int nActionIdFalse)
          Create a new CheckboxMenuItem with the given label id(text resource number) and action ids.
 
Method Summary
 void addNotify()
          Create's this object's native peer
 void addObserver(java.util.Observer o)
          Add an observer to this menu item
 int getActionId()
          Gets the menu item action id
 java.util.Observable getObservable()
          Gets the embedded observable object used for delegation of the observable pattern when class does NOT derive from java.util.Observable
 void processItemEvent(java.awt.event.ItemEvent e)
          Convert an item event into an action event, so an event can be handled with an action listener for checkboxmenuitems as well as regular menu items.
 void setState(boolean bState)
          Set the menu item state to a new value and notify observers.
(package private)  void setStateUnNotified(boolean bState)
          This method is called from the menu item group to manipulate the state without notification
 
Methods inherited from class java.awt.CheckboxMenuItem
addItemListener, getAccessibleContext, getItemListeners, getListeners, getSelectedObjects, getState, paramString, processEvent, removeItemListener
 
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getActionListeners, getLabel, getShortcut, isEnabled, processActionEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, removeNotify, setFont, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.flexstor.common.awt.ActionComponentI
addActionListener, removeActionListener, setEnabled
 

Field Detail

observable

com.flexstor.common.util.FlexObservable observable

nActionIdTrue

int nActionIdTrue

nActionIdFalse

int nActionIdFalse
Constructor Detail

CheckboxMenuItem

public CheckboxMenuItem(int nTextId,
                        int nActionId)
Create a new CheckboxMenuItem with the given label id(text resource number) and action id.


CheckboxMenuItem

public CheckboxMenuItem(int nTextId,
                        int nActionIdTrue,
                        int nActionIdFalse)
Create a new CheckboxMenuItem with the given label id(text resource number) and action ids. one for each state.

Method Detail

addNotify

public void addNotify()
Description copied from class: java.awt.CheckboxMenuItem
Create's this object's native peer


getActionId

public int getActionId()
Gets the menu item action id

Specified by:
getActionId in interface com.flexstor.common.awt.ActionComponentI

setState

public void setState(boolean bState)
Set the menu item state to a new value and notify observers. (FYI: The peer calls setState and then action which eventually calls postEvent).


setStateUnNotified

void setStateUnNotified(boolean bState)
This method is called from the menu item group to manipulate the state without notification


getObservable

public java.util.Observable getObservable()
Gets the embedded observable object used for delegation of the observable pattern when class does NOT derive from java.util.Observable


addObserver

public void addObserver(java.util.Observer o)
Add an observer to this menu item


processItemEvent

public void processItemEvent(java.awt.event.ItemEvent e)
Convert an item event into an action event, so an event can be handled with an action listener for checkboxmenuitems as well as regular menu items.