Drag[en]gine Script Module DragonScript Script API  1.0
RangeModel Interface Reference

Value of scrollbar like widgets. More...

Inheritance diagram for RangeModel:
DefaultRangeModel

Public Member Functions

void addNotifier (RangeModelNotifier notifier)
 Add notifier. More...
 
int getIncrement ()
 Increment for changing the value by small increments. More...
 
int getMaximum ()
 Maximum value. More...
 
int getMinimum ()
 Minimal value. More...
 
int getPageSize ()
 Size of a page. More...
 
int getValue ()
 Current value. More...
 
void removeNotifier (RangeModelNotifier notifier)
 Remove notifier. More...
 
void setAll (int minimum, int maximum, int pageSize, int value, int increment)
 Set properties. More...
 
void setIncrement (int increment)
 Set increment for changing the value by small increments. More...
 
void setMaximum (int maximum)
 Set maximum value. More...
 
void setMinimum (int minimum)
 Set minimum value. More...
 
void setPageSize (int pageSize)
 Set page size. More...
 
void setValue (int value)
 Set current value clamped to the range. More...
 

Detailed Description

Value of scrollbar like widgets.

Provides value range, page size and current value. The range model is responsible for checking all constraints are met at all time. These are the constraints:

  • minimum_value <= maximum_value
  • page_size >= 1
  • value >= minimum_value
  • value <= maximum_value

If a parameter is changed breaking one or more of these constraints the range model implementor has to adjusted the parameters to fix the constraints.

The increment is used by scroll bars to change the value is the users clicks the scroll buttons.

Member Function Documentation

§ addNotifier()

void addNotifier ( RangeModelNotifier  notifier)

Add notifier.

Implemented in DefaultRangeModel.

§ getIncrement()

int getIncrement ( )

Increment for changing the value by small increments.

Implemented in DefaultRangeModel.

§ getMaximum()

int getMaximum ( )

Maximum value.

Implemented in DefaultRangeModel.

§ getMinimum()

int getMinimum ( )

Minimal value.

Implemented in DefaultRangeModel.

§ getPageSize()

int getPageSize ( )

Size of a page.

Implemented in DefaultRangeModel.

§ getValue()

int getValue ( )

Current value.

Implemented in DefaultRangeModel.

§ removeNotifier()

void removeNotifier ( RangeModelNotifier  notifier)

Remove notifier.

Implemented in DefaultRangeModel.

§ setAll()

void setAll ( int  minimum,
int  maximum,
int  pageSize,
int  value,
int  increment 
)

Set properties.

If the constraints would be broken the maximum value is adjusted then the current value until the condititions hold again.

Exceptions
EInvalidParampageSize is less than 1.

Implemented in DefaultRangeModel.

§ setIncrement()

void setIncrement ( int  increment)

Set increment for changing the value by small increments.

Implemented in DefaultRangeModel.

§ setMaximum()

void setMaximum ( int  maximum)

Set maximum value.

If the constraints would be broken the maximum value is adjusted then the current value until the conditions hold again.

Implemented in DefaultRangeModel.

§ setMinimum()

void setMinimum ( int  minimum)

Set minimum value.

If the constraints would be broken the maximum value is adjusted then the current value until the condititions hold again.

Implemented in DefaultRangeModel.

§ setPageSize()

void setPageSize ( int  pageSize)

Set page size.

If the constraints would be broken the current value is adjusted.

Exceptions
EInvalidParampageSize is less than 1.

Implemented in DefaultRangeModel.

§ setValue()

void setValue ( int  value)

Set current value clamped to the range.

Implemented in DefaultRangeModel.


The documentation for this interface was generated from the following file: