All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.navigationbar.html
Class NavigationBarScrollingElement

    com.sas.servlet.tbeans.navigationbar.html.NavigationBarScrollingElement

All Implemented Interfaces:
  ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.actionprovider.refresh.PartialRefreshActionsInterface, URLTemplateViewInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, HttpConstants, NavigationBarScrollingElementStyleKeysInterface, RenderableInterface, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, javax.swing.SwingConstants

Direct Known Subclasses:
  NavigationBarColumnScrollingElement, NavigationBarRowScrollingElement

    public abstract class NavigationBarScrollingElement

implements HttpConstants, ComplexStyleInterface, NavigationBarScrollingElementStyleKeysInterface

The abstract TransformationBean™ object needed to implement a navigation scrolling element. Subclasses of this class can be added to a NavigationBar which is a container of all BaseNavigationBarElement types. This class renders scrolling actions and requires a model that implements `BaseNavigationInterface`.

The getMessage() method is responsible for setting up the value dictionary on the SimpleTemplate. Subclasses of the class should specify what variables are to be used in the dictionary. The subclass should set the value dictionary and then return the format string from the SimpleTemplate.

By default the gotoField is displayed in the message. When the gotoField is displayed within the message, then the gotoLabel is ignored. If isGotoFieldInMessage is false then the gotoField will be displayed between the arrow images.

The actions must be visible and supported to be displayed by the scrolling element. The isVisible methods are on this class. The isSupported methods are on the model.

The NavigationBarScrollingElement is one of several TransformationBeans™ that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans™ as well as the TransformationBeans™ Style Sheet Reference.

The NavigationBarScrollingElement is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The NavigationBarScrollingElement uses the following JavaScript files:

  sas_navigationbar.js

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
  Serialized Form

Field Summary

Fields inherited from interface com.sas.servlet.tbeans.HttpConstants
`ALL, BASELINE, CHAR, COL, COLGROUP, JUSTIFY, MULTIPLE, NONE, ROW, ROWGROUP, SINGLE`

Fields inherited from interface com.sas.servlet.tbeans.navigationbar.html.NavigationBarScrollingElementStyleKeysInterface
`NAVIGATIONBAR_INPUT_STYLE, NAVIGATIONBAR_MESSAGE_STYLE`

Constructor Summary
`NavigationBarScrollingElement()` Creates an instance of the NavigationBarScrollingElement with a null model and a default name.
`NavigationBarScrollingElement(BaseNavigationInterface model)` Creates an instance of the NavigationBarScrollingElement with the given model.

Method Summary
`abstract com.sas.util.SimpleTemplate` | `getDefaultMessageTemplate()` Returns the default messageTemplate used to generate the scrolling element's message.
`java.lang.String` | `getGotoFieldLabel()` Returns the label used with the goto field when displaying the goto field.
`abstract java.lang.String` | `getMessage()` Returns the scrolling message generated by using the SimpleTemplate returned from the getMessageTemplate() method.
`int` | `getMessageOrientation()` Returns the current setting for where to display the scrolling element's message in accordance to the scrolling actions.
`com.sas.util.SimpleTemplate` | `getMessageTemplate()` Returns the messageTemplate used to generate the scrolling element's message.
`java.util.Map` | `getStyleMap()` Returns a Map containing all the style information for this component.
`com.sas.util.SimpleTemplate` | `getURLTemplate()` Returns the Viewer's URLTemplate.
`boolean` | `isGotoFieldInMessage()` Determines if the gotoField should be displayed within the message or in the default location between the scrolling images.
`abstract void` | `setFirstVisible(boolean visible)` Sets if the first action is visible.
`void` | `setGotoFieldInMessage(boolean inMessage)` Sets if the gotoField should be displayed within the message or in the default location between the scrolling images.
`void` | `setGotoFieldLabel(java.lang.String label)` Sets the label used with the goto field when displaying the goto field.
`abstract void` | `setGotoFieldVisible(boolean visible)` Set if the goto action should be displayed.
`void` | `setImageVisible(boolean firstVisible, boolean pageBackwardVisible, boolean previousVisible, boolean nextVisible, boolean pageForwardVisible, boolean lastVisible)` Convenience method to set visibility of all actions at one time.
`abstract void` | `setLastVisible(boolean visible)` Sets if the last action is visible.
`void` | `setMessageOrientation(int orientation)` Sets the position for where to display the scrolling element's message in accordance to the scrolling actions.
`void` | `setMessageTemplate(com.sas.util.SimpleTemplate template)` Sets the messageTemplate that the getMessage() method uses to generate this element's message.
`abstract void` | `setNextVisible(boolean visible)` Sets if the next action is visible.
`abstract void` | `setPageBackwardVisible(boolean visible)` Sets if the pageBackward action is visible.
`abstract void` | `setPageForwardVisible(boolean visible)` Sets if the pageForward action is visible.
`abstract void` | `setPreviousVisible(boolean visible)` Sets if the previous action is visible.
`void` | `writeBackwardScrollers(java.io.OutputStream out)` Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.
`abstract void` | `writeBackwardScrollers(java.io.PrintWriter out)` Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.
`void` | `writeBackwardScrollers(java.io.Writer out)` Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.
`protected void` | `writeContent(java.io.PrintWriter out)` Formats and writes the contents of the navigationbar element.
`void` | `writeForwardScrollers(java.io.OutputStream out)` Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.
`abstract void` | `writeForwardScrollers(java.io.PrintWriter out)` Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.
`void` | `writeForwardScrollers(java.io.Writer out)` Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.
`void` | `writeGotoField(java.io.OutputStream out)` Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider.
`abstract void` | `writeGotoField(java.io.PrintWriter out)` Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider.
`void` | `writeGotoField(java.io.Writer out)` Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider.
`void` | `writeMessage(java.io.OutputStream out)` Formats and writes the contents of the navigationbar element's message.
`abstract void` | `writeMessage(java.io.PrintWriter out)` Formats and writes the contents of the navigationbar element's message.
`void` | `writeMessage(java.io.Writer out)` Formats and writes the contents of the navigationbar element's message.

Methods inherited from class com.sas.servlet.tbeans.navigationbar.BaseNavigationBarElement
`getModel, setModel`

Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation
`dispose, getActionProvider, getActionSupportType, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionProvider, setActionSupportType, setActionVisible, setUniqueId`

Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
`addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write`

Methods inherited from interface com.sas.servlet.tbeans.TransformationInterface
`getCustomAttributes, getDescription, getId, getLocale, getName, getRequest, getResponse, getTagEpilog, getTagProlog, isVisible, setCustomAttributes, setDescription, setId, setLocale, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write`

Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface
`getRequest, setRequest`

Constructor Detail

### NavigationBarScrollingElement

    public NavigationBarScrollingElement()

  Creates an instance of the NavigationBarScrollingElement with a null model and a default name.

### NavigationBarScrollingElement

    public NavigationBarScrollingElement(BaseNavigationInterface model)

  Creates an instance of the NavigationBarScrollingElement with the given model.

  Parameters:
    `model` - the model for the scrolling element

Method Detail

### getMessageOrientation

    public int getMessageOrientation()

  Returns the current setting for where to display the scrolling element's message in accordance to the scrolling actions. Valid values are TOP, BOTTOM, LEFT, RIGHT and CENTER. If not set, the default is CENTER which will display the message between the forward and backward scrolling actions.

  Returns:
    the orientation of the message

### setMessageOrientation

    public void setMessageOrientation(int orientation)

  Sets the position for where to display the scrolling element's message in accordance to the scrolling actions. Valid values TOP, BOTTOM, LEFT, RIGHT and CENTER. If not set, the default is CENTER which will display the message between the forward and backward scrolling actions.

  Parameters:
    `orientation` - the orientation of the message
  Throws:
    `java.lang.IllegalArgumentException` - if orientation is invalid

### getMessageTemplate

    public com.sas.util.SimpleTemplate getMessageTemplate()

  Returns the messageTemplate used to generate the scrolling element's message. Returns the defaultMessageTemplate if the messageTemplate has not been set.

  Returns:
    the messageTemplate used to generate the scrolling element's message
  See Also:
    `SimpleTemplate`, `getDefaultMessageTemplate()`, `getMessage()`

### getDefaultMessageTemplate

    public abstract com.sas.util.SimpleTemplate getDefaultMessageTemplate()

  Returns the default messageTemplate used to generate the scrolling element's message.

  Returns:
    the default messageTemplate used to generate the scrolling element's message
  See Also:
    `SimpleTemplate`, `getMessageTemplate()`, `getMessage()`

### setMessageTemplate

    public void setMessageTemplate(com.sas.util.SimpleTemplate template)

  Sets the messageTemplate that the getMessage() method uses to generate this element's message.

  For example, if using the NavigationBarRowScrollingElement, to have the getMessage() method generate a message of the form:

              Rows 1 - 10 of 100

  You would set a template like the following:

              Rows %STARTROW - %ENDROW of %ROWCOUNT

  The getMessage() method is responsible for setting up the dictionary on the SimpleTemplate. Subclasses of the class should specify what variables are to be used in the dictionary.

  If isGotoFieldInMessage is true, then the gotoField will be used as the substitute value for %STARTROW.

  Parameters:
    `template` - the template used to generatate the scrolling element's message.
  See Also:
    `SimpleTemplate`, `getMessage()`, `isGotoFieldInMessage()`

### getMessage

    public abstract java.lang.String getMessage()

  Returns the scrolling message generated by using the SimpleTemplate returned from the getMessageTemplate() method.

  The getMessage() method is responsible for setting up the value dictionary on the SimpleTemplate. Subclasses of the class should specify what variables are to be used in the dictionary. The subclass should set the value dictionary and then return the format string from the SimpleTemplate.

  If isGotoFieldInMessage is true, then the gotoField will be used as the substitute value for %STARTROW.

  Returns:
    the message string for scrolling
  Throws:
    `java.lang.NullPointerException` - if the model is not set
  See Also:
    `getMessageTemplate()`, `setMessageTemplate(com.sas.util.SimpleTemplate)`, `isGotoFieldInMessage()`, `SimpleTemplate`

### setGotoFieldVisible

    public abstract void setGotoFieldVisible(boolean visible)

  Set if the goto action should be displayed.

  Parameters:
    `visible` - true if goto action should be displayed

### getGotoFieldLabel

    public java.lang.String getGotoFieldLabel()

  Returns the label used with the goto field when displaying the goto field. By default the value is null. If isGotoFieldInMessage is true then the gotoFieldLabel is ignored.

  Returns:
    the label for the goto field

### setGotoFieldLabel

    public void setGotoFieldLabel(java.lang.String label)

  Sets the label used with the goto field when displaying the goto field. When the gotoFieldLabel is set to null then the goto field is displayed with no label.

  Parameters:
    `label` - the label for the goto field

### isGotoFieldInMessage

    public boolean isGotoFieldInMessage()

  Determines if the gotoField should be displayed within the message or in the default location between the scrolling images. If isGotoFieldInMessage returns true then the gotoField message will be displayed within the message. Default value is true.

  Returns:
    true if the gotoField should be diplayed within the message
  See Also:
    `setGotoFieldInMessage(boolean)`, `getMessage()`

### setGotoFieldInMessage

    public void setGotoFieldInMessage(boolean inMessage)

  Sets if the gotoField should be displayed within the message or in the default location between the scrolling images. If set to true then the gotoField message will be displayed within the message.

  Parameters:
    `inMessage` - true if the gotoField should be diplayed within the message
  See Also:
    `isGotoFieldInMessage()`, `getMessage()`

### setFirstVisible

    public abstract void setFirstVisible(boolean visible)

  Sets if the first action is visible.

  Parameters:
    `visible` - true if the first action should be visible

### setPageBackwardVisible

    public abstract void setPageBackwardVisible(boolean visible)

  Sets if the pageBackward action is visible.

  Parameters:
    `visible` - true if the pageBackward action should be visible

### setPreviousVisible

    public abstract void setPreviousVisible(boolean visible)

  Sets if the previous action is visible.

  Parameters:
    `visible` - true if the previous action should be visible

### setNextVisible

    public abstract void setNextVisible(boolean visible)

  Sets if the next action is visible.

  Parameters:
    `visible` - true if the next action should be visible

### setPageForwardVisible

    public abstract void setPageForwardVisible(boolean visible)

  Sets if the pageForward action is visible.

  Parameters:
    `visible` - true if the pageForward action should be visible

### setLastVisible

    public abstract void setLastVisible(boolean visible)

  Sets if the last action is visible.

  Parameters:
    `visible` - true if the last action should be visible

### setImageVisible

    public void setImageVisible(boolean firstVisible,
                                boolean pageBackwardVisible,
                                boolean previousVisible,
                                boolean nextVisible,
                                boolean pageForwardVisible,
                                boolean lastVisible)

  Convenience method to set visibility of all actions at one time.

  Parameters:
    `firstVisible` - true if first action should be visible
    `pageBackwardVisible` - true if pageBackward action should be visible
    `previousVisible` - true if previous action should be visible
    `nextVisible` - true if next action should be visible
    `pageForwardVisible` - true if pageForward action should be visible
    `lastVisible` - true if last action should be visible

### writeContent

    protected void writeContent(java.io.PrintWriter out)
                         throws java.io.IOException

  Formats and writes the contents of the navigationbar element. This method calls the writeBackwardScrollers, writeForwardScrollers, writeGotoField and writeMessage methods. It generates an HTML table that contains the supported and visible actions. It also aligns the element's message in the appropriate position based on getMessageOrientation().

  This method calls the cleanUpResources method at the end to reset the `request` and `response` back to null.

  Specified by:
    `writeContent` in class `com.sas.servlet.tbeans.BaseActionTransformation2`
  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs
  See Also:
    `writeBackwardScrollers(java.io.OutputStream)`, `writeGotoField(java.io.OutputStream)`, `writeMessage(java.io.OutputStream)`, `writeForwardScrollers(java.io.OutputStream)`, `getMessageOrientation()`

### writeMessage

    public void writeMessage(java.io.OutputStream out)
                      throws java.io.IOException

  Formats and writes the contents of the navigationbar element's message. This method should call getMessage() to get the message for this scrolling element.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeMessage

    public void writeMessage(java.io.Writer out)
                      throws java.io.IOException

  Formats and writes the contents of the navigationbar element's message. This method should call getMessage() to get the message for this scrolling element.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeMessage

    public abstract void writeMessage(java.io.PrintWriter out)
                               throws java.io.IOException

  Formats and writes the contents of the navigationbar element's message. This method should call getMessage() to get the message for this scrolling element.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeBackwardScrollers

    public void writeBackwardScrollers(java.io.OutputStream out)
                                throws java.io.IOException

  Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeBackwardScrollers

    public void writeBackwardScrollers(java.io.Writer out)
                                throws java.io.IOException

  Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeBackwardScrollers

    public abstract void writeBackwardScrollers(java.io.PrintWriter out)
                                         throws java.io.IOException

  Generates the HTML visual representation of the scrolling actions that scroll backward and can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeForwardScrollers

    public void writeForwardScrollers(java.io.OutputStream out)
                               throws java.io.IOException

  Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeForwardScrollers

    public void writeForwardScrollers(java.io.Writer out)
                               throws java.io.IOException

  Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeForwardScrollers

    public abstract void writeForwardScrollers(java.io.PrintWriter out)
                                        throws java.io.IOException

  Generates the HTML visual representation of the scrolling actions that scroll forward and can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeGotoField

    public void writeGotoField(java.io.OutputStream out)
                        throws java.io.IOException

  Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeGotoField

    public void writeGotoField(java.io.Writer out)
                        throws java.io.IOException

  Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### writeGotoField

    public abstract void writeGotoField(java.io.PrintWriter out)
                                 throws java.io.IOException

  Generates the HTML visual representation of the gotoField action that can be obtained from the ActionProvider.

  Parameters:
    `out` - the output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### getURLTemplate

    public com.sas.util.SimpleTemplate getURLTemplate()

  Returns the Viewer's URLTemplate. If URLTemplate is null then the default value for the URLTemplate is returned.

  Specified by:
    `getURLTemplate` in interface `URLTemplateViewInterface`
  Overrides:
    `getURLTemplate` in class `com.sas.servlet.tbeans.BaseActionTransformation2`
  Returns:
    the Viewer's URLTemplate
  See Also:
    `BaseActionTransformation2.setURLTemplate(com.sas.util.SimpleTemplate)`

### getStyleMap

    public java.util.Map getStyleMap()

  Returns a Map containing all the style information for this component.

  Specified by:
    `getStyleMap` in interface `ComplexStyleInterface`
  Returns:
    Map containing all component style information

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.