|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.wvs.client.pview.PViewProxy
PViewProxy
is responsible for passing viewer requests to the
viewer running in native code.
Supported API: false
Extendable: false
Field Summary | |
private static boolean |
applet
|
private static PViewCache |
cache
|
private boolean |
cancelLoadingFlag
|
private static boolean |
debug
|
private static Vector |
hwnds
|
private int |
myHwnd
|
private static Vector |
panels
|
private int |
pviewid
|
private boolean |
structureLocked
|
Constructor Summary | |
PViewProxy(PViewPanel panel,
boolean debug)
Creates the proxy class, associated to a parent PViewPanel. |
Method Summary | |
private static void |
addPanelForHwnd(PViewPanel pviewPanel,
int hwnd)
Maintains a lookup between the different instances of the viewer and their window handles |
protected void |
annotationActivate(String name)
Viewer command : annotationActivate |
protected void |
annotationShow(String name,
short enable,
short show)
Viewer command : annotationShow |
void |
cancelLoading()
During the execution of showComponent, Cancel the down loading of files, and end the command |
void |
clearMeasurements()
Viewer command : clear all measurement |
protected void |
componentSelect(long visualID,
long select,
long reset)
Selects the component in the viewer |
protected void |
copyImage()
Viewer command : Copy Image to clipboard |
protected void |
deleteCache()
Deletes the contents of the cache associated to this instance of the viewer |
protected int |
deleteComponent(int visualID)
Deletes the specified component (with children) from the viewers strcuture representation. |
private static void |
deletePanelForHwnd(int hwnd)
Removes an entry from the lookup between the different instances of the viewer and their window handles |
protected void |
deselectComponent(long visualID)
Deselects the component in the viewer |
void |
dimensionMeasurement()
Viewer command : dimension measurement |
void |
displayHLR()
Viewer command : display hidden line removed |
void |
displayShaded()
Viewer command : display shaded |
void |
displayWireframe()
Viewer command : display wire frame |
void |
distanceMeasurement()
Viewer command : distance measurement |
void |
featureSelectMode()
Viewer command : enter select feature mode |
private static PViewPanel |
findPanelForHwnd(int hwnd)
Used by the callbacks from the viewer. |
protected PViewCache |
getCache()
Returns the associated cache |
protected static int |
getHwnd(PViewPanel pvp,
PViewCanvas canvas)
Returns the Window handle that uniquely identifies this viewing panel |
String |
getMetaDataValue(long compid,
String propName)
|
protected int |
getMyHwnd()
Returns the Window handle that uniquely identifies this viewing panel |
protected long |
hideComponent(long visualID)
Hides the referenced component currently displayed in the viewer |
void |
hideSelected()
Viewer command : hide selected |
protected long |
insertComponent(long parent,
String name,
String shapeSource,
String idShapeSource,
String location,
String lengthUnit,
String boundingBox,
String color,
String material)
Inserts a component to be visualized |
void |
insertProperty(int visualID,
String name,
String value)
Associates a Property and value to a coponent |
static boolean |
isApplet()
Returns the applet state |
boolean |
isCancelLoadingFlag()
Returns the current state of Cancel Loading |
boolean |
isDebug()
Returns the debug state |
protected boolean |
isStructureLocked()
Returns whether the structure is locked or not |
protected long |
loadComponent(long visualID)
Loads the component in the viewer, this will if necessary download the appropriate file(s) if referenced by a URL |
void |
move(int x,
int y,
int dx,
int dy)
Process the movement of the viewer |
private void |
nativeAnnotationActivate(int hwnd,
String name)
|
private void |
nativeAnnotationShow(int hwnd,
String name,
short enable,
short show)
|
private void |
nativeCancelLoading(int hwnd)
|
private void |
nativeClearMeasurements(int hwnd)
|
private void |
nativeComponentSelect(int hwnd,
long id,
long select,
long reset)
|
private void |
nativeCopyImage(int hwnd)
|
private int |
nativeCreateView(int hwnd,
String viewType)
|
private int |
nativeDeleteComponent(int hwnd,
int compID)
|
private void |
nativeDeSelectComponent(int hwnd,
long id)
|
private void |
nativeDimensionMeasurement(int hwnd)
|
private void |
nativeDisplayHLR(int hwnd)
|
private int |
nativeDisplayIn(int hwnd,
int compID,
int viewID)
|
private void |
nativeDisplayShaded(int hwnd)
|
private void |
nativeDisplayWireframe(int hwnd)
|
private void |
nativeDistanceMeasurement(int hwnd)
|
private void |
nativeFeatureSelectMode(int hwnd)
|
private void |
nativeFileArrived(int hwnd,
String requestedFile,
String localPath)
|
private String |
nativeGetMetaDataValue(int hwnd,
long compid,
String propName)
|
private long |
nativeHideComponent(int hwnd,
long id)
|
private void |
nativeHideSelected(int hwnd)
|
private int |
nativeInitialize(int hwnd)
|
private long |
nativeInsertComponent(int hwnd,
long parentID,
String name,
String shapeSource,
String idShapeSource,
String location,
String lengthUnit,
String boundingBox,
String color,
String material)
|
private void |
nativeInsertProperty(int hwnd,
long id,
String propName,
String propValue)
|
private long |
nativeLoadComponent(int hwnd,
long id)
|
private void |
nativeMethod(int hwnd,
long id)
|
private void |
nativePluginMove(int hwnd,
int x,
int y,
int dx,
int dy)
|
private void |
nativeProbeMode(int hwnd)
|
private void |
nativeProjectionAbs(int hwnd)
|
private void |
nativeProjectionUsr(int hwnd)
|
private void |
nativeProjectionX(int hwnd)
|
private void |
nativeProjectionY(int hwnd)
|
private void |
nativeProjectionZ(int hwnd)
|
private void |
nativeRefreshAllWindows(int hwnd)
|
private void |
nativeRefreshWindow(int hwnd)
|
private long |
nativeReLoadComponent(int hwnd,
long id)
|
private int |
nativeReParent(int hwnd,
int compID,
int parentID)
|
private void |
nativeRestorePosition(int hwnd)
|
private void |
nativeSelectComponent(int hwnd,
long id)
|
private void |
nativeSelectMode(int hwnd)
|
private void |
nativeSelectSpinCenter(int hwnd)
|
private void |
nativeSetAstLinks(int hwnd,
String etb)
|
private void |
nativeSetComponentLocation(int hwnd,
long compid,
String location)
|
private void |
nativeSetMetaDataValue(int hwnd,
long compid,
String propName,
String propValue)
|
private void |
nativeSetPropValueBool(int hwnd,
long property,
boolean value)
|
private void |
nativeSetPropValueFloat(int hwnd,
long property,
float value)
|
private void |
nativeSetPropValueInt(int hwnd,
long property,
long value)
|
private void |
nativeSetPropValueString(int hwnd,
long property,
String value)
|
private int |
nativeSetURLAnchor(int hwnd,
int compID,
String URL)
|
private void |
nativeSetViewLocation(int hwnd,
String location)
|
private void |
nativeSetWindow(int hwnd)
|
private void |
nativeShow(int hwnd)
|
private void |
nativeShowAll(int hwnd)
|
private long |
nativeShowComponent(int hwnd,
long id)
|
private void |
nativeShowSelected(int hwnd)
|
private void |
nativeSnapToCenterPoint(int hwnd)
|
private void |
nativeSnapToComponent(int hwnd)
|
private void |
nativeSnapToEdgeCurve(int hwnd)
|
private void |
nativeSnapToMiddleEndPoint(int hwnd)
|
private void |
nativeSnapToSurface(int hwnd)
|
private long |
nativeStructureLockUpdates(int hwnd)
|
private long |
nativeStructureReset(int hwnd,
boolean clearCache)
|
private void |
nativeStructureUnlockUpdates(int hwnd)
|
private int |
nativeTerminate(int hwnd)
|
private void |
nativeToggleComponentRotate(int hwnd)
|
private void |
nativeUpdateTreeView(int hwnd)
|
private void |
nativeViewPrint(int hwnd)
|
private void |
nativeZoomAll(int hwnd)
|
private void |
nativeZoomSelected(int hwnd)
|
private void |
nativeZoomWindow(int hwnd)
|
protected static void |
onComponentActivated(int hwnd,
long visualID)
Called when a component is activated in the viewer. |
protected static void |
onComponentDeselected(int hwnd,
long visualID)
Called when a component is de-selected in the viewer. |
protected static void |
onComponentLoad(int hwnd,
long visualID)
Called when a component is loaded Emits PViewEvent.NODE_LOADED, and caches the reference between the url and file |
protected static void |
onComponentMoved(int hwnd,
long visualID,
String location)
Called when a component is moved in the viewer. |
protected static void |
onComponentSelected(int hwnd,
long visualID)
Called when a component is selected in the viewer. |
protected static void |
onComponentUnload(int hwnd,
long visualID)
Called when a component is un-loaded Emits PViewEvent.NODE_UNLOADED |
protected static void |
onComponentVisible(int hwnd,
long visualID,
short vis)
Called when a component is un-loaded Emits PViewEvent.NODE_HIDDEN or PViewEvent.VIEWED |
protected static void |
onGetFile(String url,
String extension,
int hwnd,
long visualID)
Called when the viewer requires to access a file referenced by a URL PViewGetFile is used to perform the transfer |
protected static void |
onLoadComplete(int hwnd)
Called when the loading of the assembly is complete Currently this hide the Cancel button, and emits the PViewEvent.LOAD_COMPLETE |
protected static void |
onLoadEDComplete(int hwnd)
Called when the loading of an ED file is complete Emits PViewEvent.LOAD_ED_COMPLETE |
protected static void |
onProbeCoord(int hwnd,
String coord)
Called when a co-ordinate is to be return from a probe Emits PViewEvent.PROBE |
protected static void |
onSetStatusText(int hwnd,
String msg)
Called when a status message is produced from the viewer Emits PViewEvent.MESSAGE |
protected static void |
onViewMoved(int hwnd,
String viewLocation)
Called when the view orientation changes Emits PViewEvent.VIEW_MOVED |
void |
probeMode()
Viewer command : enter probe mode |
void |
projectionAbs()
Viewer command : absolute projection of measurement |
void |
projectionUsr()
Viewer command : User defined projection of measurement |
void |
projectionX()
Viewer command : X projection of measurement |
void |
projectionY()
Viewer command : Y projection of measurement |
void |
projectionZ()
Viewer command : Z projection of measurement |
protected long |
reLoadComponent(long visualID)
Reloads the component in the viewer, this will if necessary download the appropriate file(s) if referenced by a URL |
int |
reparent(int visualID,
int newParent)
Re-parents a component in the visualization tree |
void |
restorePosition()
Viewer command : restore component position |
protected void |
selectComponent(long visualID)
Selects the component in the viewer |
void |
selectMode()
Viewer command : enter selection mode |
void |
selectSpinCenter()
Viewer command : select spin center |
static void |
setApplet(boolean app)
Switches applet on/off |
protected void |
setAstLinks(String etb)
Viewer command : setAstLinks |
void |
setCancelLoadingFlag(boolean flag)
Used to stop the downloading of files. |
void |
setComponentLocation(long compid,
String location)
|
void |
setDebug(boolean debug)
Switches debug information on/off |
void |
setMetaDataValue(long compid,
String propName,
String propValue)
|
void |
setPropValueBool(long property,
boolean value)
Sets the value of a Property to the desired boolean value Properties should be referenced via the defined constants A property that will accept and understand a boolean value will be named with _BOOL_ in its name eg. |
void |
setPropValueColor(long property,
long value)
Sets the value of a Property to the desired color Properties should be referenced via the defined constants A property that will accept and understand a color value will be named with _CLR_ in its name eg. |
void |
setPropValueFloat(long property,
float value)
Sets the value of a Property to the desired float value Properties should be referenced via the defined constants A property that will accept and understand a float value will be named with _FLOAT_ in its name eg. |
void |
setPropValueInt(long property,
long value)
Sets the value of a Property to the desired integer value Properties should be referenced via the defined constants A property that will accept and understand an integer value will be named with _INT_ in its name eg. |
void |
setPropValueString(long property,
String value)
Sets the value of a Property to the desired integer value Properties should be referenced via the defined constants A property that will accept and understand a string value will be named with _STR_ in its name eg. |
int |
setURLAnchor(int visualID,
String url)
Sets the URL Anchor for a component in the structure |
void |
setViewLocation(String location)
|
void |
setWindow(int w)
|
void |
show()
Show the viewer |
void |
showAll()
Viewer command : show all |
protected long |
showComponent(long visualID)
Shows the component in the viewer, this will if necessary download the appropriate file(s) if referenced by a URL |
void |
showSelected()
Viewer command : show selected |
protected void |
signalFileArrived(String url,
String localPath)
Call back to the viewer to inform it that the file has arrived when a GetFile request was made. |
void |
snapToCenterPoint()
Viewer command : Snap mode, center point |
void |
snapToComponent()
Viewer command : Snap mode, component |
void |
snapToEdgeCurve()
Viewer command : Snap mode, edge/curve |
void |
snapToMiddleEndPoint()
Viewer command : Snap mode, middle/end point |
void |
snapToSurface()
Viewer command : Snap mode, surface |
protected void |
start(PViewPanel pviewPanel,
PViewCanvas component)
Initializes the viewer |
protected long |
structureLockUpdates()
Locks the structure in the viewer so that it can be manipulated |
protected long |
structureReset(boolean clearCache)
Close the active visualization structure, removes the display, and optionally the viewer can delete any cached files. |
protected void |
structureUnlockUpdates()
Un-locks the structure in the viewer |
protected void |
terminate()
Terminates the current viewer, after clearing out its cached files. |
void |
toggleComponentRotate()
Viewer command : toggle component movement about axes from Translation to Rotation |
protected void |
viewPrint()
Viewer command : Print |
void |
zoomAll()
Viewer command : zoom all |
void |
zoomSelected()
Viewer command : zoom to selected |
void |
zoomWindow()
Viewer command : zoom window |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Vector panels
private static Vector hwnds
private static boolean debug
private static PViewCache cache
private boolean structureLocked
private int pviewid
private int myHwnd
private boolean cancelLoadingFlag
private static boolean applet
Constructor Detail |
public PViewProxy(PViewPanel panel, boolean debug) throws Exception, UnsatisfiedLinkError
panel
- The controlling paneldebug
- specifies if debug information is to be producedMethod Detail |
public void setDebug(boolean debug)
debug
- specifies if debug information is to be producedpublic boolean isDebug()
public static void setApplet(boolean app)
public static boolean isApplet()
public void setCancelLoadingFlag(boolean flag)
flag
- specifies if downloading is to be cancelledpublic boolean isCancelLoadingFlag()
protected int getMyHwnd()
protected void start(PViewPanel pviewPanel, PViewCanvas component)
pviewPanel
- the panel that this proxy is instantiated bycomponent
- where the viewer will run. Usually a PViewCanvasprotected void terminate()
protected PViewCache getCache()
protected void deleteCache()
public void show()
public void setWindow(int w)
public void move(int x, int y, int dx, int dy)
x
- X locationy
- Y locationdx
- Delta Xdy
- X Delta Yprotected long insertComponent(long parent, String name, String shapeSource, String idShapeSource, String location, String lengthUnit, String boundingBox, String color, String material)
name
- displayed during file transfer and in debug messageslocation
- the component location relative to the parent. "AX AY AZ X Y Z"lengthUnit
- the units of the location (typically M for Windchill)color
- the colormaterial
- the material
protected long loadComponent(long visualID)
visualID
- the visual identifier of a componentprotected long reLoadComponent(long visualID)
visualID
- the visual identifier of a componentprotected long showComponent(long visualID)
visualID
- the visual identifier of a componentprotected long hideComponent(long visualID)
visualID
- the visual identifier of a componentprotected void componentSelect(long visualID, long select, long reset)
visualID
- the visual identifier of a componentprotected void selectComponent(long visualID)
visualID
- the visual identifier of a componentprotected void deselectComponent(long visualID)
visualID
- the visual identifier of a componentpublic void insertProperty(int visualID, String name, String value)
visualID
- the visual identifier of a componentname
- the property namevalue
- the property valueprotected boolean isStructureLocked()
protected long structureReset(boolean clearCache)
clearCache
- if true the viewer will delete cached filesprotected long structureLockUpdates()
protected void structureUnlockUpdates()
public int reparent(int visualID, int newParent)
visualID
- the visual identifier of a componentnewParent
- the visual identifier of a different parent
protected int deleteComponent(int visualID)
visualID
- the visual identifier of a componentpublic int setURLAnchor(int visualID, String url)
visualID
- the visual identifier of a componenturl
- the anchorprotected static int getHwnd(PViewPanel pvp, PViewCanvas canvas)
public void selectMode()
public void probeMode()
public void featureSelectMode()
public void selectSpinCenter()
public void zoomWindow()
public void zoomAll()
public void zoomSelected()
public void hideSelected()
public void showSelected()
public void showAll()
public void restorePosition()
public void displayShaded()
public void displayHLR()
public void displayWireframe()
public void dimensionMeasurement()
public void distanceMeasurement()
public void clearMeasurements()
public void projectionAbs()
public void projectionX()
public void projectionY()
public void projectionZ()
public void projectionUsr()
public void snapToMiddleEndPoint()
public void snapToCenterPoint()
public void snapToEdgeCurve()
public void snapToSurface()
public void snapToComponent()
protected void viewPrint()
protected void copyImage()
protected void setAstLinks(String etb)
protected void annotationActivate(String name)
protected void annotationShow(String name, short enable, short show)
public void setPropValueColor(long property, long value)
property
- the viewer propertyvalue
- the colorpublic void setPropValueInt(long property, long value)
property
- the viewer propertyvalue
- the integer valuepublic void setPropValueBool(long property, boolean value)
property
- the viewer propertyvalue
- the boolean valuepublic void setPropValueString(long property, String value)
property
- the viewer propertyvalue
- the string valuepublic void setPropValueFloat(long property, float value)
property
- the viewer propertyvalue
- the float valuepublic void toggleComponentRotate()
public void cancelLoading()
public void setMetaDataValue(long compid, String propName, String propValue)
public String getMetaDataValue(long compid, String propName)
public void setViewLocation(String location)
public void setComponentLocation(long compid, String location)
private void nativeShow(int hwnd)
private void nativeSetWindow(int hwnd)
private void nativeRefreshWindow(int hwnd)
private void nativeRefreshAllWindows(int hwnd)
private int nativeCreateView(int hwnd, String viewType)
private void nativeUpdateTreeView(int hwnd)
private int nativeReParent(int hwnd, int compID, int parentID)
private int nativeDeleteComponent(int hwnd, int compID)
private int nativeSetURLAnchor(int hwnd, int compID, String URL)
private int nativeDisplayIn(int hwnd, int compID, int viewID)
private int nativeInitialize(int hwnd)
private void nativePluginMove(int hwnd, int x, int y, int dx, int dy)
private long nativeStructureReset(int hwnd, boolean clearCache)
private long nativeStructureLockUpdates(int hwnd)
private void nativeStructureUnlockUpdates(int hwnd)
private long nativeInsertComponent(int hwnd, long parentID, String name, String shapeSource, String idShapeSource, String location, String lengthUnit, String boundingBox, String color, String material)
private long nativeLoadComponent(int hwnd, long id)
private long nativeReLoadComponent(int hwnd, long id)
private long nativeShowComponent(int hwnd, long id)
private long nativeHideComponent(int hwnd, long id)
private void nativeComponentSelect(int hwnd, long id, long select, long reset)
private void nativeSelectComponent(int hwnd, long id)
private void nativeDeSelectComponent(int hwnd, long id)
private void nativeInsertProperty(int hwnd, long id, String propName, String propValue)
private int nativeTerminate(int hwnd)
private void nativeFileArrived(int hwnd, String requestedFile, String localPath)
private void nativeSelectMode(int hwnd)
private void nativeProbeMode(int hwnd)
private void nativeFeatureSelectMode(int hwnd)
private void nativeSelectSpinCenter(int hwnd)
private void nativeZoomWindow(int hwnd)
private void nativeZoomAll(int hwnd)
private void nativeZoomSelected(int hwnd)
private void nativeHideSelected(int hwnd)
private void nativeShowSelected(int hwnd)
private void nativeShowAll(int hwnd)
private void nativeRestorePosition(int hwnd)
private void nativeDisplayShaded(int hwnd)
private void nativeDisplayHLR(int hwnd)
private void nativeDisplayWireframe(int hwnd)
private void nativeDimensionMeasurement(int hwnd)
private void nativeDistanceMeasurement(int hwnd)
private void nativeClearMeasurements(int hwnd)
private void nativeProjectionAbs(int hwnd)
private void nativeProjectionX(int hwnd)
private void nativeProjectionY(int hwnd)
private void nativeProjectionZ(int hwnd)
private void nativeProjectionUsr(int hwnd)
private void nativeSnapToMiddleEndPoint(int hwnd)
private void nativeSnapToCenterPoint(int hwnd)
private void nativeSnapToEdgeCurve(int hwnd)
private void nativeSnapToSurface(int hwnd)
private void nativeSnapToComponent(int hwnd)
private void nativeToggleComponentRotate(int hwnd)
private void nativeCancelLoading(int hwnd)
private void nativeViewPrint(int hwnd)
private void nativeCopyImage(int hwnd)
private void nativeSetAstLinks(int hwnd, String etb)
private void nativeAnnotationActivate(int hwnd, String name)
private void nativeAnnotationShow(int hwnd, String name, short enable, short show)
private void nativeSetMetaDataValue(int hwnd, long compid, String propName, String propValue)
private String nativeGetMetaDataValue(int hwnd, long compid, String propName)
private void nativeSetViewLocation(int hwnd, String location)
private void nativeSetComponentLocation(int hwnd, long compid, String location)
private void nativeSetPropValueInt(int hwnd, long property, long value)
private void nativeSetPropValueBool(int hwnd, long property, boolean value)
private void nativeSetPropValueFloat(int hwnd, long property, float value)
private void nativeSetPropValueString(int hwnd, long property, String value)
private void nativeMethod(int hwnd, long id)
private static PViewPanel findPanelForHwnd(int hwnd)
hwnd
- the window handle
private static void addPanelForHwnd(PViewPanel pviewPanel, int hwnd)
pviewPanel
- the panelhwnd
- the window handleprivate static void deletePanelForHwnd(int hwnd)
hwnd
- the window handleprotected static void onComponentSelected(int hwnd, long visualID)
hwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onComponentDeselected(int hwnd, long visualID)
hwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onComponentActivated(int hwnd, long visualID)
hwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onComponentMoved(int hwnd, long visualID, String location)
hwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onViewMoved(int hwnd, String viewLocation)
hwnd
- the window handleprotected static void onLoadComplete(int hwnd)
hwnd
- the window handleprotected static void onLoadEDComplete(int hwnd)
hwnd
- the window handleprotected static void onGetFile(String url, String extension, int hwnd, long visualID)
url
- the url requiredextension
- the file extensionhwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onSetStatusText(int hwnd, String msg)
hwnd
- the window handlemsg
- the viewer messageprotected static void onProbeCoord(int hwnd, String coord)
hwnd
- the window handlecoord
- the probed co-ordinatesprotected static void onComponentLoad(int hwnd, long visualID)
hwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onComponentUnload(int hwnd, long visualID)
hwnd
- the window handlevisualID
- the visual identifier of a componentprotected static void onComponentVisible(int hwnd, long visualID, short vis)
hwnd
- the window handlevisualID
- the visual identifier of a componentvis
- 0 - Hidden, 1 - made visibleprotected void signalFileArrived(String url, String localPath)
url
- the url requestedlocalPath
- the filname of the file in the cache
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |