com.steema.teechart
Class Page

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.Page
All Implemented Interfaces:
java.io.Serializable

public class Page
extends TeeBase

Title: Page class.

Description: Chart paging characteristics

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
protected  javax.swing.event.ChangeEvent changeEvent
           
protected  javax.swing.event.EventListenerList listenerList
          A list of event listeners for this component.
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
Page(Chart c)
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a ChangeListener to the button.
protected  void fireStateChanged()
          Notifies all listeners that have registered interest for notification on this event type.
 boolean getAutoScale()
          Returns whether the Y Axis for each page is scaled or not.
 javax.swing.event.ChangeListener[] getChangeListeners()
          Returns an array of all the ChangeListeners added to this PageNavigator with addChangeListener().
 int getCount()
          Gets the number of pages, according to MaxPointsPerPage property.
TChart.Page.MaxPointsPerPage must be greater than zero to activate auto paging.
 int getCurrent()
          The current page number.

Run-time only.
 int getFirstValueIndex()
          Returns the first ValueIndex of the current page.
 int getMaxPointsPerPage()
          The number of points displayed per page.
Default value: 0
 boolean getScaleLastPage()
          Determines how the last Chart page will be displayed.
It only has effect when TChart.MaxPointsPerPage is greater than zero.
 void next()
          Moves to next page ( Current + 1 )
When MaxPointsPerPage is greater than Zero, TeeChart automatically divides point values in Pages.
 void previous()
          Moves to previous page ( Current - 1 )
When MaxPointsPerPage is greater than Zero, TeeChart automatically divides point values in Pages.
protected  java.lang.Object readResolve()
           
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a ChangeListener from the button.
 void setAutoScale(boolean value)
          Set to true to scale the Y Axis for each page.
 void setCurrent(int value)
          Sets the current page number.
 void setMaxPointsPerPage(int value)
          Sets the number of points displayed per page.
MaxPointsPerPage controls "TeeChart AutoPaging".
 void setScaleLastPage(boolean value)
          Determines how the last Chart page will be displayed.
Default value: true
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeEvent

protected transient javax.swing.event.ChangeEvent changeEvent

listenerList

protected transient javax.swing.event.EventListenerList listenerList
A list of event listeners for this component.

Constructor Detail

Page

public Page(Chart c)
Method Detail

readResolve

protected java.lang.Object readResolve()

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the button.

Parameters:
l - the listener to be added

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from the button.

Parameters:
l - the listener to be removed

getChangeListeners

public javax.swing.event.ChangeListener[] getChangeListeners()
Returns an array of all the ChangeListeners added to this PageNavigator with addChangeListener().

Returns:
all of the ChangeListeners added or an empty array if no listeners have been added
Since:
1.4

fireStateChanged

protected void fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.

See Also:
EventListenerList

getCount

public int getCount()
Gets the number of pages, according to MaxPointsPerPage property.
TChart.Page.MaxPointsPerPage must be greater than zero to activate auto paging. TChart.Page.Current determines the current visible page.

Returns:
number of Chart pages

getCurrent

public int getCurrent()
The current page number.

Run-time only. TChart.Page.Current determines the current visible points of Series in a Chart with MaxPointsPerPage greater than zero. When TChart.Page.MaxPointsPerPage is greater than zero, TeeChart internally divides all Series points in "pages". Each page is assigned a different initial and ending X coordinates. TChart.Page.NumPages returns the total number of pages. It equals the total number of Series points divided by MaxPointsPerPage. TChart.Page.Previous and TChart.Page.Next decrement or increment Current respectively.

Returns:
current page number

setCurrent

public void setCurrent(int value)
Sets the current page number.

Parameters:
value - int

getMaxPointsPerPage

public int getMaxPointsPerPage()
The number of points displayed per page.
Default value: 0

Returns:
maximum number of points

setMaxPointsPerPage

public void setMaxPointsPerPage(int value)
Sets the number of points displayed per page.
MaxPointsPerPage controls "TeeChart AutoPaging". Setting it to a number greater than zero makes TeeChart internally divide Series points in Pages. You can then navigate across Chart pages by using Chart.Page and Chart.NumPages. For each Page, TeeChart will automatically calculate and display the corresponding Series points. The last page can have fewer points than other pages. You can use the Chart.ScaleLastPage to control if last page will be "stretched" or not.
Default value: 0

Example:


 myChart.getPage().setMaxPointsPerPage(6);
 

Parameters:
value - int
See Also:
getMaxPointsPerPage()

getScaleLastPage

public boolean getScaleLastPage()
Determines how the last Chart page will be displayed.
It only has effect when TChart.MaxPointsPerPage is greater than zero. When true, the last Chart page will have the same horizontal scaling as the other pages. When false, the last Chart page scaling will be adjusted based on the number of visible points on that last page.
Default value: true

Returns:
boolean

setScaleLastPage

public void setScaleLastPage(boolean value)
Determines how the last Chart page will be displayed.
Default value: true

Parameters:
value - boolean
See Also:
getScaleLastPage()

next

public void next()
Moves to next page ( Current + 1 )
When MaxPointsPerPage is greater than Zero, TeeChart automatically divides point values in Pages. Calling Next is the same as Page = Page + 1. The NumPages chart property returns the total number of pages.


previous

public void previous()
Moves to previous page ( Current - 1 )
When MaxPointsPerPage is greater than Zero, TeeChart automatically divides point values in Pages. Calling Previous is the same as Page = Page - 1 (Go back a page). The Count property returns the total number of pages.


setAutoScale

public void setAutoScale(boolean value)
Set to true to scale the Y Axis for each page.

Parameters:
value -

getAutoScale

public boolean getAutoScale()
Returns whether the Y Axis for each page is scaled or not.

Returns:

getFirstValueIndex

public int getFirstValueIndex()
Returns the first ValueIndex of the current page.

Returns: