public class PjSlider extends PjProject
jv.number.PuInteger
and jv.number.PuDouble
in JavaView.
The sliders are the info panel of an integer respectively a double variable. This sample project is a data class which uses the integer and double objects as a inspectable numbers. That is, in this project the current value of the numbers are obtain via their getValue and setValue method. Simulatenously and independently, a GUI interface to these number may be constructed, which is here done in the info panel of this project.
Note the handling of panels is encapsulated in the corresponding class PjSlider_IP. I.e. this project class contains the values of the sliders, but not the interface handling. Basically, the separation of interface and data class allows that this class is fully functional even in batch operation.
PuDouble
,
PuInteger
,
Serialized FormHAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
Constructor and Description |
---|
PjSlider()
Constructor: Creates instances of slider classes.
|
Modifier and Type | Method and Description |
---|---|
void |
computeProduct()
Compute product of values of the two sliders.
|
double |
getProduct()
Get the current value of the product.
|
void |
init()
Initialization and configuration of sliders.
|
boolean |
update(java.lang.Object event)
This method allows to react whenever a slider is touched.
|
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickInitial, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setGeometry, setParameter, setTime, setViewer, start, stop, unmarkVertices
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getName
public void init()
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PsObject
event
- carries a lot of informationPsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public double getProduct()
public void computeProduct()
"