public class Pointer extends ScaleElement
filling, outline, RelativeCoordinates, RelativeStroke| Constructor and Description |
|---|
Pointer()
Initializes a new instance of the
Pointer class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPointerListener(PointerListener listener) |
void |
arrange(double x,
double y,
double w,
double h,
RenderContext context)
Sets the location and size of this component relative to its parent.
|
Alignment |
getAlignment()
Gets the alignment of the pointer relative to the scale.
|
java.lang.String |
getCustomShape()
|
Brush |
getEffectiveFill(RenderContext context) |
Pen |
getEffectiveStroke(RenderContext context) |
boolean |
getIsDiscrete()
Gets a value indicating whether the pointer value can be changed only discretely.
|
boolean |
getIsInteractive()
Gets a value indicating whether the pointer position
should be affected by user interactions.
|
Length |
getPointerHeight()
Gets the height of the pointer.
|
Length |
getPointerOffset()
Gets the offset of the pointer along the direction it points to.
|
Length |
getPointerWidth()
Gets the width of the pointer.
|
PointerShape |
getShape()
Gets the shape of the pointer.
|
double |
getValue()
Gets the value this pointer points to.
|
void |
measure(double maxWidth,
double maxHeight,
RenderContext context)
Measures the desired size of this component.
|
protected void |
onValueChanged(java.beans.PropertyChangeEvent e)
Raises the
valueChanged event. |
protected void |
onValueChanging(java.beans.PropertyChangeEvent e)
Raises the
valueChanging event. |
void |
removePointerListener(PointerListener listener) |
void |
setAlignment(Alignment value)
Sets the alignment of the pointer relative to the scale.
|
void |
setCustomShape(java.lang.String value)
|
void |
setIsDiscrete(boolean value)
Sets a value indicating whether the pointer value can be changed only discretely.
|
void |
setIsInteractive(boolean value)
Sets a value indicating whether the pointer position
should be affected by user interactions.
|
void |
setPointerHeight(Length value)
Sets the height of the pointer.
|
void |
setPointerOffset(Length value)
Sets the offset of the pointer along the direction it points to.
|
void |
setPointerWidth(Length value)
Sets the width of the pointer.
|
void |
setShape(PointerShape value)
Sets the shape of the pointer.
|
void |
setValue(double value)
Sets the value this pointer points to.
|
addScaleElementListener, hitTest, onClicked, removeScaleElementListenerdraw, hitTestObjaddVisualElementListener, getFill, getMargin, getName, getStroke, onInvalidated, onPostpaint, onPrepaint, onQueryAmbientPropertyValue, removeVisualElementListener, setFill, setMargin, setName, setStroke, toStringadd, associateJComponent, createController, dissociateJComponent, effectiveMeasuredHeight, effectiveMeasuredWidth, getActualHeight, getActualWidth, getDesiredHeight, getDesiredWidth, getGridColumn, getGridRow, getHeight, getHitTestVisibility, getHorizontalAlignment, getParent, getRectInParent, getToolTip, getVerticalAlignment, getVisibility, getWidth, getXInParent, getYInParent, invalidate, invalidate, invalidate, invalidateLayout, invalidateLayout, localToRoot, rootToLocal, setActualHeight, setActualWidth, setDesiredHeight, setDesiredWidth, setGridColumn, setGridRow, setHeight, setHitTestVisibility, setHorizontalAlignment, setParent, setToolTip, setVerticalAlignment, setVisibility, setWidth, setXInParent, setYInParent, visitpublic Pointer()
Pointer class.public void measure(double maxWidth,
double maxHeight,
RenderContext context)
VisualElementmeasure in class VisualElementContainermaxWidth - The maximum width provided by parent component.maxHeight - The maximum height provided by parent component.context - A RenderContext instance.public void arrange(double x,
double y,
double w,
double h,
RenderContext context)
VisualElementarrange in class VisualElementContainerx - A double value specifying horizontal position.y - A double value specifying vertical position.w - A double value specifying the component's width.h - A double value specifying the component's height.context - A RenderContext instance.public Brush getEffectiveFill(RenderContext context)
getEffectiveFill in class VisualElementpublic Pen getEffectiveStroke(RenderContext context)
public void addPointerListener(PointerListener listener)
public void removePointerListener(PointerListener listener)
protected void onValueChanged(java.beans.PropertyChangeEvent e)
valueChanged event.e - An object, containing the event data.protected void onValueChanging(java.beans.PropertyChangeEvent e)
valueChanging event.e - An object, containing the event data.public double getValue()
public void setValue(double value)
public boolean getIsInteractive()
public void setIsInteractive(boolean value)
public Length getPointerWidth()
public void setPointerWidth(Length value)
public Length getPointerHeight()
public void setPointerHeight(Length value)
public Length getPointerOffset()
public void setPointerOffset(Length value)
public Alignment getAlignment()
This property is ignored in oval gauges where the pointer is always pinned to the center of the gauge.
public void setAlignment(Alignment value)
This property is ignored in oval gauges where the pointer is always pinned to the center of the gauge.
public boolean getIsDiscrete()
Value can be only integer.
This property can be useful when implementing analog-style pointers, which can move only discretely.
public void setIsDiscrete(boolean value)
Value can be only integer.
This property can be useful when implementing analog-style pointers, which can move only discretely.
public PointerShape getShape()
public void setShape(PointerShape value)
public java.lang.String getCustomShape()
public void setCustomShape(java.lang.String value)