public class PjTranslation extends PjProject implements java.awt.event.ActionListener
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 and Description |
---|
PjTranslation() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handles action events.
|
void |
dragInitial(PvPickEvent event)
Drag an arbitrary point along a geometry, point may lie inside an element.
|
java.lang.String |
getFileName()
Get current file name.
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
boolean |
load()
Loads geometry via PjImportModel and then calls load().
|
void |
pickInitial(PvPickEvent event)
Pick an arbitrary point on a geometry, point may lie inside an element.
|
void |
reset() |
void |
setFileName(java.lang.String fullFileName)
Sets filename from outside of this project.
|
void |
setGeometry(PgElementSet geom)
Sets the geometry loaded from PjImportModel and then
triangulates, updates the number of elements,
gets a vector field and fits that all in the display.
|
void |
start()
Start project with loading geometry from file.
|
static int |
translate(PgPolygonOnElementSet poly,
double end,
PdBaryDir vector,
PdBary outbase,
PdBaryDir outvec)
Parallel translate a given vector along a polygon on elementSet.
|
boolean |
update(java.lang.Object event)
Update all inspector panels, send update to all registered update listeners
and finally update parent.
|
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setGeometry, setParameter, setTime, setViewer, 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()
PjProject
public void reset()
public void start()
start
in class PjProject
PvViewerIf.start()
,
PjProject.isEnabledAutoFit()
public java.lang.String getFileName()
public void setFileName(java.lang.String fullFileName)
fullFileName
- fully specified file name including code base, or URL.load()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public boolean load()
setGeometry(PgElementSet)
public void setGeometry(PgElementSet geom)
public boolean update(java.lang.Object event)
PsObject
Central update method of this object. Must be overwritten if this class receives unknown events, say, from new children. Any subclass must class invoke super.update(event) on all events it does handle itself.
update
in interface PsUpdateIf
update
in class PsObject
event
- carries a lot of informationPsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void dragInitial(PvPickEvent event)
PjProject
pickInitial(PvPickEvent)
and should be overwritten.dragInitial
in interface PvPickListenerIf
dragInitial
in class PjProject
event
- Pick event issued by the displayPvPickListenerIf
public void pickInitial(PvPickEvent event)
PjProject
pickInitial
in interface PvPickListenerIf
pickInitial
in class PjProject
event
- Pick event issued by the displayPvPickListenerIf
public static int translate(PgPolygonOnElementSet poly, double end, PdBaryDir vector, PdBary outbase, PdBaryDir outvec)
poly
- polygon on elementSetend
- distance to which the vector is translatedvector
- initial vector as barycentric directionoutbase
- base point of translated vector in barycentric coordinatesoutvec
- translated vector as barycentric direction"