com.sas.graphics.components
Interface ScrollModelInterface


public interface ScrollModelInterface

ScrollModelInterface consolidates properties associated with the scrollbars that can appear on interactive charts when the graph matrix is too large to display in the available chart component area.

Usage

This class will not be directly used by a client, but setting other properties (for example DISPLAY_FIT_TO_SCREEN as the displayType on the GraphModel) will affect the ScrollModelInterface.

Behavior

Whether to allow scroll bars or not, as well as the scroll bar(s) exact position in the Graph component is maintained by the ScrollModelInterface.

Since:
SAS 9.1

Field Summary
static java.lang.String HORIZONTAL_SCROLL_BAR_POLICY_PROPERTY
           
static java.lang.String POSITION_PROPERTY
           
static int SCROLLBAR_AS_NEEDED
          The scrollbar display policy.
static int SCROLLBAR_NEVER
          The scrollbar display policy.
static java.lang.String VERTICAL_SCROLL_BAR_POLICY_PROPERTY
           
 
Method Summary
 int getHorizontalScrollBarPolicy()
          Returns the horizontal scroll bar policy value.
 java.awt.Point getScrollPosition()
          Returns the horizontal and vertical (x and y respectivly) scrollbar position values
 int getVerticalScrollBarPolicy()
          Returns the vertical scroll bar policy value.
 void setHorizontalScrollBarPolicy(int newPolicy)
          The policy will determine when the horizontal scroll bar may appear.
 void setScrollPosition(java.awt.Point newPosition)
          Scrolls the horizontal and vertical scrollbar to the specified (x and y respectivly) position.
 void setVerticalScrollBarPolicy(int newPolicy)
          The policy will determine when the vertical scroll bar may appear.
 void translateScrollPosition(java.awt.Point deltaPosition)
          Scrolls the horizontal and vertical scrollbar by the specifies (x and y respectively) amounts.
 

Field Detail

SCROLLBAR_AS_NEEDED

static final int SCROLLBAR_AS_NEEDED
The scrollbar display policy. Designates that the scroll bars will appear as needed.

See Also:
setVerticalScrollBarPolicy(int), setHorizontalScrollBarPolicy(int), Constant Field Values

SCROLLBAR_NEVER

static final int SCROLLBAR_NEVER
The scrollbar display policy. Designates that the scroll bars will never appear.

See Also:
setVerticalScrollBarPolicy(int), setHorizontalScrollBarPolicy(int), Constant Field Values

VERTICAL_SCROLL_BAR_POLICY_PROPERTY

static final java.lang.String VERTICAL_SCROLL_BAR_POLICY_PROPERTY
See Also:
Constant Field Values

HORIZONTAL_SCROLL_BAR_POLICY_PROPERTY

static final java.lang.String HORIZONTAL_SCROLL_BAR_POLICY_PROPERTY
See Also:
Constant Field Values

POSITION_PROPERTY

static final java.lang.String POSITION_PROPERTY
See Also:
Constant Field Values
Method Detail

setVerticalScrollBarPolicy

void setVerticalScrollBarPolicy(int newPolicy)
The policy will determine when the vertical scroll bar may appear. This method mimics the method of the same name in JScrollPane.

Valid values:

Parameters:
newPolicy - when to scroll
See Also:
getVerticalScrollBarPolicy()

getVerticalScrollBarPolicy

int getVerticalScrollBarPolicy()
Returns the vertical scroll bar policy value.

Valid values:

Returns:
the vertical scrollbar policy of when to scroll.
See Also:
setVerticalScrollBarPolicy(int)

setHorizontalScrollBarPolicy

void setHorizontalScrollBarPolicy(int newPolicy)
The policy will determine when the horizontal scroll bar may appear. This method mimics the method of the same name in JScrollPane.

Valid values:

Parameters:
newPolicy - specify how scrolling is to used.
See Also:
getHorizontalScrollBarPolicy()

getHorizontalScrollBarPolicy

int getHorizontalScrollBarPolicy()
Returns the horizontal scroll bar policy value.

Valid values:

Returns:
the horizontal scrollbar policy of when to scroll.
See Also:
setHorizontalScrollBarPolicy(int)

setScrollPosition

void setScrollPosition(java.awt.Point newPosition)
Scrolls the horizontal and vertical scrollbar to the specified (x and y respectivly) position.

Parameters:
newPosition - set scroll position
See Also:
getScrollPosition()

getScrollPosition

java.awt.Point getScrollPosition()
Returns the horizontal and vertical (x and y respectivly) scrollbar position values

Returns:
the vertical and horizontal (x and y respectively) scrollbar position values

See Also:
setScrollPosition(java.awt.Point)

translateScrollPosition

void translateScrollPosition(java.awt.Point deltaPosition)
Scrolls the horizontal and vertical scrollbar by the specifies (x and y respectively) amounts.

Parameters:
deltaPosition - amount to scroll
See Also:
setScrollPosition(java.awt.Point), getScrollPosition()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.