EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.jquery
Class DockMenu

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.internal.AbstractContainer
          extended by echopoint.jquery.DockMenu
All Implemented Interfaces:
Serializable, RenderIdSupport

public class DockMenu
extends AbstractContainer

A component to display a Mac-style dock menu (fisheye menu). The menu consists of a set of images that expand on mouse rollover. Along with the image a label can be displayed when the image is expanded. This component is using the jqDock project: http://www.wizzud.com/jqDock

Version:
$Id$
Author:
Mikael Sšderman 2009-06-03
See Also:
Serialized Form

Field Summary
static String ALIGN_BOTTOM
           
static String ALIGN_CENTER
           
static String ALIGN_LEFT
           
static String ALIGN_MIDDLE
           
static String ALIGN_RIGHT
           
static String ALIGN_TOP
           
static String BUTTON_PRESSED_PROPERTY
           
static String LABELS_BOTTOM_CENTER
           
static String LABELS_BOTTOM_LEFT
           
static String LABELS_BOTTOM_RIGHT
           
static String LABELS_MIDDLE_CENTER
           
static String LABELS_MIDDLE_LEFT
           
static String LABELS_MIDDLE_RIGHT
           
static String LABELS_TOP_CENTER
           
static String LABELS_TOP_LEFT
           
static String LABELS_TOP_RIGHT
           
static String MODEL_CHANGED_PROPERTY
           
static String PROPERTY_ALIGN
           
static String PROPERTY_COEFFICIENT
           
static String PROPERTY_DISTANCE
           
static String PROPERTY_DOCK_WIDTH
           
static String PROPERTY_DURATION
           
static String PROPERTY_MINOR_AXIS_SIZE
           
static String PROPERTY_SHOW_LABELS
           
 
Fields inherited from class echopoint.internal.AbstractContainer
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
DockMenu(int minorAxisSize, String displayLabels, int duration)
          Creates a new DockMenu instance.
 
Method Summary
 void addActionListener(ActionListener listener)
          Add the specified action listener to this component.
 void addMenuItem(String text, String actionCommand, int imageWidth, int imageHeight, ImageReference icon, ImageReference expanded)
          Adding an item to the menu.
 String getAlign()
           
 Float getCoefficient()
           
 String getDisplayLabels()
           
 Integer getDistance()
           
 int getDockWidth()
           
 Integer getDuration()
           
 List getModel()
          Returns the model
 boolean hasActionListeners()
          Determines if the button has any ActionListeners registered.
 void processInput(String inputName, Object inputValue)
           
 void removeActionListener(ActionListener listener)
          Remove the specified action listener from the component.
 void setAlign(String align)
           
 void setCoefficient(Float coefficient)
           
 void setDistance(Integer distance)
           
 
Methods inherited from class echopoint.internal.AbstractContainer
fireActionPerformed, getAlignment, getBackgroundImage, getBorder, getHeight, getInsets, getWidth, setAlignment, setBackgroundImage, setBorder, setHeight, setInsets, setWidth
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_CHANGED_PROPERTY

public static final String MODEL_CHANGED_PROPERTY
See Also:
Constant Field Values

BUTTON_PRESSED_PROPERTY

public static final String BUTTON_PRESSED_PROPERTY
See Also:
Constant Field Values

PROPERTY_DOCK_WIDTH

public static final String PROPERTY_DOCK_WIDTH
See Also:
Constant Field Values

PROPERTY_MINOR_AXIS_SIZE

public static final String PROPERTY_MINOR_AXIS_SIZE
See Also:
Constant Field Values

PROPERTY_SHOW_LABELS

public static final String PROPERTY_SHOW_LABELS
See Also:
Constant Field Values

PROPERTY_DURATION

public static final String PROPERTY_DURATION
See Also:
Constant Field Values

PROPERTY_ALIGN

public static final String PROPERTY_ALIGN
See Also:
Constant Field Values

PROPERTY_COEFFICIENT

public static final String PROPERTY_COEFFICIENT
See Also:
Constant Field Values

PROPERTY_DISTANCE

public static final String PROPERTY_DISTANCE
See Also:
Constant Field Values

LABELS_BOTTOM_CENTER

public static final String LABELS_BOTTOM_CENTER
See Also:
Constant Field Values

LABELS_TOP_LEFT

public static final String LABELS_TOP_LEFT
See Also:
Constant Field Values

LABELS_TOP_CENTER

public static final String LABELS_TOP_CENTER
See Also:
Constant Field Values

LABELS_TOP_RIGHT

public static final String LABELS_TOP_RIGHT
See Also:
Constant Field Values

LABELS_MIDDLE_LEFT

public static final String LABELS_MIDDLE_LEFT
See Also:
Constant Field Values

LABELS_MIDDLE_CENTER

public static final String LABELS_MIDDLE_CENTER
See Also:
Constant Field Values

LABELS_MIDDLE_RIGHT

public static final String LABELS_MIDDLE_RIGHT
See Also:
Constant Field Values

LABELS_BOTTOM_LEFT

public static final String LABELS_BOTTOM_LEFT
See Also:
Constant Field Values

LABELS_BOTTOM_RIGHT

public static final String LABELS_BOTTOM_RIGHT
See Also:
Constant Field Values

ALIGN_TOP

public static final String ALIGN_TOP
See Also:
Constant Field Values

ALIGN_MIDDLE

public static final String ALIGN_MIDDLE
See Also:
Constant Field Values

ALIGN_BOTTOM

public static final String ALIGN_BOTTOM
See Also:
Constant Field Values

ALIGN_LEFT

public static final String ALIGN_LEFT
See Also:
Constant Field Values

ALIGN_CENTER

public static final String ALIGN_CENTER
See Also:
Constant Field Values

ALIGN_RIGHT

public static final String ALIGN_RIGHT
See Also:
Constant Field Values
Constructor Detail

DockMenu

public DockMenu(int minorAxisSize,
                String displayLabels,
                int duration)
Creates a new DockMenu instance.

Parameters:
minorAxisSize - The size (height for horizontal menus and width for vertical menus) for the item at rest
displayLabels - If set to null no labels will be displayed.
duration - The duration of the expansion and shrinkage.
Method Detail

addMenuItem

public void addMenuItem(String text,
                        String actionCommand,
                        int imageWidth,
                        int imageHeight,
                        ImageReference icon,
                        ImageReference expanded)
Adding an item to the menu. The item consists of an icon and possibly a label. The label is displayed when the menu item is expanded (i.e. on mouse rollover) but only if the DockMenu has been configured to display labels.

Parameters:
text - The text of the label.
actionCommand - The command to send in the ActionEvent when the item has been clicked
imageWidth - The width of the image when the menu item is fully expanded
imageHeight - The height of the image when the menu item is fully expanded
icon - The image to be displayed
expanded - The image to show at expanded state

getModel

public List getModel()
Returns the model

Returns:
the model

getDockWidth

public int getDockWidth()

getDisplayLabels

public String getDisplayLabels()

getDuration

public Integer getDuration()

setCoefficient

public void setCoefficient(Float coefficient)

getCoefficient

public Float getCoefficient()

getDistance

public Integer getDistance()

setDistance

public void setDistance(Integer distance)

setAlign

public void setAlign(String align)

getAlign

public String getAlign()

processInput

public void processInput(String inputName,
                         Object inputValue)
Overrides:
processInput in class Component

addActionListener

public void addActionListener(ActionListener listener)
Add the specified action listener to this component.

Overrides:
addActionListener in class AbstractContainer
Parameters:
listener - The action listener to add.
See Also:
Component.firePropertyChange(String, Object, Object)

removeActionListener

public void removeActionListener(ActionListener listener)
Remove the specified action listener from the component.

Overrides:
removeActionListener in class AbstractContainer
Parameters:
listener - The listener that is to be removed.
See Also:
Component.firePropertyChange(String, Object, Object)

hasActionListeners

public boolean hasActionListeners()
Determines if the button has any ActionListeners registered..

Overrides:
hasActionListeners in class AbstractContainer
Returns:
true if any action listeners are registered

EchoPoint API - 3.0.0b5
App Webcontainer