public class NavigatorMenuGUI extends NavigationMenu implements IdentifiedElement, AccessForm, FormComponent, HasPreferenceComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
NavigatorMenuGUI.GroupSelectableItem
This class introduces a group of SelectableItem objects into a
SelectableItem.
|
static class |
NavigatorMenuGUI.InnerLabel |
static class |
NavigatorMenuGUI.MenuGroupGUI
This class integrate Ontimize characteristics into the MenuGroup.
|
static class |
NavigatorMenuGUI.MenuItemGUI
This class integrate Ontimize characteristics into the MenuItem.
|
static class |
NavigatorMenuGUI.MenuItemInformation
This class is necessary to the visibility configuration of the MenuItems.
|
static class |
NavigatorMenuGUI.SetupDialog
This class configures the JDialog in which the visibility of the
MenuItems of the MenuGroups are configured.
|
NavigationMenu.BasicMenuHeaderRenderer, NavigationMenu.DefaultMenuHeaderRenderer, NavigationMenu.DefaultMenuItemRenderer, NavigationMenu.MenuGroup, NavigationMenu.MenuHeaderRenderer, NavigationMenu.MenuItem, NavigationMenu.MenuItemRendererJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected ApplicationPreferences |
aPreferences |
protected Object |
attribute |
protected ResourceBundle |
bundle |
protected NavigatorMenuGUI.SetupDialog |
dialog |
protected FormPermission |
enabledPermision |
static String |
NAVIGATOR_MENU |
protected Form |
parentForm |
protected JPopupMenu |
popupmenu |
static String |
RESTORE_DEFAULTS |
protected boolean |
restricted |
static String |
SRC |
static BasicStroke |
stroke |
protected String |
userPrefs |
static String |
VISIBLE_ITEMS |
protected FormPermission |
visiblePermission |
BASICRENDERER, BGBODY, BGHEADER, bgImage, BLACK, BLUE, BORDER, BORDERCLASS, BORDERCOLOR, centerImage, CENTERIMAGE, CYAN, DARKBLUE, DARKGRAY, DRAGALLMENU, DRAGENABLE, EAST, ERROR_MESSAGE, fixImage, fixImagePosition, FIXIMG, FIXIMGPOSITION, FOREGROUND, FOREGROUNDHEADER, GRAY, GREEN, HEADER, HEADERHEIGHT, height, HEIGHT, ICONS, imageBasePath, IMAGEBASEPATH, IMG, LIGHTGRAY, MAGENTA, MENU_GROUP_HEADER_ICON, MENUGROUP, MENUGROUPCLASS, menuHeaderRenderer, MENUITEMCLASS, menuItemRenderer, menuList, mosaic, MOSAIC, NORTH, NORTH_EAST, NORTH_WEST, OPAQUE, OPTIONS, ORANGE, params, PINK, RED, ROOT_XML, SEPARATOR, SOUTH, SOUTH_EAST, SOUTH_WEST, useBasicRenderer, WEST, WHITE, width, WIDTH, X, Y, YELLOWaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDESACTIVATE_COMPONENT_BY_PERMISSION_TIPDEBUG_LANGUAGEABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS| Constructor and Description |
|---|
NavigatorMenuGUI(Hashtable h)
Method that configures the component.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkEnabledPermission() |
protected boolean |
checkVisiblePermission() |
protected NavigationMenu.MenuGroup |
createMenuGroup(Node node)
This method analyzes a "MenuGroup" node of the XML Document configuration
to obtain all the parameter to build a new MenuGroupGUI into the
NavigationMenu.
|
protected NavigatorMenuGUI.MenuGroupGUI |
createMenuGroupInstance(Hashtable parameters)
This method instantiates a new MenuGroupGUI object with the specified
parameters.
|
protected NavigationMenu.MenuGroup |
createMenuGroupInstance(String header,
String[] opts,
ImageIcon[] icons,
int x,
int y,
int width,
int height,
Color bgHeader,
Color bgBody,
Color fg,
Color border)
Deprecated.
|
Object |
getAttribute()
Gets the object attribute.
|
Object |
getConstraints(LayoutManager parentLayout)
Description method to return the
constraints component to
place correctly in parent container. |
protected String |
getNavigationMenuPreferenceKey()
This method returns a unequivocal key name to assign to this
MenuNavigator that will be used into the Preferences.
|
protected String |
getNavigationMenuPreferenceValue()
This method obtains the current values of MenuGroups and builds a String
with the preference values of these MenuGroups.
|
String |
getPreferenceItems(NavigationMenu.MenuItem[] items)
This is an auxiliary method to check the visibility value of the MenuItem
and builds a String with them to be used into the preference values.
|
String |
getPreferencesStructure(ArrayList menulist)
This method obtains the current visibility values of the MenuItems of the
MenuGroups and builds a String to be used into the preference values.
|
Dimension |
getPreferredSize()
This method obtains the preferred size of the background image of the
NavigationMenu.
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
void |
init(Hashtable arguments)
This method gets the
Hashtable and initializes the component
|
void |
initPermissions() |
void |
initPreferences(ApplicationPreferences ap,
String user) |
protected void |
installMouseHandler() |
boolean |
isRestricted() |
protected void |
resizeMenuGroup(String header)
This method resizes the specified MenuGroup.
|
protected void |
saveNavigationMenuPreference() |
protected void |
saveNavigationMenuPreference(boolean bSaveRemote)
This method save the current preference values.
|
void |
setComponentLocale(Locale l) |
protected void |
setDefaultValues()
This method restore the default values of the MenuGroups of the
NavigationMenu.
|
protected void |
setMenuGroupValue(String name,
int x,
int y)
This method establishes the position (x,y) of the specified MenuGroup
|
protected void |
setMenuGroupValue(String name,
String manager,
boolean visibility)
This method establishes the visibility of the MenuItems of the specified
MenuGroup.
|
protected void |
setNavigationMenuPreferenceValue(String value)
This method recovers the preference values from the specified String and
sets them to the MenuGroup.
|
void |
setParentForm(Form form)
Method declaration to set the form that contains the component.
|
void |
setResourceBundle(ResourceBundle bundle)
This method establishes the ResourceBundle of the NavigationMenu to all
MenuGroups.
|
protected void |
showPopupMenu(MouseEvent e)
This method shows a PopupMenu when a right mouse button click is done.
|
void |
updateVisibleItemsValues(Hashtable data)
This method updates the visibility values of each MenuItem of each
MenuGroup with the information contained into the Hashtable received.
|
add, colorRGBHexToColor, colorRGBToColor, getComponent, getComponents, getNode, isCenterImage, isTag, paintComponent, paintFixImageToPosition, parse, parseColor, setCenterImage, setMenuHeaderRenderer, setMenuItemRenderergetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabled, setEnabled, setVisiblepublic static final String SRC
protected Object attribute
protected FormPermission visiblePermission
protected FormPermission enabledPermision
protected Form parentForm
protected boolean restricted
public static final String NAVIGATOR_MENU
protected JPopupMenu popupmenu
protected ResourceBundle bundle
public static final String RESTORE_DEFAULTS
public static final String VISIBLE_ITEMS
protected NavigatorMenuGUI.SetupDialog dialog
protected ApplicationPreferences aPreferences
protected String userPrefs
public static BasicStroke stroke
public Object getConstraints(LayoutManager parentLayout)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentparentLayout - the parent container referencepublic void init(Hashtable arguments) throws Exception
Hashtable and initializes the component
init in interface FormComponentarguments - the Hashtable with parameters
| attribute | values | default | required | meaning |
| attr | yes | Indicates the component attribute. | ||
| src | yes | Resource path to locate the configuration XML. |
Exception - when Exception occursprotected void installMouseHandler()
public Object getAttribute()
IdentifiedElementgetAttribute in interface IdentifiedElementpublic void initPermissions()
initPermissions in interface SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
public boolean isRestricted()
isRestricted in interface SecureElementpublic void setParentForm(Form form)
AccessFormsetParentForm in interface AccessFormform - the form referencepublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationprotected NavigationMenu.MenuGroup createMenuGroup(Node node) throws Exception
createMenuGroup in class NavigationMenunode - The "MenuGroup" node of the XML Document configuration.MenuGroup object.Exceptionprotected NavigatorMenuGUI.MenuGroupGUI createMenuGroupInstance(Hashtable parameters)
MenuGroupGUI object.@Deprecated protected NavigationMenu.MenuGroup createMenuGroupInstance(String header, String[] opts, ImageIcon[] icons, int x, int y, int width, int height, Color bgHeader, Color bgBody, Color fg, Color border) throws Exception
createMenuGroupInstance in class NavigationMenuheader - String with the text to display into the Header of the
MenuGroup.opts - String Array with the identifier of each MenuItem of the
MenuGroup.icons - ImageIcon Array with the icons to each MenuItem of the
MenuGroup.x - The coordinate x of the MenuGroup into the NavigationMenu.y - The coordinate y of the MenuGroup into the NavigationMenu.width - The width of the MenuGroup.height - The absolute height of the MenuGroup. The header height is
included into this height.bgHeader - The color of the MenuGroup Header.bgBody - The color of the background MenuGroup.fg - The color of the MenuGroup font.border - The color of the border of the MenuGroup. Use
createMenuGroupInstance(Hashtable parameters)MenuGroup object.Exceptionpublic Dimension getPreferredSize()
NavigationMenugetPreferredSize in class NavigationMenuDimension object with the background image
dimensions.public void initPreferences(ApplicationPreferences ap, String user)
initPreferences in interface HasPreferenceComponentprotected String getNavigationMenuPreferenceKey()
String with the name.protected void saveNavigationMenuPreference(boolean bSaveRemote)
protected void saveNavigationMenuPreference()
protected String getNavigationMenuPreferenceValue()
The preference values saved are:- position: The coordinates x and y of each MenuGroup.
- items: The current state of visibility of each MenuItem of each MenuGroup.
*
String with the preference values.protected void setMenuGroupValue(String name, int x, int y)
name - The name of the MenuGroup.x - The coordinate x of the MenuGroup.y - The coordinate y of the MenuGroup.protected void setMenuGroupValue(String name, String manager, boolean visibility)
name - The name of the MenuGroup.manager - The identifier of the MenuItem of the MenuGroupvisibility - Boolean with the visibility value.protected void setNavigationMenuPreferenceValue(String value)
value - Preference values String.public String getPreferencesStructure(ArrayList menulist)
menulist - ArrayList with the whole MenuGroups of the NavigationMenu.Stringpublic String getPreferenceItems(NavigationMenu.MenuItem[] items)
items - An Array of MenuItem objects of a MenuGroup.String.protected void resizeMenuGroup(String header)
header - String with the header name of the MenuGroup.protected void setDefaultValues()
public void setResourceBundle(ResourceBundle bundle)
NavigationMenusetResourceBundle in interface InternationalizationsetResourceBundle in class NavigationMenubundle - The ResourceBundle.protected void showPopupMenu(MouseEvent e)
e - Mouse event.public void updateVisibleItemsValues(Hashtable data)
data - HashTable with the MenuItem visibility information. Pair
values like:
| key | values |
| "MenuGroupName" | MenuItemInformation Object |
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.