UpDown Class

UpDown Class

This Package | All Packages

Component
  |
  +--Control
    |
    +--UpDown
public class UpDown
extends Control

Implements an UpDown common control.

Fields
Name Description
BASE_10 Base 10 (decimal) numbering.
BASE_16 Base 16 (hexadecimal) numbering.
LEFT Topic under construction.
MANUAL Topic under construction.
RIGHT Topic under construction.

Constructors
Name Description
UpDown() Creates an UpDown control.

Methods
Name Description
createHandle() Creates a companion component.
getBase() Indicates what base we're operating in.
getBuddy() Retrieves the companion control.
getCreateParams() Retrieves the information needed to create our component.
getHorizontal() Determines if the updown control is vertical (default) or horizontal.
getInterceptArrowKeys() Determines whether or not the control intercepts arrow keys from the companion class.
getMax() Retrieves the current maximum value.
getMin() Retrieves the current minimum value.
getModifyBuddy() Determines if the control modifies the value in the companion control, or if the programmer will do it.
getPositioning() Determines how the UpDown control is positioned relative to the companion control.
getValue() Retrieves the current value (position) of the UpDown control.
getWrap() Determines if the control will wrap the number it is incrementing or decrementing to the other end of the range.
setBase(int value) Sets the base.
setBuddy(Control ctl) Sets the companion control.
setHorizontal(boolean horz) Determines if the UpDown control is vertical [default] or horizontal.
setInterceptArrowKeys(boolean value) Instructions the control to start or stop intercepting arrow keys from the buddy control.
setMax(int value) Sets the current maximum value.
setMin(int value) Sets the current min value.
setModifyBuddy(boolean value) Indicates if the control modifies the value in the companion control, or if the programmer will do this.
setPositioning(int value) Sets how the UpDown control aligns itself with the companion control.
setValue(int value) Sets the current value.
setWrap(boolean value) Indicates if the control wraps the number it is incrementing or decrementing to the other end of the range.

Fields

UpDown.BASE_10

Syntax
public static final int BASE_10;
Description
Base 10 (decimal) numbering.

UpDown.BASE_16

Syntax
public static final int BASE_16;
Description
Base 16 (hexadecimal) numbering.

UpDown.LEFT

Syntax
public static final int LEFT;
Description
Topic under construction.

UpDown.MANUAL

Syntax
public static final int MANUAL;
Description
Topic under construction.

UpDown.RIGHT

Syntax
public static final int RIGHT;
Description
Topic under construction.

Constructors

UpDown.UpDown

Syntax
public UpDown();
Description

Creates an UpDown control.

Methods

UpDown.createHandle

Syntax
protected void createHandle();
Description

Creates a companion component. The UpDown control sends it WM_SETTEXT messages when the user selects things with the UpDown control. Override this routine to be notified when the control has finished creating things.

Overrides

createHandle() in Control.

UpDown.getBase

Syntax
public int getBase();
Return Value

Returns the base, which can be one of the BASE_ values.

Description

Indicates what base we're operating in.

UpDown.getBuddy

Syntax
public Control getBuddy();
Return Value

Returns the control object.

Description

Retrieves the companion control.

UpDown.getCreateParams

Syntax
protected CreateParams getCreateParams();
Return Value

Returns the CreateParams object.

Description

Retrieves the information needed to create our component.

Overrides

getCreateParams() in Control.

UpDown.getHorizontal

Syntax
public boolean getHorizontal();
Return Value

Returns true if vertical; otherwise, returns false.

Description

Determines if the updown control is vertical (default) or horizontal.

UpDown.getInterceptArrowKeys

Syntax
public boolean getInterceptArrowKeys();
Return Value

Returns true if intercepting arrow keys; otherwise, returns false.

Description

Determines whether or not the control intercepts arrow keys from the companion class.

UpDown.getMax

Syntax
public int getMax();
Return Value

Returns the current maximum value.

Description

Retrieves the current maximum value.

UpDown.getMin

Syntax
public int getMin();
Return Value

Returns the current minimum value.

Description

Retrieves the current minimum value.

UpDown.getModifyBuddy

Syntax
public boolean getModifyBuddy();
Return Value

Returns true if the control modifies values; otherwise, returns false.

Description

Determines if the control modifies the value in the companion control, or if the programmer will do it.

UpDown.getPositioning

Syntax
public int getPositioning();
Return Value

Returns MANUAL if positioning is done by the programmer, RIGHT if this control is positioned on the right of the companion control, or LEFT2 if positioned the left of the companion control.

Description

Determines how the UpDown control is positioned relative to the companion control.

See Also
MANUAL, RIGHT, LEFT

UpDown.getValue

Syntax
public int getValue();
Return Value

Returns the control's value.

Description

Retrieves the current value (position) of the UpDown control.

UpDown.getWrap

Syntax
public boolean getWrap();
Return Value

Returns true if wrapping is enabled; otherwise, returns false.

Description

Determines if the control will wrap the number it is incrementing or decrementing to the other end of the range.

UpDown.setBase

Syntax
public void setBase( int value );
Parameters
value
One of the BASE_ values.
Description

Sets the base.

UpDown.setBuddy

Syntax
public void setBuddy( Control ctl );
Parameters
ctl
The companion component (which must inherit from Control).
Description

Sets the companion control.

UpDown.setHorizontal

Syntax
public void setHorizontal( boolean horz );
Parameters
horz
Set to true if horizontal.
Description

Determines if the UpDown control is vertical [default] or horizontal.

UpDown.setInterceptArrowKeys

Syntax
public void setInterceptArrowKeys( boolean value );
Parameters
value
Topic under construction.
Description

Instructions the control to start or stop intercepting arrow keys from the buddy control.

UpDown.setMax

Syntax
public void setMax( int value );
Parameters
value
Topic under construction.
Description

Sets the current maximum value. This cannot be bigger than UD_MAXVAL or less than UD_MINVAL.

UpDown.setMin

Syntax
public void setMin( int value );
Parameters
value
Topic under construction.
Description

Sets the current min value.

UpDown.setModifyBuddy

Syntax
public void setModifyBuddy( boolean value );
Parameters
value
Topic under construction.
Description

Indicates if the control modifies the value in the companion control, or if the programmer will do this.

UpDown.setPositioning

Syntax
public void setPositioning( int value );
Parameters
value
Topic under construction.
Description

Sets how the UpDown control aligns itself with the companion control. Set the propget above for valid values.

UpDown.setValue

Syntax
public void setValue( int value );
Parameters
value
Topic under construction.
Description

Sets the current value.

UpDown.setWrap

Syntax
public void setWrap( boolean value );
Parameters
value
Topic under construction.
Description

Indicates if the control wraps the number it is incrementing or decrementing to the other end of the range.