|
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
javax.swing.JPanel
com.ontimize.gui.field.NavigationMenu
| Nested Class Summary | |
static class |
NavigationMenu.BasicMenuHeaderRenderer
Class that determines a MenuItem renderer by default. |
static class |
NavigationMenu.DefaultMenuHeaderRenderer
Class that determines a MenuHeader renderer by default. |
static class |
NavigationMenu.DefaultMenuItemRenderer
Class that determines a MenuItem renderer by default. |
static class |
NavigationMenu.MenuGroup
Class that contains each Menu displayed into the NavigationMenu. |
static interface |
NavigationMenu.MenuHeaderRenderer
Interface MenuHeaderRenderer. |
static class |
NavigationMenu.MenuItem
Class that contains each Item displayed into the MenuGroup of the NavigationMenu. |
static interface |
NavigationMenu.MenuItemRenderer
Interface MenuItemRenderer. |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| 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 static java.lang.String |
BASICRENDERER
|
protected static java.lang.String |
BGBODY
Identification of the "bgbody" XML tag. |
protected static java.lang.String |
BGHEADER
Identification of the "bgheader" XML tag. |
protected java.awt.Image |
bgImage
Background image of the NavigationMenu. |
static java.lang.String |
BLACK
|
static java.lang.String |
BLUE
|
protected static java.lang.String |
BORDER
Identification of the "border" XML tag. |
protected static java.lang.String |
BORDERCLASS
Identification of the "borderclass" XML tag. |
protected static java.lang.String |
BORDERCOLOR
Identification of the "bordercolor" XML tag. |
protected boolean |
centerImage
Parameter that indicates if it is wanted to center the background image into the NavigationMenu. |
protected static java.lang.String |
CENTERIMAGE
|
static java.lang.String |
CYAN
|
static java.lang.String |
DARKBLUE
|
static java.lang.String |
DARKGRAY
|
protected static java.lang.String |
DRAGALLMENU
Identification of the "dragallmenu" XML tag. |
protected static java.lang.String |
DRAGENABLE
Identification of the "dragenable" XML tag. |
static java.lang.String |
EAST
Compass-direction east (right). |
protected static java.lang.String |
ERROR_MESSAGE
Message error. |
protected java.awt.Image |
fixImage
Background image if it is wanted to fit into the NavigationMenu. |
protected int |
fixImagePosition
Position to place fixImage. |
protected static java.lang.String |
FIXIMG
|
protected static java.lang.String |
FIXIMGPOSITION
|
protected static java.lang.String |
FOREGROUND
Identification of the "fg" XML tag. |
protected static java.lang.String |
FOREGROUNDHEADER
Identification of the "fgheader" XML tag. |
static java.lang.String |
GRAY
|
static java.lang.String |
GREEN
|
protected static java.lang.String |
HEADER
Identification of the "header" XML tag. |
protected static java.lang.String |
HEADERHEIGHT
Identification of the "headerheight" XML tag. |
protected int |
height
Height of the NavigationMenu background image. |
protected static java.lang.String |
HEIGHT
Identification of the "height" XML tag. |
protected static java.lang.String |
ICONS
Identification of the "icons" XML tag. |
protected java.lang.String |
imageBasePath
String that contains the base search route of all the images and icons of the NavigationMenu. |
protected static java.lang.String |
IMAGEBASEPATH
|
protected static java.lang.String |
IMG
|
static java.lang.String |
LIGHTGRAY
|
static java.lang.String |
MAGENTA
|
protected static java.lang.String |
MENU_GROUP_HEADER_ICON
|
protected static java.lang.String |
MENUGROUP
Identification of the "MenuGroup" XML tag. |
protected static java.lang.String |
MENUGROUPCLASS
|
protected NavigationMenu.MenuHeaderRenderer |
menuHeaderRenderer
Renderer of the Header. |
protected static java.lang.String |
MENUITEMCLASS
Identification of the "menuitemclass" XML tag. |
protected NavigationMenu.MenuItemRenderer |
menuItemRenderer
Renderer of the MenuItem. |
protected java.util.ArrayList |
menuList
ArrayList that contains all the menuGroups contained into the NavigatioMenu. |
protected boolean |
mosaic
|
protected static java.lang.String |
MOSAIC
|
static java.lang.String |
NORTH
Compass-direction North (up). |
static java.lang.String |
NORTH_EAST
Compass-direction north-east (upper right). |
static java.lang.String |
NORTH_WEST
Compass-direction north west (upper left). |
protected static java.lang.String |
OPAQUE
Identification of the "opaque" XML tag. |
protected static java.lang.String |
OPTIONS
Identification of the "options" XML tag. |
static java.lang.String |
ORANGE
|
protected static java.lang.Class[] |
params
|
static java.lang.String |
PINK
|
static java.lang.String |
RED
|
protected static java.lang.String |
ROOT_XML
Identification of the "NavigationMenu" XML tag. |
protected static java.lang.String |
SEPARATOR
Identification of the "separator" XML tag. |
static java.lang.String |
SOUTH
Compass-direction south (down). |
static java.lang.String |
SOUTH_EAST
Compass-direction south-east (lower right). |
static java.lang.String |
SOUTH_WEST
Compass-direction south-west (lower left). |
protected static boolean |
useBasicRenderer
Parameter that indicates if basic renderer is used. |
static java.lang.String |
WEST
Compass-direction west (left). |
static java.lang.String |
WHITE
|
protected int |
width
Width of the NavigationMenu background image. |
protected static java.lang.String |
WIDTH
Identification of the "width" XML tag. |
protected static java.lang.String |
X
Identification of the "x" XML tag. |
protected static java.lang.String |
Y
Identification of the "y" XML tag. |
static java.lang.String |
YELLOW
|
| 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, PROPERTIES, SOMEBITS |
| Constructor Summary | |
NavigationMenu()
Default constructor. |
|
NavigationMenu(java.awt.Image bgImage,
java.awt.Image imageLogo,
int width,
int height)
Constructs a new NavigationMenu specifying the background image, the logo image and its dimensions. |
|
NavigationMenu(java.awt.Image bgImage,
int width,
int height)
Constructs a new NavigationMenu specifying the background image and its dimensions. |
|
NavigationMenu(java.net.URL xml)
Constructs a new NavigationMenu. |
|
| Method Summary | |
void |
add(NavigationMenu.MenuGroup mg)
This method adds the specified MenuGroup to the NavigationMenu. |
static java.awt.Color |
colorRGBHexToColor(java.lang.String rgb)
This method converts the specified RGBColor into a Color object. |
static java.awt.Color |
colorRGBToColor(java.lang.String rgb)
This method converts the specified RGBColor into a Color object. |
protected NavigationMenu.MenuGroup |
createMenuGroup(org.w3c.dom.Node node)
This method analyzes a "MenuGroup" node of the XML Document configuration to obtain all the parameter to build a new MenuGroup into the NavigationMenu. |
protected NavigationMenu.MenuGroup |
createMenuGroupInstance(java.lang.String header,
java.lang.String[] opts,
javax.swing.ImageIcon[] icons,
int x,
int y,
int width,
int height,
java.awt.Color bgHeader,
java.awt.Color bgBody,
java.awt.Color fg,
java.awt.Color border)
This method instantiates a new MenuGroup object with the specified parameters. |
java.awt.Component |
getComponent(int n)
|
java.awt.Component[] |
getComponents()
|
protected org.w3c.dom.Node |
getNode(org.w3c.dom.NamedNodeMap attributes,
java.lang.String name)
|
java.awt.Dimension |
getPreferredSize()
This method obtains the preferred size of the background image of the NavigationMenu. |
boolean |
isCenterImage()
This method returns if it is wanted to center the background image. |
boolean |
isTag(org.w3c.dom.Node node)
This method checks if the given node is an Element node of a DOM document or not. |
protected void |
paintComponent(java.awt.Graphics g)
This method paints the NavigationMenu |
protected void |
paintFixImageToPosition(java.awt.Graphics g)
|
protected void |
parse(java.net.URL xml)
This method parses the XML Document configuration to obtain all the parameters. |
static java.awt.Color |
parseColor(java.lang.String color)
This method analyzes a String that specifies a color and returns a Color object. |
void |
setCenterImage(boolean centerImage)
This method establishes that the background image have to be centered into the NavigationMenu. |
void |
setMenuHeaderRenderer(NavigationMenu.MenuHeaderRenderer menuHeaderRenderer)
Establishes the MenuHeader renderer. |
void |
setMenuItemRenderer(NavigationMenu.MenuItemRenderer menuItemRenderer)
Establishes the MenuItem renderer. |
void |
setResourceBundle(java.util.ResourceBundle bundle)
This method establishes the ResourceBundle of the NavigationMenu to all MenuGroups. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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 |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, 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, 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, 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 IMAGEBASEPATH
protected static final java.lang.String CENTERIMAGE
protected static final java.lang.String IMG
protected static final java.lang.String FIXIMG
protected static final java.lang.String FIXIMGPOSITION
protected static final java.lang.String MOSAIC
protected static final java.lang.String BASICRENDERER
public static final java.lang.String NORTH
public static final java.lang.String NORTH_EAST
public static final java.lang.String EAST
public static final java.lang.String SOUTH_EAST
public static final java.lang.String SOUTH
public static final java.lang.String SOUTH_WEST
public static final java.lang.String WEST
public static final java.lang.String NORTH_WEST
protected static final java.lang.String ROOT_XML
protected static final java.lang.String MENUGROUP
protected static final java.lang.String HEADER
protected static final java.lang.String OPTIONS
protected static final java.lang.String ICONS
protected static final java.lang.String X
protected static final java.lang.String Y
protected static final java.lang.String WIDTH
protected static final java.lang.String HEIGHT
protected static final java.lang.String BGHEADER
protected static final java.lang.String BGBODY
protected static final java.lang.String FOREGROUND
protected static final java.lang.String FOREGROUNDHEADER
protected static final java.lang.String BORDERCOLOR
protected static final java.lang.String MENUITEMCLASS
protected static final java.lang.String HEADERHEIGHT
protected static final java.lang.String BORDERCLASS
protected static final java.lang.String OPAQUE
protected static final java.lang.String DRAGENABLE
protected static final java.lang.String DRAGALLMENU
protected static final java.lang.String SEPARATOR
protected static final java.lang.String BORDER
protected static final java.lang.String MENU_GROUP_HEADER_ICON
protected static final java.lang.String MENUGROUPCLASS
protected static final java.lang.Class[] params
protected static final java.lang.String ERROR_MESSAGE
public static final java.lang.String GRAY
public static final java.lang.String BLACK
public static final java.lang.String BLUE
public static final java.lang.String RED
public static final java.lang.String YELLOW
public static final java.lang.String CYAN
public static final java.lang.String DARKGRAY
public static final java.lang.String GREEN
public static final java.lang.String LIGHTGRAY
public static final java.lang.String MAGENTA
public static final java.lang.String ORANGE
public static final java.lang.String PINK
public static final java.lang.String WHITE
public static final java.lang.String DARKBLUE
protected java.util.ArrayList menuList
protected java.awt.Image bgImage
protected java.awt.Image fixImage
protected int fixImagePosition
protected boolean centerImage
protected boolean mosaic
protected java.lang.String imageBasePath
protected int width
protected int height
protected static boolean useBasicRenderer
protected NavigationMenu.MenuItemRenderer menuItemRenderer
protected NavigationMenu.MenuHeaderRenderer menuHeaderRenderer
| Constructor Detail |
public NavigationMenu(java.awt.Image bgImage,
int width,
int height)
bgImage - The background image of the NavigationMenu.width - The width of the image.height - The height of the image.
public NavigationMenu(java.awt.Image bgImage,
java.awt.Image imageLogo,
int width,
int height)
bgImage - The background image of the NavigationMenu.imageLogo - The logo image of the NavigationMenu.width - The width of the image.height - The height of the image.
public NavigationMenu()
throws java.lang.Exception
java.lang.Exception
public NavigationMenu(java.net.URL xml)
throws java.lang.Exception
xml - The XML Document that contains the configuration parameters.
java.lang.Exception| Method Detail |
public void setMenuItemRenderer(NavigationMenu.MenuItemRenderer menuItemRenderer)
menuItemRenderer - The MenuItem renderer.public void setMenuHeaderRenderer(NavigationMenu.MenuHeaderRenderer menuHeaderRenderer)
menuHeaderRenderer - The MenuHeader renderer.public java.awt.Dimension getPreferredSize()
Dimension object with the background image
dimensions.public java.awt.Component getComponent(int n)
public java.awt.Component[] getComponents()
public void add(NavigationMenu.MenuGroup mg)
mg - The MenuGroup object to be added.public void setResourceBundle(java.util.ResourceBundle bundle)
bundle - The ResourceBundle.protected void paintComponent(java.awt.Graphics g)
g - The graphics.protected void paintFixImageToPosition(java.awt.Graphics g)
protected void parse(java.net.URL xml)
throws java.lang.Exception
xml - The XML Document configuration.
java.lang.Exceptionpublic boolean isTag(org.w3c.dom.Node node)
node - The node to be checked.
boolean.
protected org.w3c.dom.Node getNode(org.w3c.dom.NamedNodeMap attributes,
java.lang.String name)
protected NavigationMenu.MenuGroup createMenuGroup(org.w3c.dom.Node node)
throws java.lang.Exception
node - The "MenuGroup" node of the XML Document configuration.
MenuGroup object.
java.lang.Exception
protected NavigationMenu.MenuGroup createMenuGroupInstance(java.lang.String header,
java.lang.String[] opts,
javax.swing.ImageIcon[] icons,
int x,
int y,
int width,
int height,
java.awt.Color bgHeader,
java.awt.Color bgBody,
java.awt.Color fg,
java.awt.Color border)
throws java.lang.Exception
header - 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.
MenuGroup object.
java.lang.Exception
public static java.awt.Color colorRGBToColor(java.lang.String rgb)
throws java.lang.Exception
rgb - String specifying a RGB color separated by semicolon "R;G;B".
That is "102;23;44"
Color.
java.lang.Exception
public static java.awt.Color colorRGBHexToColor(java.lang.String rgb)
throws java.lang.Exception
rgb - String specifying a RGB color expressed into Hexadecimal form
"#". That is "#ffffff"
Color.
java.lang.Exception
public static java.awt.Color parseColor(java.lang.String color)
throws java.lang.Exception
color - String with the color.
Color object.
java.lang.Exceptionpublic boolean isCenterImage()
boolean.public void setCenterImage(boolean centerImage)
centerImage -
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||