|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.ontimize.gui.field.NavigationMenu.MenuGroup
Class that contains each Menu displayed into the NavigationMenu.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected java.awt.event.ActionListener |
actionListener
The ActionListener assigned to the MenuGroup. |
protected java.awt.Color |
bgBody
Color of the background of the Menu. |
protected java.awt.Color |
bgHeader
Color of the Header of the Menu. |
protected javax.swing.border.Border |
border
Border Object with the border of the Menu. |
protected java.awt.Color |
borderColor
Color of the border of the Menu. |
protected java.lang.String |
borderString
String with the style of the border of the Menu. |
protected java.util.ResourceBundle |
bundle
The Resource Bundle assigned to the Menu. |
static java.awt.Color |
DEFAULT_BGBODY
Default color of the background body. |
static java.awt.Color |
DEFAULT_BGHEADER
Default color of the background header. |
static java.awt.Color |
DEFAULT_BORDERCOLOR
Default border color of the border of the Menu Group. |
static java.awt.Color |
DEFAULT_FG
Default color of the Font. |
static java.awt.Color |
DEFAULT_FGHEADER
Default color of the Header Font. |
static java.awt.Color |
DEFAULT_FGSELECTIONCOLOR
Default color of the Font when an item is selected. |
protected static int |
DEFAULT_HEADER_HEIGHT
The default height of the Header in pixels. |
protected static java.lang.String |
DEFAULT_MENUITEM_CLASS
The location's route to the default MenuItem Class. |
static java.awt.Color |
DEFAULT_SELECTIONCOLOR
Default color when an item is selected. |
protected boolean |
dragAllMenuEnabled
Parameter that allows to drag all Menu. by default only menu header is draggable. |
protected boolean |
dragEnabled
Parameter that allows to drag the Menu or not. |
protected java.awt.Color |
foregroundColor
Color of the font of the Menu. |
protected java.awt.Color |
foregroundColorHeader
Color of the font of the Menu Header. |
protected boolean |
hasBorder
Parameter that allows to configure if the MenuGroup has or not border. |
protected java.lang.String |
header
String with the text that will be displayed into the Header of the Menu. |
protected int |
headerheight
Variable that contains the header height of the Menu. |
protected javax.swing.ImageIcon |
icon
Icon of the Header that indicates if the Menu Group could be dragged. |
protected int |
itemHeight
The height of each item in pixels. |
protected NavigationMenu.MenuHeaderRenderer |
menuHeaderRenderer
The renderer of each MenuHeader of the Menu. |
protected NavigationMenu.MenuItem[] |
menuItem
Array with all the MenuItems of the Menu. |
protected java.lang.String |
menuItemClass
String that contains the location's route of the MenuItem Class. |
protected NavigationMenu.MenuItemRenderer |
menuItemRenderer
The renderer of each MenuItem of the Menu. |
protected boolean |
opaque
Parameter that allows to configure the Menu opaque or not. |
protected int |
optionsOffset
Number of pixels of separation between the Header and the items of the Menu. |
protected java.lang.String |
selectedOption
String that contains the selected Option into the Menu. |
protected boolean |
separator
Parameter that displays a separator between the MenuItems of the MenuGroup. |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
NavigationMenu.MenuGroup(java.util.Hashtable parameters)
Constructs a new MenuGroup with the specified parameters. |
|
NavigationMenu.MenuGroup(java.lang.String header,
java.lang.String[] options,
javax.swing.ImageIcon[] icons,
int x,
int y,
int w,
int h,
java.awt.Color bgH,
java.awt.Color bgB,
java.awt.Color fg,
java.awt.Color borderColor)
Deprecated. |
|
| Method Summary | |
protected void |
createMenuItems(java.util.Hashtable parameters)
This method creates all the MenuItems of the MenuGroup. |
java.awt.Color |
getBgHeader()
|
java.awt.Color |
getForegroundColorHeader()
|
java.lang.String |
getHeader()
This method returns a String with the text of the MenuGroup Header. |
int |
getHeaderHeight()
|
int |
getItemHeight()
This method returns the height of each MenuItem of the MenuGroup. |
protected NavigationMenu.MenuItem |
getMenuAt(int x,
int y)
This method checks if the specified coordinates x and y belongs to any MenuItem of the MenuGroup, and if it is true, the method returns the MenuItem object selected. |
NavigationMenu.MenuItem[] |
getMenuItem()
This method returns an Array of MenuItem objects with all the MenuItem of the MenuGroup. |
protected java.lang.String |
getOptionAt(int x,
int y)
This method checks if the specified coordinates x and y belongs to any MenuItem of the MenuGroup, and if it is true, the method returns the identifier of the MenuItem selected. |
protected int |
getOptionIndex(int x,
int y)
This method checks if the specified coordinates x and y belongs to any MenuItem of the MenuGroup, and if it is true, the method returns the index of the MenuItem selected. |
int |
getX()
This method returns the coordinate x of the MenuGroup. |
int |
getY()
This method returns the coordinate y of the MenuGroup. |
protected void |
installMouseHandler()
This method installs the Handler of Mouse Listeners. |
boolean |
isOpaque()
|
boolean |
isVisible()
|
void |
move(int despX,
int despY)
This method allows to move the MenuGroup the specified distance into the coordinate x and y since the current position of the MenuGroup. |
protected void |
paintComponent(java.awt.Graphics g)
This method paints the MenuGroup. |
protected void |
paintOptions(java.awt.Graphics g)
This method establishes the paint options to paint each MenuItem of the MenuGroup using the MenuItemRenderer assigned to the MenuGroup. |
void |
reBound()
This method allows to resize the size of the MenuGroup in function of the number of MenuItems that are visible. |
void |
setActionListener(java.awt.event.ActionListener l)
This method establishes the specified ActionListener to the MenuGroup. |
void |
setItemHeight(int itemHeight)
This method establishes the height of the MenuItem of the MenuGroup. |
void |
setMenuGroupBounds(int x,
int y,
int width,
int height)
This method establishes the size of the MenuGroup when it is created the first time. |
void |
setMenuHeaderRenderer(NavigationMenu.MenuHeaderRenderer menuHeaderRenderer)
This method establishes the specified MenuHeaderRenderer to the MenuGroup. |
void |
setMenuItem(NavigationMenu.MenuItem[] menuItem)
This method sets the MenuItems of the MenuGroup. |
void |
setMenuItemRenderer(NavigationMenu.MenuItemRenderer menuItemRenderer)
This method establishes the specified MenuItemRenderer to the MenuGroup. |
void |
setResourceBundle(java.util.ResourceBundle bundle)
This method establishes the ResourceBundle to the MenuGroup. |
void |
setXY(int x,
int y)
This method sets the coordinates x,y of the MenuGroup. |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final java.lang.String DEFAULT_MENUITEM_CLASS
public static final java.awt.Color DEFAULT_BGBODY
public static final java.awt.Color DEFAULT_BGHEADER
public static java.awt.Color DEFAULT_FG
public static final java.awt.Color DEFAULT_FGHEADER
public static final java.awt.Color DEFAULT_BORDERCOLOR
public static java.awt.Color DEFAULT_SELECTIONCOLOR
public static java.awt.Color DEFAULT_FGSELECTIONCOLOR
protected int optionsOffset
protected java.lang.String menuItemClass
protected java.awt.event.ActionListener actionListener
protected int itemHeight
protected java.awt.Color bgHeader
protected java.awt.Color bgBody
protected java.awt.Color foregroundColor
protected java.awt.Color foregroundColorHeader
protected java.lang.String header
protected java.awt.Color borderColor
protected javax.swing.border.Border border
protected java.lang.String borderString
protected java.lang.String selectedOption
protected boolean opaque
protected boolean dragEnabled
protected boolean dragAllMenuEnabled
protected boolean separator
protected boolean hasBorder
protected java.util.ResourceBundle bundle
protected NavigationMenu.MenuItem[] menuItem
protected static int DEFAULT_HEADER_HEIGHT
protected int headerheight
protected NavigationMenu.MenuItemRenderer menuItemRenderer
protected NavigationMenu.MenuHeaderRenderer menuHeaderRenderer
protected javax.swing.ImageIcon icon
| Constructor Detail |
public NavigationMenu.MenuGroup(java.lang.String header,
java.lang.String[] options,
javax.swing.ImageIcon[] icons,
int x,
int y,
int w,
int h,
java.awt.Color bgH,
java.awt.Color bgB,
java.awt.Color fg,
java.awt.Color borderColor)
header - String with the text to display into the Header of the
MenuGroup.options - 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.w - The width of the MenuGroup.h - The absolute height of the MenuGroup. The header height is
included into this height.bgH - The color of the MenuGroup Header.bgB - The color of the background MenuGroup.fg - The color of the MenuGroup font.borderColor - The color of the border of the MenuGroup. Use
#MenuGroup(Hashtable parameters)public NavigationMenu.MenuGroup(java.util.Hashtable parameters)
parameters - the Hashtable with the whole parameters to
configure the MenuGroup.
| attribute | values | default | required | meaning |
| header | no | String with the text to display into the Header of the MenuGroup. | ||
| headerheight | 35 | no | Height of the Header of the MenuGroup. | bgheader | Color: "214;222;230" or "#ffffff" | #434343 | no | The color of the MenuGroup Header. |
| options | "mangarusers;manageraccounts..." | yes | String Array with the identifier of each MenuItem of the MenuGroup. | |
| icons | "/buttonsbar/icon1.png;/buttonsbar/icon2.png..." | no | ImageIcon Array with the icons to each MenuItem of the MenuGroup. | |
| x | no | The coordinate x of the MenuGroup into the NavigationMenu. | ||
| y | no | The coordinate y of the MenuGroup into the NavigationMenu. | ||
| width | yes | The width of the MenuGroup. | ||
| height | no | The absolute height of the MenuGroup. The header height is included into this height. | ||
| bgbody | Color: "214;222;230" or "#ffffff" | #dedede | no | The color of the background MenuGroup. | fg | Color: "214;222;230" or "#ffffff" | #434343 | no | The color of the foreground MenuGroup. | bordercolor | Color: "214;222;230" or "#ffffff" | #f0f0f0 | no | The color of the MenuGroup border. | border | "yes/no" or "true/false" | true | no | Specifies if the MenuGroup has border. | borderclass | no | String with the border style. | opaque | "yes/no" or "true/false" | true | no | Specifies is the MenuGroup is opaque or not. | dragenable | "yes/no" or "true/false" | true | no | Specifies if the MenuGroup could be dragged. | dragallmenu | "yes/no" or "true/false" | false | no | Specifies if all the MenuGroup could be dragged or only the header. By default, only header is draggable. | separator | "yes/no" or "true/false" | true | no | Specifies if a separator would be placed between MenuItems of the MenuGroup. |
| Method Detail |
public void reBound()
public void setMenuGroupBounds(int x,
int y,
int width,
int height)
x - The coordinate x of the MenuGroup.y - The coordinate y of the MenuGroup.width - The width of the MenuGroup.height - The height of the MenuGroup.protected void createMenuItems(java.util.Hashtable parameters)
parameters - the Hashtable with the whole parameters to
configure the MenuItem.
| attribute | values | default | required | meaning |
| options | "mangarusers;manageraccounts..." | yes | String Array with the identifier of each MenuItem of the MenuGroup. | |
| icons | "/buttonsbar/icon1.png;/buttonsbar/icon2.png..." | no | ImageIcon Array with the icons to each MenuItem of the MenuGroup. | |
| menuitemclass | "com.ontimize.gui.field.NavigationMenu$MenuItem" | no | The class of the MenuItem |
public NavigationMenu.MenuItem[] getMenuItem()
Array of MenuItem.public void setMenuItem(NavigationMenu.MenuItem[] menuItem)
menuItem - Array of MenuItem objects.public int getItemHeight()
int with the MenuItem height.public void setItemHeight(int itemHeight)
itemHeight - public int getX()
int with the coordinate x of the MenuGroup.public int getY()
int with the coordinate y of the MenuGroup.
public void setXY(int x,
int y)
x - Int with the coordinate x of the MenuGroup.y - Int with the coordinate y of the MenuGroup.
public void move(int despX,
int despY)
despX - Int with the displacement into the coordinate x.despY - Int with the displacement into the coordinate y.public void setActionListener(java.awt.event.ActionListener l)
l - The ActionListener.public void setMenuItemRenderer(NavigationMenu.MenuItemRenderer menuItemRenderer)
menuItemRenderer - The MenuItemRenderer.public void setMenuHeaderRenderer(NavigationMenu.MenuHeaderRenderer menuHeaderRenderer)
menuHeaderRenderer - The MenuHeaderRenderer.public java.lang.String getHeader()
String with the MenuGroup Header text.public void setResourceBundle(java.util.ResourceBundle bundle)
bundle - The ResourceBundle.protected void installMouseHandler()
protected void paintOptions(java.awt.Graphics g)
g - The Graphics of the MenuGroup.protected void paintComponent(java.awt.Graphics g)
g - The Graphics of NavigationMenu.public boolean isVisible()
protected NavigationMenu.MenuItem getMenuAt(int x,
int y)
x - int of the coordinate x.y - int of the coordinate y.
MenuItem selected.
protected java.lang.String getOptionAt(int x,
int y)
x - int of the coordinate x.y - int of the coordinate y.
String with the MenuItem identifier.
protected int getOptionIndex(int x,
int y)
x - int of the coordinate x.y - int of the coordinate y.
int with the MenuItem index.public int getHeaderHeight()
public java.awt.Color getBgHeader()
public boolean isOpaque()
public java.awt.Color getForegroundColorHeader()
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||