org.richfaces.Dock org.richfaces.Dock org.richfaces.component.html.HtmlDock org.richfaces.component.UIDock The Dock - as anyone familiar with a Mac will know - is a set of iconic images that expand when rolled over with the cursor, and usually perform some action when clicked. This plugin mimics that behaviour by transforming a contiguous set of HTML images into an expanding Dock, vertical or horizontal, with or without labels. Note that this component will not work if it's children render anything else except "<script>", "<a>" or "<img>". org.richfaces.DockRenderer org.richfaces.renderkit.html.DockRenderer dock org.richfaces.taglib.DockTag org.ajax4jsf.webapp.taglib.HtmlComponentTagBase &ui_component_attributes; &html_style_attributes; active int This designates one of the menu's elements to be fully expanded when the dock is initialised. The option takes a zero-based index of the position of the desired menu element (image) within the dock - so if you want the 4th of 6 images to be expanded, set active : 3. Warning : There are consequences to using this option, which might possibly only become apparent when you try it. I have provided it because it has specifically been requested, but ... if you set a mid-menu image initially active, and the user then enters the dock at either end, it is quite likely that the dock will simply collapse to its 'at rest' state because the resultant animation takes the mouse off the dock! -1 align java.lang.String values = 'top', 'middle', 'bottom', left', center', 'right' Fixes the horizontal/vertical main axis, and direction of expansion. For a horizontal menu: * 'top' : fixes the top edge of the dock, so that images expand down * 'middle' : fixes the middle of the images, so that images expand up and down equally * 'bottom' : fixes the bottom edge of the dock, so that images expand up For a vertical menu: * 'left' : fixes the left edge of the dock, so that images expand right * 'center' : fixes the center of the images, so that images expand left and right equally * 'right' : fixes the right edge of the dock, so that images expand left "bottom" coefficient double Attenuation coefficient. This controls the relationship between the distance from the cursor and the amount of expansion of any affected image within that distance. A coefficient of 1 makes the expansion linear with respect to distance from cursor; a larger coefficient gives a greater degree of expansion the closer to the cursor the affected image is (within distance). # distance : integer, default = 72 Attenuation distance from cursor, ie the distance (in pixels) from the cursor that an image has to be within in order to have any expansion applied. Note that attenuation is always calculated as if the Dock was 'at rest' (no images expanded), even though there may be expanded images at the time. 1.5 duration int The duration (in milliseconds) of the initial 'on-Dock' expansion, and the 'off-Dock' shrinkage. 300 fadeIn int The amount of time (in milliseconds) for the initial fade-in of the Dock after initialisation. By default this is set to 0 (zero), which means that the Dock is displayed in full as soon as it can be ( = show() ). There may be occasions when a 'softer' presentation of the Dock is desirable, and setting fadeIn to, for example, 400 would fade the Dock in over that period. 0 fadeLayer java.lang.String By default the fade-in effect (see fadeIn above) is applied to the original target menu element. By specifying either 'wrap' or 'dock' here, the fade-in element can be switched to the child or grand-child (ie. div.jqDockWrap or div.jqDock, respectively) of the original target menu element. This option only has any effect if fadeIn is set, and is really only useful for cases where, for example, background colours have been styled on the original menu element or div.jqDock, and you don't want them to be faded in. null flow boolean If set, this alters the default dock behaviour such that the Dock is not auto-centered and the wrap element (.jqDockWrap, which is relatively positioned) expands and collapses to precisely contain the Dock (.jqDock); this allows elements positioned around the docked menu to adjust their own relative position according to the current state of the docked menu. Warning : There are consequences to using this option, which might possibly only become apparent when you try it. I have provided it because it has specifically been requested, but with flow enabled, if you aim your mouse at a specific menu option you will probably find that quite often you don't stay on that option without having to move the mouse again! false idle int The period of time (in milliseconds) after the mouse has left the menu (without re-entering, obviously!) before the Dock attempts to go to sleep. 0 inactivity int The period of time (in milliseconds) after which the Dock will shrink if there has been no movement of the mouse while it is over an expanded Dock. 0 labels java.lang.String values = 'true', 'false', 'tl', 'tc', 'tr', 'ml', 'mc', 'mr', 'bl', 'bc', 'br' This enables/disables display of a label on the current image. Allowed string values are 2 characters in length: the first character indicates horizontal position (t=top, m=middle, b=bottom) and the second indicates vertical position (l=left, c=center, r=right). So 'br' means bottom-right! If simply set to true, jqDock will use its default positioning for the label, which is 'tl' (top-left) for any align setting other than 'top' or 'left'. The defaults for 'top' and 'left' alignment are 'br' (bottom-right) and 'tr' (top-right) respectively. To determine the text for the label, jqDock looks firstly for text in the image's 'title' attribute; if not found, it will then look for text in the 'title' attribute of the parent link - if there is one - and use that if found. Please be aware that enabling this option with one of the middle/center label positions (eg. 'ml', 'bc', etc) may have a slight effect on the performance of the Dock, simply due to the additional processing required to position the label correctly. "false" loader java.lang.String values = 'image', 'jquery' This overrides the default image loader used by jqDock. Depending on the browser, jqDock uses an image loader based on either "new Image()", or the jQuery HTML constructor "jQuery('<img/>')...". If your Dock is not being displayed, and you have triple checked all your image paths, try setting this option to 'image' or 'jquery' to override the default loader. null noBuffer boolean By default, while the dock is asleep the most recent mouse event is buffered, and when the dock is nudged awake that buffered event is used and acted upon - before any other mouse event that might occur subsequent to the 'nudge'. Setting the noBuffer option to true will prevent buffering of the mouse events. false size int This is the maximum value (in pixels) of the minor axis dimension for the 'at rest' images. For example, an image of natural dimensions 90x120 (width x height), placed in a horizontal Dock (say, 'align' = 'bottom') would, by default, be sized down to 36x48. This is because height is the minor axis in a horizontal Dock, and to keep the presentation of the 'at rest' images neat and tidy it is the height that is governed by the size option. Conversely, in a vertical Dock it would be the width that was capped at the size value, with height being set proportionately. 48 step int The timer interval (in milliseconds) between each animation step of the 'on-Dock' expansion, and the 'off-Dock' shrinkage. 50