|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
org.havi.ui.HComponent
org.havi.ui.HVisible
org.havi.ui.HStaticRange
public class HStaticRange
The HStaticRange
is a user interface
component used to display a static value which is within a fixed
range, but does not permit the user to navigate (focus) upon it. By
default it uses the HRangeLook
to render
itself.
Parameter | Description | Default value | Set method | Get method |
---|---|---|---|---|
x | x-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
y | y-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
width | width of this component in pixels (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
height | height of this component in pixels (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds |
orientation | The "orientation" of the range object. | ORIENT_LEFT_TO_RIGHT |
setOrientation |
getOrientation |
minimum | The minimum value that can be returned by this range object. | 0 | setRange |
getMinValue |
maximum | The maximum value that can be returned by this range object. | 100 | setRange |
getMaxValue |
value | The current value returned by this range object. | 0 | setValue |
getValue |
Field Summary | |
---|---|
static int |
SCROLLBAR_BEHAVIOR
The HStaticRange shall
behave as a scrollbar, i.e. |
static int |
SLIDER_BEHAVIOR
The HStaticRange shall
behave as a slider, i.e. |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface org.havi.ui.HOrientable |
---|
ORIENT_BOTTOM_TO_TOP, ORIENT_LEFT_TO_RIGHT, ORIENT_RIGHT_TO_LEFT, ORIENT_TOP_TO_BOTTOM |
Fields inherited from interface org.havi.ui.HState |
---|
ACTIONED_FOCUSED_STATE, ACTIONED_STATE, ACTIONED_STATE_BIT, ALL_STATES, DISABLED_ACTIONED_FOCUSED_STATE, DISABLED_ACTIONED_STATE, DISABLED_FOCUSED_STATE, DISABLED_STATE, DISABLED_STATE_BIT, FIRST_STATE, FOCUSED_STATE, FOCUSED_STATE_BIT, LAST_STATE, NORMAL_STATE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
HStaticRange()
Creates an HStaticRange
object. |
|
HStaticRange(int orientation,
int minimum,
int maximum,
int value)
Creates an HStaticRange
object. |
|
HStaticRange(int orientation,
int minimum,
int maximum,
int value,
int x,
int y,
int width,
int height)
Creates an HStaticRange
object. |
Method Summary | |
---|---|
int |
getBehavior()
Returns the behavior for this HStaticRange . |
static HRangeLook |
getDefaultLook()
Returns the currently set default HLook for HStaticRange
components. |
int |
getMaxValue()
Get the maximum value of the range |
int |
getMinValue()
Gets the minimum of the range. |
int |
getOrientation()
Retrieve the orientation of the HStaticRange . |
int |
getThumbMaxOffset()
Returns the thumb offset for its maximum value. |
int |
getThumbMinOffset()
Returns the thumb offset for its minimum value. |
int |
getValue()
Gets the value of the control. |
void |
setBehavior(int behavior)
Sets the behavior for this HStaticRange . |
static void |
setDefaultLook(HRangeLook look)
Sets the default HLook for further
HStaticRange Components. |
void |
setLook(HLook hlook)
Sets the HLook for this component. |
void |
setOrientation(int orient)
Set the orientation of the HStaticRange . |
boolean |
setRange(int minimum,
int maximum)
Sets the range of values for the control. |
void |
setThumbOffsets(int minOffset,
int maxOffset)
Set the offsets for the "thumb" area on this range control. |
void |
setValue(int value)
Sets the value of the control, subject to its current behavior. |
Methods inherited from class org.havi.ui.HComponent |
---|
getMatte, isDoubleBuffered, isEnabled, setMatte |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SLIDER_BEHAVIOR
HStaticRange
shall
behave as a slider, i.e. the allowable values that may be
set / returned for the HStaticRange
shall not be affected by the
"thumb" offsets, and hence its value shall be
able to vary between [minimum, maximum]
.
public static final int SCROLLBAR_BEHAVIOR
HStaticRange
shall
behave as a scrollbar, i.e. the allowable values that may
be set / returned for the HStaticRange
shall be affected by the "thumb"
offsets, and hence its value shall be able to vary between
[minimum + minThumbOffset, maximum - maxThumbOffset]
.
Constructor Detail |
---|
public HStaticRange()
HStaticRange
object. See the class description for details of constructor
parameters and default values.
public HStaticRange(int orientation, int minimum, int maximum, int value, int x, int y, int width, int height)
HStaticRange
object. See the class description for details of constructor
parameters and default values.
public HStaticRange(int orientation, int minimum, int maximum, int value)
HStaticRange
object. See the class description for details of constructor
parameters and default values.
Method Detail |
---|
public void setLook(HLook hlook) throws HInvalidLookException
HLook
for this component.
setLook
in class HVisible
hlook
- The HLook
that is to be
used for this component.
Note that this parameter may be null, in which case the
component will not draw itself until a look is set.
HInvalidLookException
- If the Look is not an HRangeLook
.public static void setDefaultLook(HRangeLook look)
HLook
for further
HStaticRange
Components.
look
- The HLook
that will be
used by default when creating a new HStaticRange
component.
Note that this parameter may be null, in which case newly
created components shall not draw themselves until a non-null
look is set using the setLook
method.public static HRangeLook getDefaultLook()
HLook
for HStaticRange
components.
HLook
that is used by
default when creating a new HStaticRange
component.public int getOrientation()
HStaticRange
. The orientation controls how the associated
HLook
lays out the component.
getOrientation
in interface HOrientable
ORIENT_LEFT_TO_RIGHT
, ORIENT_RIGHT_TO_LEFT
, ORIENT_TOP_TO_BOTTOM
, or ORIENT_BOTTOM_TO_TOP
.public void setOrientation(int orient)
HStaticRange
. The orientation controls the layout of the component.
setOrientation
in interface HOrientable
orient
- one of ORIENT_LEFT_TO_RIGHT
, ORIENT_RIGHT_TO_LEFT
, ORIENT_TOP_TO_BOTTOM
, or ORIENT_BOTTOM_TO_TOP
.public boolean setRange(int minimum, int maximum)
minimum
- The minimum value of the range controlmaximum
- The maximum value of the range control
public int getMinValue()
public int getMaxValue()
public void setValue(int value)
getValue()
.
value
- the value for this HStaticRange
SLIDER_BEHAVIOR
,
SCROLLBAR_BEHAVIOR
public int getValue()
SLIDER_BEHAVIOR
,
SCROLLBAR_BEHAVIOR
public void setThumbOffsets(int minOffset, int maxOffset)
There is no requirement that minOffset == maxOffset. For example, both
offsets may be zero, yielding a thermometer-like range
object. All measurements are in the same units as the minimum /
maximum values on the HStaticRange
object. The size of the "thumb" is the
application author's responsibility. By default the
"thumb" does not affect the range over which the
value of the HStaticRange
may
be modified. It is recommended that the HRangeLook
provides mechanisms to
denote the value of the HStaticRange
, in addition to indicating the extent of the
thumb as defined by the offsets.
If this control's behavior is SCROLLBAR_BEHAVIOR
, then the
following rules apply: If the thumb offsets are illegal,
i.e. minimum + thumbMinOffset
is equal or greater
than maximum - thumbMaxOffset
, then an
IllegalArgumentException
shall be thrown. If the
control's value is not valid for the specified offsets, then the
value shall be changed to the closest valid value.
setBehavior(int)
public int getThumbMinOffset()
public int getThumbMaxOffset()
public void setBehavior(int behavior)
HStaticRange
. If the new behavior is
SCROLLBAR_BEHAVIOR
and the control's settings for
range and thumb offsets are illegal, i.e. minimum +
thumbMinOffset
is equal or greater than maximum -
thumbMaxOffset
, then an
IllegalArgumentException
shall be thrown. If the
control's value is not valid for the offsets, then the value
shall be changed to the closest valid value.
behavior
- the behavior for this HStaticRange
(SLIDER_BEHAVIOR
or
SCROLLBAR_BEHAVIOR
).public int getBehavior()
HStaticRange
.
HStaticRange
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |