EchoPoint
1.0

echopoint.ui.util
Class PositioningHelper

java.lang.Object
  extended byechopoint.ui.util.PositioningHelper
All Implemented Interfaces:
java.io.Serializable

public class PositioningHelper
extends java.lang.Object
implements java.io.Serializable

A helper class for positionable, scrollable and clippable component rendering. This class will return HTML STYLE="" strings or will added the parameters to a ComponentStyle object.

See Also:
Serialized Form

Constructor Summary
PositioningHelper()
           
 
Method Summary
static void addScrollableSaveSupport(nextapp.echoservlet.RenderingContext rc, Scrollable scrollable, java.lang.String htmlId, nextapp.echoservlet.html.Element scrollableElement)
          Adds support for saving ScrollBar positioning of scrollables
static void addScrollableSaveSupport(nextapp.echoservlet.RenderingContext rc, Scrollable scrollable, java.lang.String htmlId, nextapp.echoservlet.html.Element scrollableElement, java.lang.String saveScrollJS)
          Adds support for saving ScrollBar positioning of scrollables with a custom JS command
static boolean coordHasValue(int coordValue)
          Returns true of the given co-ordinate has a value that is not invalid.
static java.lang.String getClippableStyle(Clippable clippable)
          Returns a style String with that are relevant the clippable component.
static int getHighestzIndex(nextapp.echoservlet.InstancePeer instancePeer, nextapp.echo.Component component)
          This will search up the Component hierarchy and find all Positionables and then return the highest zIndex found.
static java.lang.String getMouseCursorableStyle(MouseCursorable mouseCursorable)
          Returns a style string that are relevant for the MouseCursorable component.
static java.lang.String getPositionableStyle(Positionable pc)
          Returns a style string that is relevant for the Positonable If no positioning is in effect, then nothing is return.
static java.lang.String getScrollablePolicy(Scrollable scrollable)
          Returns a CSS attribute overflow:value string for the scrollable policy.
static java.lang.String getScrollableStyle(Scrollable scrollable)
          Returns a style string that are relevant for the scrollable component.
static int getzIndex(nextapp.echo.Component c)
          Returns a zIndex for the Component by searching up the tree for a Positionable parent or itself.
static boolean hasBorder(Borderable borderable)
          Returns true of the given Boderable should have aa border
static void setBackgroundImageProperties(nextapp.echo.BackgroundImageProperties bgProperties, java.lang.String backgroundImageURI, nextapp.echoservlet.ComponentStyle style)
          Sets background image properties into the given compoennt style.
static void setBorderableStyle(Borderable borderable, nextapp.echoservlet.ComponentStyle style)
          Adds style border attributes to the provided style that are relevant for the Borderable component.
static void setClippableStyle(Clippable clippable, nextapp.echoservlet.ComponentStyle style)
          Adds style attributes to the provided style that are relevant for the clippable component.
static void setMouseCursorableStyle(MouseCursorable mouseCursorable, nextapp.echoservlet.ComponentStyle style)
          Adds mouse cursor attributes to the provided style that are relevant for the MouseCursorable component.
static void setPositionableStyle(Positionable pc, nextapp.echoservlet.ComponentStyle style)
          Adds style attributes to the provided style that are relevant for the positonable component.
static void setPositionableStyleCorners(Positionable pc, nextapp.echoservlet.ComponentStyle style)
          Adds style attributes for the left, right, top and bottom dimensions to the provided style that are relevant for the positonable component.
static void setScrollableStyle(Scrollable scrollable, nextapp.echoservlet.ComponentStyle style)
          Adds style attributes to the provided style that are relevant for the scrollable component.
static void setScrollableStyleScroll(Scrollable scrollable, nextapp.echoservlet.ComponentStyle style)
          Adds style scrollbar attributes to the provided style that are relevant for the scrollable component.
static void setScrollableStyleWandH(Scrollable scrollable, nextapp.echoservlet.ComponentStyle style)
          Adds style width and height attributes to the provided style that are relevant for the scrollable component.
static void storeScrollablePositions(java.lang.String input, nextapp.echo.Component c)
          Stores the X,Y scrollbar positions of a Scrollable ClientInutProducer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositioningHelper

public PositioningHelper()
Method Detail

addScrollableSaveSupport

public static void addScrollableSaveSupport(nextapp.echoservlet.RenderingContext rc,
                                            Scrollable scrollable,
                                            java.lang.String htmlId,
                                            nextapp.echoservlet.html.Element scrollableElement)
Adds support for saving ScrollBar positioning of scrollables


addScrollableSaveSupport

public static void addScrollableSaveSupport(nextapp.echoservlet.RenderingContext rc,
                                            Scrollable scrollable,
                                            java.lang.String htmlId,
                                            nextapp.echoservlet.html.Element scrollableElement,
                                            java.lang.String saveScrollJS)
Adds support for saving ScrollBar positioning of scrollables with a custom JS command


coordHasValue

public static boolean coordHasValue(int coordValue)
Returns true of the given co-ordinate has a value that is not invalid.


getClippableStyle

public static java.lang.String getClippableStyle(Clippable clippable)
Returns a style String with that are relevant the clippable component.


getPositionableStyle

public static java.lang.String getPositionableStyle(Positionable pc)
Returns a style string that is relevant for the Positonable

If no positioning is in effect, then nothing is return.


getScrollableStyle

public static java.lang.String getScrollableStyle(Scrollable scrollable)
Returns a style string that are relevant for the scrollable component.


getScrollablePolicy

public static java.lang.String getScrollablePolicy(Scrollable scrollable)
Returns a CSS attribute overflow:value string for the scrollable policy.


getMouseCursorableStyle

public static java.lang.String getMouseCursorableStyle(MouseCursorable mouseCursorable)
Returns a style string that are relevant for the MouseCursorable component.


getzIndex

public static int getzIndex(nextapp.echo.Component c)
Returns a zIndex for the Component by searching up the tree for a Positionable parent or itself. If it has no Z-Index in the hierarchy, then 0 is returned.


hasBorder

public static boolean hasBorder(Borderable borderable)
Returns true of the given Boderable should have aa border


setBorderableStyle

public static void setBorderableStyle(Borderable borderable,
                                      nextapp.echoservlet.ComponentStyle style)
Adds style border attributes to the provided style that are relevant for the Borderable component.


setClippableStyle

public static void setClippableStyle(Clippable clippable,
                                     nextapp.echoservlet.ComponentStyle style)
Adds style attributes to the provided style that are relevant for the clippable component.


setPositionableStyle

public static void setPositionableStyle(Positionable pc,
                                        nextapp.echoservlet.ComponentStyle style)
Adds style attributes to the provided style that are relevant for the positonable component.

If no positioning is in effect, then nothing is added.


setPositionableStyleCorners

public static void setPositionableStyleCorners(Positionable pc,
                                               nextapp.echoservlet.ComponentStyle style)
Adds style attributes for the left, right, top and bottom dimensions to the provided style that are relevant for the positonable component.


setScrollableStyle

public static void setScrollableStyle(Scrollable scrollable,
                                      nextapp.echoservlet.ComponentStyle style)
Adds style attributes to the provided style that are relevant for the scrollable component.


setScrollableStyleScroll

public static void setScrollableStyleScroll(Scrollable scrollable,
                                            nextapp.echoservlet.ComponentStyle style)
Adds style scrollbar attributes to the provided style that are relevant for the scrollable component.


setScrollableStyleWandH

public static void setScrollableStyleWandH(Scrollable scrollable,
                                           nextapp.echoservlet.ComponentStyle style)
Adds style width and height attributes to the provided style that are relevant for the scrollable component.


storeScrollablePositions

public static void storeScrollablePositions(java.lang.String input,
                                            nextapp.echo.Component c)
Stores the X,Y scrollbar positions of a Scrollable ClientInutProducer


setBackgroundImageProperties

public static void setBackgroundImageProperties(nextapp.echo.BackgroundImageProperties bgProperties,
                                                java.lang.String backgroundImageURI,
                                                nextapp.echoservlet.ComponentStyle style)
Sets background image properties into the given compoennt style.


getHighestzIndex

public static int getHighestzIndex(nextapp.echoservlet.InstancePeer instancePeer,
                                   nextapp.echo.Component component)
This will search up the Component hierarchy and find all Positionables and then return the highest zIndex found. The components themselves must have peers (and hence may be visible)

Parameters:
instancePeer - - the instance peer to find peers with
component - - the component to start from
Returns:
- the higest z-index found or -1

setMouseCursorableStyle

public static void setMouseCursorableStyle(MouseCursorable mouseCursorable,
                                           nextapp.echoservlet.ComponentStyle style)
Adds mouse cursor attributes to the provided style that are relevant for the MouseCursorable component.


EchoPoint
1.0