vgp.tutor.slider
Class PjSlider
java.lang.Object
|
+--jv.object.PsObject
|
+--jv.project.PjProject
|
+--vgp.tutor.slider.PjSlider
- All Implemented Interfaces:
- java.lang.Cloneable, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf, java.io.Serializable
- public class PjSlider
- extends PjProject
Demo class for the usage of the sliders 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.
- 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)
- Author:
- Ulrich Reitebuch, Konrad Polthier
- See Also:
PuDouble,
PuInteger, Serialized Form
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS |
|
Constructor Summary |
PjSlider()
Constructor: Creates instances of slider classes. |
|
Method Summary |
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.
|
| Methods inherited from class jv.project.PjProject |
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, setDisplay, setEnabledAutoFit, setParameter, 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, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PjSlider
public PjSlider()
- Constructor: Creates instances of slider classes.
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.
- Overrides:
init in class PjProject
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.
- Overrides:
update in class PsObject
- Following copied from interface:
jv.object.PsUpdateIf
- Parameters:
event - carries a lot of information- Returns:
- true if event has been handled, otherwise false
- See Also:
PsObject,
PsUpdateIf.getFather(),
PsUpdateIf.setParent(PsUpdateIf)
getProduct
public double getProduct()
- Get the current value of the product.
computeProduct
public void computeProduct()
- Compute product of values of the two sliders.
The software JavaView® is copyright protected. All Rights Reserved.