|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjv.object.PsObject
jvx.project.PjWorkshop
This superclass of workshops provides several frequently used methods such as setGeometry(), ok(), close(), reset() and cancel(). It also simplifies the integration of workshop info panels and dialogs.
| Field Summary |
| Fields inherited from class jv.object.PsObject |
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 | |
PjWorkshop(java.lang.String aName)
Constructor with unique name. |
|
| Method Summary | |
void |
cancel()
Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop. |
void |
close()
Close workshop and remove itself as listener from various classes. |
PvDisplayIf |
getDisplay()
Get the active display when this workshop was launched. |
java.util.Vector |
getDisplays()
Get the list of displays. |
PgGeometry |
getGeometry()
Get the assigned geometry on which this workshop operates. |
PgGeometry |
getSavedGeometry()
Get clone of originally assigned geometry. |
PvViewerIf |
getViewer()
Get the viewer manager when this workshop was launched. |
void |
init()
Initialize and reset project, stops the running animation if any. |
boolean |
isModal()
Check if workshop runs modal. |
void |
ok()
Accept current version of the geometry as new version. |
void |
removeGeometry()
Remove the assigned geometry and its backup clone. |
void |
reset()
Reset this workshop to its initial state from which computations can start. |
void |
setDisplay(PvDisplayIf display)
Set the active display when this workshop was launched. |
void |
setDisplays(java.util.Vector dispList)
Assign the list of displays. |
void |
setGeometry(PgGeometry geom)
Assign a geometry on which this workshop operates, and create a backup clone of the geometry. |
void |
setModal(boolean modal)
Set flag if workshop runs modal. |
void |
setViewer(PvViewerIf viewer)
Set the viewer manager when this workshop was launched. |
boolean |
update(java.lang.Object event)
Updates the geometry if this workshop has changed, i.e. if the event is this or null.
|
| 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.object.PsUpdateIf |
getFather, getName, setParent |
| Constructor Detail |
public PjWorkshop(java.lang.String aName)
| Method Detail |
public void init()
init in class PsObjectpublic boolean update(java.lang.Object event)
this or null.
Also propagates update() to superclass with the original argument event.
Some subclasses may register themself as update listener of the geometry of this workshop. In order to prevent an update loop, this method savely uses isUpdateSender() when updating the geometry.
update in interface PsUpdateIfupdate in class PsObjectevent - sender of this update.
PsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public PgGeometry getSavedGeometry()
public PgGeometry getGeometry()
getGeometry in interface PjWorkshopIfpublic void setGeometry(PgGeometry geom)
Subclasses frequently overwrite this method but are adviced to call this method.
setGeometry in interface PjWorkshopIfgeom - the workshop modifies this geometry.public void removeGeometry()
public PvViewerIf getViewer()
getViewer in interface PjWorkshopIfpublic void setViewer(PvViewerIf viewer)
setViewer in interface PjWorkshopIfpublic PvDisplayIf getDisplay()
getDisplay in interface PjWorkshopIfpublic void setDisplay(PvDisplayIf display)
setDisplay in interface PjWorkshopIfpublic java.util.Vector getDisplays()
getDisplays in interface PjWorkshopIfpublic void setDisplays(java.util.Vector dispList)
setDisplays in interface PjWorkshopIfpublic boolean isModal()
isModal in interface PjWorkshopIfsetModal(boolean)public void setModal(boolean modal)
setModal in interface PjWorkshopIfisModal()public void reset()
A subclass may also want to reset a geometry to some initial state useful for this workshop, although, not always is the initial state of the geometry equivalent to the original state of the geometry, for example, if material properties of the geometry must be set specifically for this workshop. Therefore, this superclass does not restore the original duplicate of the geometry.
The reset method often is different from the init() method of a workshop since often the workshop needs information about the registered geometry to get into a working initial state.
public void ok()
Implementation in this class calls close().
public void close()
Subclasses may remove workshop from geometry as update listener, or remove any temporary geometries from display, if necessary.
Implementation in this class simply calls removeGeometry().
public void cancel()
If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||