Class PjSlider
- java.lang.Object
-
- jv.object.PsObject
-
- jv.project.PjProject
-
- vgp.tutor.slider.PjSlider
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf
public class PjSlider extends PjProject
Demo class for the usage of the slidersjv.number.PuIntegerandjv.number.PuDoublein 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. Simultaneously 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.
- See Also:
PuDouble,PuInteger, Serialized Form- Author:
- Ulrich Reitebuch, Konrad Polthier
- Version:
- 16.09.01, 1.50 revised (kp) Panel stuff moved to PjSlider_IP.
16.09.01, 1.10 revised (kp) Name changed from slider_Applet.java.
14.04.00, 1.00 created (ur)
-
-
Field Summary
-
Fields inherited from class jv.object.PsObject
HAS_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 Summary
Constructors Constructor and Description PjSlider()Constructor: Creates instances of slider classes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcomputeProduct()Compute product of values of the two sliders.doublegetProduct()Get the current value of the product.voidinit()Initialization and configuration of sliders.booleanupdate(java.lang.Object event)This method allows to react whenever a slider is touched.-
Methods inherited from class jv.project.PjProject
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getParameterInfo, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickInitial, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setGeometry, setParameterInfo, setTime, setViewer, start, stop, unmarkVertices
-
Methods inherited from class jv.object.PsObject
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
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jv.anim.PsTimeListenerIf
getName
-
Methods inherited from interface jv.project.PvPickListenerIf
getName
-
-
-
-
Method Detail
-
init
public void init()
Initialization and configuration of sliders. At first, some default values of the two sliders are set. These default values are used for initialization of the slider and whenever the slider is reset.
-
update
public boolean update(java.lang.Object event)
This method allows to react whenever a slider is touched. Since this project is the parent of both sliders, this method is called whenever an update of a slider is invoked.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPsObject- Parameters:
event- carries a lot of information- Returns:
- true if event has been handled, otherwise false
- See Also:
PsObject.setParent(PsUpdateIf),PsObject.getFather(),PsObject.addUpdateListener(PsUpdateIf)
-
getProduct
public double getProduct()
Get the current value of the product.
-
computeProduct
public void computeProduct()
Compute product of values of the two sliders.
-
-
"