com.ptc.wvs.client.pview
Class PViewPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ptc.wvs.client.pview.PViewPanel
All Implemented Interfaces:
Accessible, ComponentListener, EventListener, ImageObserver, MenuContainer, Serializable

public class PViewPanel
extends JPanel
implements ComponentListener

PViewPanel is the main class to be used to instantiate the ProductView viewer. PViewToolBar may be used to implement the toolbars PViewProxy may be used to make direct call to the viewer PViewStatusBar may be used to display a progress/status bar



Supported API: false

Extendable: false

See Also:
PViewToolBar, PViewToolBar, PViewStatusBar, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  boolean applet
           
private  String authorization
           
private  PViewCanvas canvas
           
private  boolean debug
           
private static EventListenerList listenerList
           
private  Container myRoot
           
private  PViewProxy proxy
           
private  PViewStatusBar pviewStatusBar
           
private static String RESOURCE
           
private  boolean shown
           
private  PViewStructure structure
           
static long VIEW_PROP_BOOL_2BUTTONMOUSE
           
static long VIEW_PROP_BOOL_BBOXSEL
          Highlight selected components with a bounding box
static long VIEW_PROP_BOOL_COLORSECTION
           
static long VIEW_PROP_BOOL_DASHED_HLR
          HLR mode view hidden lines as dashed lines
static long VIEW_PROP_BOOL_DISPLAYGRID
          Show the grid
static long VIEW_PROP_BOOL_DOREPOSITION
          Allow components to be repositioned
static long VIEW_PROP_BOOL_DRAWWINDOW
           
static long VIEW_PROP_BOOL_FILLED_HLR
          HLR mode fill polygons
static long VIEW_PROP_BOOL_FLATSHADE
           
static long VIEW_PROP_BOOL_GNOMON
          Display view gnomon
static long VIEW_PROP_BOOL_HALFTONEPRINT
          Print monochrome
static long VIEW_PROP_BOOL_HIDEALLGEOMONSECTION
           
static long VIEW_PROP_BOOL_HIDEGEOMONSECTION
          Hide construction geometry when sectioning is enabled
static long VIEW_PROP_BOOL_HIDESECTIONMARKUPS
           
static long VIEW_PROP_BOOL_HIGHLIGHTCOLOR
          Highlight selected components using highlight color
static long VIEW_PROP_BOOL_IGNORETRANS
          Pick through transparent objects
static long VIEW_PROP_BOOL_ISHPGL
           
static long VIEW_PROP_BOOL_LODENABLE
           
static long VIEW_PROP_BOOL_LODGEN
           
static long VIEW_PROP_BOOL_LODSPIN
           
static long VIEW_PROP_BOOL_MULTISECTION
           
static long VIEW_PROP_BOOL_MULTISELECT
           
static long VIEW_PROP_BOOL_OBJMAX
           
static long VIEW_PROP_BOOL_OCCLUSIONTESTING
           
static long VIEW_PROP_BOOL_ORTHOGRAPHIC
          Orthographic or Perspective viewing
static long VIEW_PROP_BOOL_OVERLAYENABLED
           
static long VIEW_PROP_BOOL_SCALE2DEVICE
          Scale dimensions/markups to device space
static long VIEW_PROP_BOOL_SECTIONALL
          Section all components
static long VIEW_PROP_BOOL_SHADED_HLR
          HLR mode shade filled polygons
static long VIEW_PROP_BOOL_SHOWCONSGEOM
           
static long VIEW_PROP_BOOL_SHOWONALLLAYERS
          Show object on layer only if all layers are enabled.
static long VIEW_PROP_BOOL_SINGLESELECTBBOX
          Use single bounding box for multiply selected components
static long VIEW_PROP_BOOL_TEXTBBOX
          Display bounding box around text labels
static long VIEW_PROP_BOOL_USEADVRENDER
           
static long VIEW_PROP_BOOL_USECOMPUTEDHLR
          Use computed HLR (slower but more precise)
static long VIEW_PROP_BOOL_USEHWACCELERATION
           
static long VIEW_PROP_BOOL_USEPENMAP
           
static long VIEW_PROP_BOOL_USETRUETYPEFONTS
           
static long VIEW_PROP_BOOL_VIEWWATERMARKS
           
static long VIEW_PROP_BOOL_ZOOMALLONUPDATE
           
static long VIEW_PROP_CLR_BKG
          Model background color
static long VIEW_PROP_CLR_DFL
          Default color
static long VIEW_PROP_CLR_DIM
          Leader line/Dimension color
static long VIEW_PROP_CLR_GRAD
          Shaded gradient background color
static long VIEW_PROP_CLR_HILITE
          Highlight color
static long VIEW_PROP_CLR_LABEL
          Label color
static long VIEW_PROP_CLR_MARKER
          Marker color
static long VIEW_PROP_CLR_RNOTE
          Reference note color
static long VIEW_PROP_CLR_TEXT
          Text color
static long VIEW_PROP_CLR_WBKG
          Wireframe background color
static long VIEW_PROP_CLR_XDIM
          Exploded Leader line/Dimension color
static long VIEW_PROP_FLOAT_ARROWSIZE
          Specifies the size of arrow heads (in arrow units).
static long VIEW_PROP_FLOAT_DEPTH
          Used to fine tune Z-buffer HLR algorithm
static long VIEW_PROP_FLOAT_FOCUSAREA
           
static long VIEW_PROP_FLOAT_FOCUSDISTANCE
           
static long VIEW_PROP_FLOAT_MEASSCALE
          Measurement scale
static long VIEW_PROP_FLOAT_MOUSESENSITIVITY
          Mouse sensitivity for differential flying (navigation)
static long VIEW_PROP_FLOAT_PERSPECTIVEFOV
          Perspective mode angular field of view
static long VIEW_PROP_FLOAT_POINTSIZE
          Specifies the size of points (in point units)
static long VIEW_PROP_FLOAT_PRINTSCALE
          Printing scale
static long VIEW_PROP_FLOAT_SECTIONSTEP
          Sectioning step size (in current length units)
static long VIEW_PROP_FLOAT_SLOPE
          Used to fine tune Z-buffer HLR algorithm
static long VIEW_PROP_FLOAT_SPACINGU
          Grid spacing in U direction
static long VIEW_PROP_FLOAT_SPACINGV
          Grid spacing in V direction
static long VIEW_PROP_FLOAT_TEXTSIZE
          Specifies the size of text (in text units) for labels, etc
static long VIEW_PROP_FLOAT_TOL1
          Tolerance 1 value
static long VIEW_PROP_FLOAT_TOL2
          Tolerance 2 value
static long VIEW_PROP_INT_ANTIALIASINGPASSES
          Number of anti-aliasing passes.
static long VIEW_PROP_INT_ARROWUNITS
          Units of measurement that arrow size refers to (same values as VIEW_PROP_INT_DIMUNIT)
static long VIEW_PROP_INT_BRIGHTNESS
          Brightness for light in the range of 1 to 100.
static long VIEW_PROP_INT_COMMANDMASK
           
static long VIEW_PROP_INT_DECIMAL
          Number of places to the right for decimal point precision
static long VIEW_PROP_INT_DIMUNIT
          Length Units 0=MM, 1=CM, 2=INCHES.
static long VIEW_PROP_INT_FBA_TYPE_MASK
          Used to control feature based annotation selection (not yet implemented)
static long VIEW_PROP_INT_FILTER_RENDER_MASK
          Used to control rendering options (not yet implemented)
static long VIEW_PROP_INT_FLIGHT_RENDER_MASK
          Used to control rendering options (not yet implemented)
static long VIEW_PROP_INT_FRAMERATE
          Target frame-rate of the display device (in fps).
static long VIEW_PROP_INT_GRIDSTYLE
          Grid Style 0 - Lines, 1 - Points
static long VIEW_PROP_INT_LINEFONT
          Line style 1=Solid, 2=dot=dash, 3=dot-dot-dash
static long VIEW_PROP_INT_LINESTYLE
          Line end styles 1=No arrows, 2=Leading arrow, 3=Trailing arrow, 4=Both arrow, 5=Both dots, 6=Leading dot, 7=Trailing dot
static long VIEW_PROP_INT_LINEWEIGHT
          Line thickness 1=Thin, 2=Medium, 3=Thick
static long VIEW_PROP_INT_LODRES
           
static long VIEW_PROP_INT_MASSUNIT
          Mass Units 0=Grams, 1=Kilograms, 2=Pounds
static long VIEW_PROP_INT_MAX_LOAD_THREADS
          Maximum number of threads to use for loading geometry files
static long VIEW_PROP_INT_PENWIDTH_BIAS
          Pen width multiplier for
static long VIEW_PROP_INT_POINTSTYLE
          Point style 0 - Crosshair, 1 - Solid Circle, 2 - Star
static long VIEW_PROP_INT_POINTUNITS
          Units of measurement that point size refers to (same values as VIEW_PROP_INT_DIMUNIT)
static long VIEW_PROP_INT_SECTPRECISION
          Sectioning precision 0 - Rough 1 - More precise 2 - Most precise
static long VIEW_PROP_INT_SIZE_CULLING
          Cull objects smaller than this size (in device pixels)
static long VIEW_PROP_INT_SWEETEN_RENDER_MASK
          Used to control rendering options (not yet implemented)
static long VIEW_PROP_INT_TEXTUNITS
          Units of measurement that text size refers to (same values as VIEW_PROP_INT_DIMUNIT)
static long VIEW_PROP_INT_TOLPREC
          Decimal precision for tolerance values
static long VIEW_PROP_INT_TOLTYPE
          Tolerance type 0=None, 1=Symmetrical, 2=Deviation
static long VIEW_PROP_STR_COORDINATEFRAME
          Font face to use for labels, etc
static long VIEW_PROP_STR_FONT
           
static long VIEW_PROP_STR_FONT_DIR
          Specify the current user coordinate frame (not yet available)
static long VIEW_PROP_STR_WATERMARKFILE
          Specify the e-watermark to apply (not yet available)
private  boolean viewerAvailable
           
private  JPanel viewPane
           
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PViewPanel(Locale locale, boolean debug)
          Creates the Panel, loads the viewer
PViewPanel(Locale locale, boolean debug, boolean useWindchill)
          Creates the Panel, loads the viewer
 
Method Summary
 void addPViewListener(PViewListener pviewListener)
          Adds a PViewListener
 void annotationActivate(String name)
          Activate an annotation
 void annotationShow(String name, short enable, short show)
          Shows an annotation
 void applyPreferences()
          Applies the Model viewer preferences that have been set for the HTML Lite viewer.
 void componentHidden(ComponentEvent e)
          Currently not implemented
 void componentMoved(ComponentEvent e)
          Currently not implemented
 void componentResized(ComponentEvent e)
          Handles the panel resize to ensure that the viewer also resizes to fit
 void componentSelect(long visualID, long select, long reset)
          Selects the component in the viewer
 void componentShown(ComponentEvent e)
          Currently not implemented
 void copyImage()
          Copies the current view to the clipboard
 void deleteComponent(long visualID)
          Deletes the specified component (with children) from the viewers strcuture representation.
 void deselectComponent(long visualID)
          Deselects the component in the viewer
 void dumpStructure()
          Debug dump of the structure
 void fireEvent(int hwnd, long id, int eventType)
          Emits the event to all the listeners on the specified viewer
 void fireEvent(int hwnd, long id, int eventType, String modifier)
          Emits the event to all the listeners on the specified viewer with modifiers
 void fireEvent(long id, int eventType)
          Emits the event to all the listeners on this viewer
protected  String getAuthorization()
          Returns the autorization set by setAutorization
private  boolean getBool(String sbool)
          Takes the boolean preference string of the form "0" or "1" and returns the equivalent boolean
private  long getColor(String color)
          Takes the preference string of the form 0x00f4f6ef and returns the equivalent long
 int getHwnd()
          Returns the Window handle that uniquely identifies this viewing panel
private  int getInt(String sint)
          Takes the integer preference string and returns the equivalent int
 PViewProxy getProxy()
          Returns the associated viewer command proxy
protected  PViewStructure getStructure()
          Obtains the current PViewStructure object
 String getStructureNameforID(long visualID)
          Returns the descriptive name associated to the visualID
 String getStructureShapeSourceForID(long visualID)
          Returns the shapesource associated to the visualID
 void hideComponent(long visualID)
          Hides the referenced component currently displayed in the viewer
 void incrementProgressValue()
          If a status bar is associated, updates the Progress bar incrementing the value by 1
 long insertComponent(long parentID, String name, String shapeSource, String idShapeSource, String location, String lengthUnit, String boundingBox, String color, String material)
          Inserts a component to be visualized.
 boolean isApplet()
          Returns if running from an Applet (true) or Application (false)
 boolean isDebug()
          Returns the debug state
private  boolean isShown()
          Returns if the viewer has been shown
 boolean isStructureLoaded()
          Returns the loaded state of the structure
 boolean isViewerAvailable()
          Returns if the viewer is available
 void refreshCanvas()
          Performs a canvas repaint.
 void removePViewListener(PViewListener pviewListener)
          Removes a PViewListener
 boolean resetStructure(boolean clearCache)
          Close the active visualization structure, removes the display, and optionally deletes any cached files
 void selectComponent(long visualID)
          Selects the component in the viewer
 void setApplet(boolean applet)
          Sets if the visualization bean is running from an Applet or Application.
 void setAstLinks(String etb)
          Passes the ETB information
 void setAuthorization(String authorization)
          Sets the authorization string that will be passed when files are transferred via a URL, and the visualization bean is being called from an Application.
 void setComponentLocation(long visualID, String location)
          Moves the specified component to a new location
 void setDebug(boolean debug)
          Switches debug information on/off
 void setProgressMaximum(int maxValue)
          If a status bar is associated, updates the maximum value of the Progress bar
 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, int 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.
private  void setShown(boolean flag)
          Sets if the viewer has been shown/started
 void setStatusBar(PViewStatusBar statusBar)
          Associates a status bar to the panel
 void setStatusProgress(String label, int value)
          If a status bar is associated, updates the Progress bar label and value
 void setStatusProgress(String label, int value, int maxValue)
          If a status bar is associated, updates the Progress bar label, value and max value
 void setStatusText(String text)
          If a status bar is associated, displays the specified text
protected  void setStructureLoaded(boolean loaded)
          Specifies if data is loaded in the structure object
 void setViewLocation(String location)
          Adjusts the current view to the specified location
 void showComponent(long visualID)
          Shows the component in the viewer, this will if necessary download the appropriate file(s) if referenced by a URL
 void startPViewPanel()
          Causes the viewer to run, and size to the panel
 void statusCancelButton(boolean show)
          If a status bar is associated, specifies if the cancel button is to be displayed
 void structureUnlockUpdates()
          Unlocks the structure after a change.
 void terminatePViewPanel()
          Causes the viewer to terminate
 void viewPrint()
          Prints the current view
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myRoot

private Container myRoot

listenerList

private static EventListenerList listenerList

debug

private boolean debug

viewPane

private JPanel viewPane

canvas

private PViewCanvas canvas

proxy

private PViewProxy proxy

structure

private PViewStructure structure

shown

private boolean shown

pviewStatusBar

private PViewStatusBar pviewStatusBar

RESOURCE

private static String RESOURCE

viewerAvailable

private boolean viewerAvailable

authorization

private String authorization

applet

private boolean applet

VIEW_PROP_CLR_BKG

public static long VIEW_PROP_CLR_BKG
Model background color


VIEW_PROP_CLR_WBKG

public static long VIEW_PROP_CLR_WBKG
Wireframe background color


VIEW_PROP_CLR_DFL

public static long VIEW_PROP_CLR_DFL
Default color


VIEW_PROP_CLR_HILITE

public static long VIEW_PROP_CLR_HILITE
Highlight color


VIEW_PROP_CLR_DIM

public static long VIEW_PROP_CLR_DIM
Leader line/Dimension color


VIEW_PROP_CLR_XDIM

public static long VIEW_PROP_CLR_XDIM
Exploded Leader line/Dimension color


VIEW_PROP_CLR_MARKER

public static long VIEW_PROP_CLR_MARKER
Marker color


VIEW_PROP_CLR_TEXT

public static long VIEW_PROP_CLR_TEXT
Text color


VIEW_PROP_CLR_RNOTE

public static long VIEW_PROP_CLR_RNOTE
Reference note color


VIEW_PROP_CLR_LABEL

public static long VIEW_PROP_CLR_LABEL
Label color


VIEW_PROP_CLR_GRAD

public static long VIEW_PROP_CLR_GRAD
Shaded gradient background color


VIEW_PROP_INT_LODRES

public static long VIEW_PROP_INT_LODRES

VIEW_PROP_INT_DIMUNIT

public static long VIEW_PROP_INT_DIMUNIT
Length Units 0=MM, 1=CM, 2=INCHES. 3=POINTS, 4=FEET, 5=METERS


VIEW_PROP_INT_MASSUNIT

public static long VIEW_PROP_INT_MASSUNIT
Mass Units 0=Grams, 1=Kilograms, 2=Pounds


VIEW_PROP_INT_LINESTYLE

public static long VIEW_PROP_INT_LINESTYLE
Line end styles 1=No arrows, 2=Leading arrow, 3=Trailing arrow, 4=Both arrow, 5=Both dots, 6=Leading dot, 7=Trailing dot


VIEW_PROP_INT_LINEWEIGHT

public static long VIEW_PROP_INT_LINEWEIGHT
Line thickness 1=Thin, 2=Medium, 3=Thick


VIEW_PROP_INT_LINEFONT

public static long VIEW_PROP_INT_LINEFONT
Line style 1=Solid, 2=dot=dash, 3=dot-dot-dash


VIEW_PROP_INT_DECIMAL

public static long VIEW_PROP_INT_DECIMAL
Number of places to the right for decimal point precision


VIEW_PROP_INT_TOLTYPE

public static long VIEW_PROP_INT_TOLTYPE
Tolerance type 0=None, 1=Symmetrical, 2=Deviation


VIEW_PROP_INT_FRAMERATE

public static long VIEW_PROP_INT_FRAMERATE
Target frame-rate of the display device (in fps). Minimum=0, Maximum=30


VIEW_PROP_INT_SECTPRECISION

public static long VIEW_PROP_INT_SECTPRECISION
Sectioning precision 0 - Rough 1 - More precise 2 - Most precise


VIEW_PROP_INT_POINTSTYLE

public static long VIEW_PROP_INT_POINTSTYLE
Point style 0 - Crosshair, 1 - Solid Circle, 2 - Star


VIEW_PROP_INT_GRIDSTYLE

public static long VIEW_PROP_INT_GRIDSTYLE
Grid Style 0 - Lines, 1 - Points


VIEW_PROP_INT_PENWIDTH_BIAS

public static long VIEW_PROP_INT_PENWIDTH_BIAS
Pen width multiplier for


VIEW_PROP_INT_MAX_LOAD_THREADS

public static long VIEW_PROP_INT_MAX_LOAD_THREADS
Maximum number of threads to use for loading geometry files


VIEW_PROP_INT_TEXTUNITS

public static long VIEW_PROP_INT_TEXTUNITS
Units of measurement that text size refers to (same values as VIEW_PROP_INT_DIMUNIT)


VIEW_PROP_INT_ARROWUNITS

public static long VIEW_PROP_INT_ARROWUNITS
Units of measurement that arrow size refers to (same values as VIEW_PROP_INT_DIMUNIT)


VIEW_PROP_INT_POINTUNITS

public static long VIEW_PROP_INT_POINTUNITS
Units of measurement that point size refers to (same values as VIEW_PROP_INT_DIMUNIT)


VIEW_PROP_INT_BRIGHTNESS

public static long VIEW_PROP_INT_BRIGHTNESS
Brightness for light in the range of 1 to 100.


VIEW_PROP_INT_ANTIALIASINGPASSES

public static long VIEW_PROP_INT_ANTIALIASINGPASSES
Number of anti-aliasing passes. Can be 0, 2, 4, 8 or 16


VIEW_PROP_INT_TOLPREC

public static long VIEW_PROP_INT_TOLPREC
Decimal precision for tolerance values


VIEW_PROP_INT_FBA_TYPE_MASK

public static long VIEW_PROP_INT_FBA_TYPE_MASK
Used to control feature based annotation selection (not yet implemented)


VIEW_PROP_INT_FLIGHT_RENDER_MASK

public static long VIEW_PROP_INT_FLIGHT_RENDER_MASK
Used to control rendering options (not yet implemented)


VIEW_PROP_INT_SWEETEN_RENDER_MASK

public static long VIEW_PROP_INT_SWEETEN_RENDER_MASK
Used to control rendering options (not yet implemented)


VIEW_PROP_INT_FILTER_RENDER_MASK

public static long VIEW_PROP_INT_FILTER_RENDER_MASK
Used to control rendering options (not yet implemented)


VIEW_PROP_INT_SIZE_CULLING

public static long VIEW_PROP_INT_SIZE_CULLING
Cull objects smaller than this size (in device pixels)


VIEW_PROP_BOOL_OBJMAX

public static long VIEW_PROP_BOOL_OBJMAX

VIEW_PROP_BOOL_HIGHLIGHTCOLOR

public static long VIEW_PROP_BOOL_HIGHLIGHTCOLOR
Highlight selected components using highlight color


VIEW_PROP_BOOL_GNOMON

public static long VIEW_PROP_BOOL_GNOMON
Display view gnomon


VIEW_PROP_BOOL_IGNORETRANS

public static long VIEW_PROP_BOOL_IGNORETRANS
Pick through transparent objects


VIEW_PROP_BOOL_LODGEN

public static long VIEW_PROP_BOOL_LODGEN

VIEW_PROP_BOOL_LODENABLE

public static long VIEW_PROP_BOOL_LODENABLE

VIEW_PROP_BOOL_LODSPIN

public static long VIEW_PROP_BOOL_LODSPIN

VIEW_PROP_BOOL_HALFTONEPRINT

public static long VIEW_PROP_BOOL_HALFTONEPRINT
Print monochrome


VIEW_PROP_BOOL_FLATSHADE

public static long VIEW_PROP_BOOL_FLATSHADE

VIEW_PROP_BOOL_SCALE2DEVICE

public static long VIEW_PROP_BOOL_SCALE2DEVICE
Scale dimensions/markups to device space


VIEW_PROP_BOOL_ORTHOGRAPHIC

public static long VIEW_PROP_BOOL_ORTHOGRAPHIC
Orthographic or Perspective viewing


VIEW_PROP_BOOL_SECTIONALL

public static long VIEW_PROP_BOOL_SECTIONALL
Section all components


VIEW_PROP_BOOL_DISPLAYGRID

public static long VIEW_PROP_BOOL_DISPLAYGRID
Show the grid


VIEW_PROP_BOOL_OVERLAYENABLED

public static long VIEW_PROP_BOOL_OVERLAYENABLED

VIEW_PROP_BOOL_TEXTBBOX

public static long VIEW_PROP_BOOL_TEXTBBOX
Display bounding box around text labels


VIEW_PROP_BOOL_BBOXSEL

public static long VIEW_PROP_BOOL_BBOXSEL
Highlight selected components with a bounding box


VIEW_PROP_BOOL_ISHPGL

public static long VIEW_PROP_BOOL_ISHPGL

VIEW_PROP_BOOL_DASHED_HLR

public static long VIEW_PROP_BOOL_DASHED_HLR
HLR mode view hidden lines as dashed lines


VIEW_PROP_BOOL_FILLED_HLR

public static long VIEW_PROP_BOOL_FILLED_HLR
HLR mode fill polygons


VIEW_PROP_BOOL_SHADED_HLR

public static long VIEW_PROP_BOOL_SHADED_HLR
HLR mode shade filled polygons


VIEW_PROP_BOOL_ZOOMALLONUPDATE

public static long VIEW_PROP_BOOL_ZOOMALLONUPDATE

VIEW_PROP_BOOL_OCCLUSIONTESTING

public static long VIEW_PROP_BOOL_OCCLUSIONTESTING

VIEW_PROP_BOOL_SHOWCONSGEOM

public static long VIEW_PROP_BOOL_SHOWCONSGEOM

VIEW_PROP_BOOL_HIDEGEOMONSECTION

public static long VIEW_PROP_BOOL_HIDEGEOMONSECTION
Hide construction geometry when sectioning is enabled


VIEW_PROP_BOOL_USEPENMAP

public static long VIEW_PROP_BOOL_USEPENMAP

VIEW_PROP_BOOL_SHOWONALLLAYERS

public static long VIEW_PROP_BOOL_SHOWONALLLAYERS
Show object on layer only if all layers are enabled.


VIEW_PROP_BOOL_USEADVRENDER

public static long VIEW_PROP_BOOL_USEADVRENDER

VIEW_PROP_BOOL_SINGLESELECTBBOX

public static long VIEW_PROP_BOOL_SINGLESELECTBBOX
Use single bounding box for multiply selected components


VIEW_PROP_BOOL_USETRUETYPEFONTS

public static long VIEW_PROP_BOOL_USETRUETYPEFONTS

VIEW_PROP_BOOL_VIEWWATERMARKS

public static long VIEW_PROP_BOOL_VIEWWATERMARKS

VIEW_PROP_INT_COMMANDMASK

public static long VIEW_PROP_INT_COMMANDMASK

VIEW_PROP_BOOL_COLORSECTION

public static long VIEW_PROP_BOOL_COLORSECTION

VIEW_PROP_BOOL_HIDEALLGEOMONSECTION

public static long VIEW_PROP_BOOL_HIDEALLGEOMONSECTION

VIEW_PROP_BOOL_MULTISECTION

public static long VIEW_PROP_BOOL_MULTISECTION

VIEW_PROP_BOOL_HIDESECTIONMARKUPS

public static long VIEW_PROP_BOOL_HIDESECTIONMARKUPS

VIEW_PROP_BOOL_2BUTTONMOUSE

public static long VIEW_PROP_BOOL_2BUTTONMOUSE

VIEW_PROP_BOOL_USECOMPUTEDHLR

public static long VIEW_PROP_BOOL_USECOMPUTEDHLR
Use computed HLR (slower but more precise)


VIEW_PROP_BOOL_USEHWACCELERATION

public static long VIEW_PROP_BOOL_USEHWACCELERATION

VIEW_PROP_BOOL_DOREPOSITION

public static long VIEW_PROP_BOOL_DOREPOSITION
Allow components to be repositioned


VIEW_PROP_BOOL_DRAWWINDOW

public static long VIEW_PROP_BOOL_DRAWWINDOW

VIEW_PROP_FLOAT_SECTIONSTEP

public static long VIEW_PROP_FLOAT_SECTIONSTEP
Sectioning step size (in current length units)


VIEW_PROP_FLOAT_SLOPE

public static long VIEW_PROP_FLOAT_SLOPE
Used to fine tune Z-buffer HLR algorithm


VIEW_PROP_FLOAT_DEPTH

public static long VIEW_PROP_FLOAT_DEPTH
Used to fine tune Z-buffer HLR algorithm


VIEW_PROP_FLOAT_TOL1

public static long VIEW_PROP_FLOAT_TOL1
Tolerance 1 value


VIEW_PROP_FLOAT_TOL2

public static long VIEW_PROP_FLOAT_TOL2
Tolerance 2 value


VIEW_PROP_FLOAT_FOCUSAREA

public static long VIEW_PROP_FLOAT_FOCUSAREA

VIEW_PROP_FLOAT_FOCUSDISTANCE

public static long VIEW_PROP_FLOAT_FOCUSDISTANCE

VIEW_PROP_FLOAT_MOUSESENSITIVITY

public static long VIEW_PROP_FLOAT_MOUSESENSITIVITY
Mouse sensitivity for differential flying (navigation)


VIEW_PROP_FLOAT_TEXTSIZE

public static long VIEW_PROP_FLOAT_TEXTSIZE
Specifies the size of text (in text units) for labels, etc


VIEW_PROP_FLOAT_ARROWSIZE

public static long VIEW_PROP_FLOAT_ARROWSIZE
Specifies the size of arrow heads (in arrow units).


VIEW_PROP_FLOAT_POINTSIZE

public static long VIEW_PROP_FLOAT_POINTSIZE
Specifies the size of points (in point units)


VIEW_PROP_FLOAT_PERSPECTIVEFOV

public static long VIEW_PROP_FLOAT_PERSPECTIVEFOV
Perspective mode angular field of view


VIEW_PROP_FLOAT_SPACINGU

public static long VIEW_PROP_FLOAT_SPACINGU
Grid spacing in U direction


VIEW_PROP_FLOAT_SPACINGV

public static long VIEW_PROP_FLOAT_SPACINGV
Grid spacing in V direction


VIEW_PROP_FLOAT_PRINTSCALE

public static long VIEW_PROP_FLOAT_PRINTSCALE
Printing scale


VIEW_PROP_FLOAT_MEASSCALE

public static long VIEW_PROP_FLOAT_MEASSCALE
Measurement scale


VIEW_PROP_BOOL_MULTISELECT

public static long VIEW_PROP_BOOL_MULTISELECT

VIEW_PROP_STR_FONT

public static long VIEW_PROP_STR_FONT

VIEW_PROP_STR_COORDINATEFRAME

public static long VIEW_PROP_STR_COORDINATEFRAME
Font face to use for labels, etc


VIEW_PROP_STR_FONT_DIR

public static long VIEW_PROP_STR_FONT_DIR
Specify the current user coordinate frame (not yet available)


VIEW_PROP_STR_WATERMARKFILE

public static long VIEW_PROP_STR_WATERMARKFILE
Specify the e-watermark to apply (not yet available)

Constructor Detail

PViewPanel

public PViewPanel(Locale locale,
                  boolean debug)
Creates the Panel, loads the viewer

Parameters:
locale - the users locale
debug - specifies if debug information is to be produced

PViewPanel

public PViewPanel(Locale locale,
                  boolean debug,
                  boolean useWindchill)
Creates the Panel, loads the viewer

Parameters:
locale - the users locale
debug - specifies if debug information is to be produced
useWindchill - specifies if Windchill calls are to be made to get override applet security
Method Detail

refreshCanvas

public void refreshCanvas()
Performs a canvas repaint. Sometimes this is useful to flush the changes through when colour preferences have been set etc.


isViewerAvailable

public boolean isViewerAvailable()
Returns if the viewer is available

Returns:
the availability

setDebug

public void setDebug(boolean debug)
Switches debug information on/off

Parameters:
debug - specifies if debug information is to be produced

isDebug

public boolean isDebug()
Returns the debug state

Returns:
debug state

startPViewPanel

public void startPViewPanel()
Causes the viewer to run, and size to the panel


terminatePViewPanel

public void terminatePViewPanel()
Causes the viewer to terminate


getProxy

public PViewProxy getProxy()
Returns the associated viewer command proxy

Returns:
the proxy

getHwnd

public int getHwnd()
Returns the Window handle that uniquely identifies this viewing panel

Returns:
the window handle

setApplet

public void setApplet(boolean applet)
Sets if the visualization bean is running from an Applet or Application. The default is Applet

Parameters:
applet - true if running from an Applet, false for an Application

isApplet

public boolean isApplet()
Returns if running from an Applet (true) or Application (false)

Returns:
true - Applet, false - Application

setAuthorization

public void setAuthorization(String authorization)
Sets the authorization string that will be passed when files are transferred via a URL, and the visualization bean is being called from an Application. This does not need to be set when being called from an Applet.


getAuthorization

protected String getAuthorization()
Returns the autorization set by setAutorization

Returns:
the autorization string, use only be PViewGetFile when running as an Application

setShown

private void setShown(boolean flag)
Sets if the viewer has been shown/started

Parameters:
flag - indicating if shown

isShown

private boolean isShown()
Returns if the viewer has been shown

Returns:
indicating if shown

addPViewListener

public void addPViewListener(PViewListener pviewListener)
Adds a PViewListener

Parameters:
pviewListener - the listener

removePViewListener

public void removePViewListener(PViewListener pviewListener)
Removes a PViewListener

Parameters:
pviewListener - the listener

fireEvent

public void fireEvent(long id,
                      int eventType)
Emits the event to all the listeners on this viewer

Parameters:
id - the visualID
eventType - the type of event
See Also:
PViewEvent

fireEvent

public void fireEvent(int hwnd,
                      long id,
                      int eventType)
Emits the event to all the listeners on the specified viewer

Parameters:
hwnd - the window handle
id - the visualID
eventType - the type of event
See Also:
PViewEvent

fireEvent

public void fireEvent(int hwnd,
                      long id,
                      int eventType,
                      String modifier)
Emits the event to all the listeners on the specified viewer with modifiers

Parameters:
hwnd - the window handle
id - the visualID
eventType - the type of event
modifier - event modifier
See Also:
PViewEvent

componentResized

public void componentResized(ComponentEvent e)
Handles the panel resize to ensure that the viewer also resizes to fit

Specified by:
componentResized in interface ComponentListener
Parameters:
e - the event

componentMoved

public void componentMoved(ComponentEvent e)
Currently not implemented

Specified by:
componentMoved in interface ComponentListener
Parameters:
e - the event

componentHidden

public void componentHidden(ComponentEvent e)
Currently not implemented

Specified by:
componentHidden in interface ComponentListener
Parameters:
e - the event

componentShown

public void componentShown(ComponentEvent e)
Currently not implemented

Specified by:
componentShown in interface ComponentListener
Parameters:
e - the event

setStatusBar

public void setStatusBar(PViewStatusBar statusBar)
Associates a status bar to the panel

Parameters:
statusBar - the status bar

statusCancelButton

public void statusCancelButton(boolean show)
If a status bar is associated, specifies if the cancel button is to be displayed

Parameters:
show - if true the button is displayed

setStatusProgress

public void setStatusProgress(String label,
                              int value)
If a status bar is associated, updates the Progress bar label and value

Parameters:
label - displayed on the progress bar
value - of the progress

setStatusProgress

public void setStatusProgress(String label,
                              int value,
                              int maxValue)
If a status bar is associated, updates the Progress bar label, value and max value

Parameters:
label - displayed on the progress bar
value - of the progress
maxValue - of the progress

incrementProgressValue

public void incrementProgressValue()
If a status bar is associated, updates the Progress bar incrementing the value by 1


setProgressMaximum

public void setProgressMaximum(int maxValue)
If a status bar is associated, updates the maximum value of the Progress bar

Parameters:
maxValue - of the progress

setStatusText

public void setStatusText(String text)
If a status bar is associated, displays the specified text

Parameters:
text - to display

applyPreferences

public void applyPreferences()
Applies the Model viewer preferences that have been set for the HTML Lite viewer. These are held in Windchill as user preferences, so this method will only do something if working to Windchill


getColor

private long getColor(String color)
Takes the preference string of the form 0x00f4f6ef and returns the equivalent long

Parameters:
color - the color string in the form "0x00f4f6ef"
Returns:
the colour as a long

getBool

private boolean getBool(String sbool)
Takes the boolean preference string of the form "0" or "1" and returns the equivalent boolean

Parameters:
sbool - the string preference "0" or "1"
Returns:
the equivalent boolean

getInt

private int getInt(String sint)
Takes the integer preference string and returns the equivalent int

Parameters:
sint - the string preference integer
Returns:
the equivalent int

getStructure

protected PViewStructure getStructure()
Obtains the current PViewStructure object

Returns:
the structure object

setStructureLoaded

protected void setStructureLoaded(boolean loaded)
Specifies if data is loaded in the structure object

Parameters:
loaded - true if data is loaded

isStructureLoaded

public boolean isStructureLoaded()
Returns the loaded state of the structure

Returns:
true is data if loaded

dumpStructure

public void dumpStructure()
Debug dump of the structure


getStructureNameforID

public String getStructureNameforID(long visualID)
Returns the descriptive name associated to the visualID

Parameters:
visualID - the visual identifier of a component
Returns:
the descriptive name associated

getStructureShapeSourceForID

public String getStructureShapeSourceForID(long visualID)
Returns the shapesource associated to the visualID

Parameters:
visualID - the visual identifier of a component
Returns:
the descriptive name associated

insertComponent

public long insertComponent(long parentID,
                            String name,
                            String shapeSource,
                            String idShapeSource,
                            String location,
                            String lengthUnit,
                            String boundingBox,
                            String color,
                            String material)
Inserts a component to be visualized. Once all the structure has been loaded structureUnlockUpdates should be called.

Parameters:
parentID - the visualID of the parent. 0 if this is the root node
name - displayed during file transfer and in debug messages
location - 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 color
material - the material
Returns:
the visualID to the component from the viewer

structureUnlockUpdates

public void structureUnlockUpdates()
Unlocks the structure after a change. This only needs to be explicity called when building a structure. This will then finalize the creation of the strcuture


componentSelect

public void componentSelect(long visualID,
                            long select,
                            long reset)
Selects the component in the viewer

Parameters:
visualID - the visual identifier of a component

selectComponent

public void selectComponent(long visualID)
Selects the component in the viewer

Parameters:
visualID - the visual identifier of a component

deselectComponent

public void deselectComponent(long visualID)
Deselects the component in the viewer

Parameters:
visualID - the visual identifier of a component

showComponent

public void showComponent(long visualID)
Shows the component in the viewer, this will if necessary download the appropriate file(s) if referenced by a URL

Parameters:
visualID - the visual identifier of a component

hideComponent

public void hideComponent(long visualID)
Hides the referenced component currently displayed in the viewer

Parameters:
visualID - the visual identifier of a component

deleteComponent

public void deleteComponent(long visualID)
Deletes the specified component (with children) from the viewers strcuture representation. This will remove the effected components from the display

Parameters:
visualID - the visual identifier of a component

resetStructure

public boolean resetStructure(boolean clearCache)
Close the active visualization structure, removes the display, and optionally deletes any cached files

Parameters:
clearCache - if true will delete any files in the cache related to this viewer
Returns:
true if successfully reset, or there is no active structure

setPropValueColor

public 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. VIEW_PROP_CLR_BKG

Parameters:
property - the viewer property
value - the color

setPropValueInt

public void setPropValueInt(long property,
                            int 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. VIEW_PROP_INT_DIMUNIT

Parameters:
property - the viewer property
value - the integer value

setPropValueBool

public 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. VIEW_PROP_BOOL_GNOMON

Parameters:
property - the viewer property
value - the boolean value

setPropValueFloat

public 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. VIEW_PROP_FLOAT_SLOPE

Parameters:
property - the viewer property
value - the float value

setPropValueString

public 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. VIEW_PROP_STR_FONT

Parameters:
property - the viewer property
value - the string value

setViewLocation

public void setViewLocation(String location)
Adjusts the current view to the specified location

Parameters:
location - the ProductView location specified as "AX AY AZ X Y Z"

setComponentLocation

public void setComponentLocation(long visualID,
                                 String location)
Moves the specified component to a new location

Parameters:
visualID - the visual identifier of a component
location - the ProductView location specified as "AX AY AZ X Y Z"

viewPrint

public void viewPrint()
Prints the current view


copyImage

public void copyImage()
Copies the current view to the clipboard


setAstLinks

public void setAstLinks(String etb)
Passes the ETB information

Parameters:
etb - the <@@> delimited ETB string.

annotationActivate

public void annotationActivate(String name)
Activate an annotation

Parameters:
name - the annotation name, this must exist in the etb string

annotationShow

public void annotationShow(String name,
                           short enable,
                           short show)
Shows an annotation

Parameters:
name - the annotation name, this must exist in the etb string
enable -
show -