|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JToolBar
com.ptc.wvs.client.pview.PViewToolBar
This acts as a convienent way implementing the buttons which surround the viewer These buttons replicate those used by the HTML PVLite viewer. Typically there are 2 toolbars to PVLite. The one at the top, the Model toolbar, and the one at the bottom, the Measurement toolbar. This class can be used to create a toolbar of a specific type. If the two are created and reference, then they will have to same behavior as displayed by PVLite. This class will re-use the text for tooltips that is used by HTML PVLite.
Supported API: false
Extendable: false
Nested Class Summary |
Nested classes inherited from class javax.swing.JToolBar |
JToolBar.AccessibleJToolBar, JToolBar.Separator |
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 JButton[] |
buttons
|
private static int |
CLEAR_MEASUREMENT
|
private URL |
codebase
|
private static int |
DIMENSION_MEASUREMENT
|
private static int |
DISPLAY_HLR
|
private static int |
DISPLAY_SHADED
|
private static int |
DISPLAY_WIREFRAME
|
private static int |
DISTANCE_MEASUREMENT
|
private static int |
FEATURE_SELECT_MODE
|
private static int |
HIDE_SELECTED
|
static int |
MEASUREMENT
Measurement toolbar |
private PViewToolBar |
measurementBar
|
static int |
MODEL
Model toolbar |
private static int |
PROJECTION_ABS
|
private static int |
PROJECTION_USR
|
private static int |
PROJECTION_X
|
private static int |
PROJECTION_Y
|
private static int |
PROJECTION_Z
|
private static String |
PVIEW_DIR
|
private Vector |
pviewPanels
|
private static String |
RESOURCE
|
private static int |
RESTORE_POSITION
|
private static int |
SELECT_MODE
|
private static int |
SELECT_SPIN_CENTER
|
private static int |
SHOW_ALL
|
private static int |
SHOW_SELECTED
|
private static int |
SNAP_TO_CENTER
|
private static int |
SNAP_TO_COMPONENT
|
private static int |
SNAP_TO_EDGECURVE
|
private static int |
SNAP_TO_MIDEND
|
private static int |
SNAP_TO_SURFACE
|
private static int |
TOGGLE_COMPONENT_ROTATE
|
private String[] |
toolTips
|
private int |
type
|
private boolean |
usedBySwing
|
private static int |
ZOOM_ALL
|
private static int |
ZOOM_SELECTED
|
private static int |
ZOOM_WINDOW
|
Fields inherited from class javax.swing.JToolBar |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, 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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PViewToolBar(PViewPanel pviewPanel,
URL codebase,
Locale locale,
int type,
boolean usedBySwing)
Creates the toolbar |
|
PViewToolBar(Vector pviewPanels,
URL codebase,
Locale locale,
int type,
boolean usedBySwing)
Creates the toolbar |
Method Summary | |
void |
actionPerformed(ActionEvent e)
processes the button actions |
private JButton |
but(String name,
String icon)
Creates a button with icon and tooltip |
private ImageIcon |
getImageIconFromPViewDir(String gif)
Returns the icon for the button |
PViewToolBar |
getMeasurementBar()
Returns the associated MEASUREMENT toolbar |
static Vector |
getVector(PViewPanel pviewPanel)
|
void |
mouseClicked(MouseEvent e)
Not used |
void |
mouseEntered(MouseEvent e)
Displays the tooltip in the Status bar |
void |
mouseExited(MouseEvent e)
Resets the Status Bar |
void |
mousePressed(MouseEvent e)
Not used |
void |
mouseReleased(MouseEvent e)
Not used |
void |
projectionButtons(boolean viewState)
Sets the view state on the measurement buttons related to projection |
void |
setMeasurementBar(PViewToolBar measurementBar)
Applicable to a toolbar of type MODEL. |
void |
snapButtons(boolean viewState)
Sets the view state on the measurement buttons related to snap mode |
Methods inherited from class javax.swing.JToolBar |
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static String RESOURCE
private static String PVIEW_DIR
private URL codebase
private static int SELECT_MODE
private static int FEATURE_SELECT_MODE
private static int SELECT_SPIN_CENTER
private static int ZOOM_WINDOW
private static int ZOOM_ALL
private static int ZOOM_SELECTED
private static int HIDE_SELECTED
private static int SHOW_SELECTED
private static int SHOW_ALL
private static int RESTORE_POSITION
private static int DISPLAY_SHADED
private static int DISPLAY_HLR
private static int DISPLAY_WIREFRAME
private static int TOGGLE_COMPONENT_ROTATE
private static int DIMENSION_MEASUREMENT
private static int DISTANCE_MEASUREMENT
private static int CLEAR_MEASUREMENT
private static int PROJECTION_ABS
private static int PROJECTION_X
private static int PROJECTION_Y
private static int PROJECTION_Z
private static int PROJECTION_USR
private static int SNAP_TO_MIDEND
private static int SNAP_TO_CENTER
private static int SNAP_TO_EDGECURVE
private static int SNAP_TO_SURFACE
private static int SNAP_TO_COMPONENT
private Vector pviewPanels
private JButton[] buttons
private String[] toolTips
private int type
private boolean usedBySwing
private PViewToolBar measurementBar
public static int MODEL
public static int MEASUREMENT
Constructor Detail |
public PViewToolBar(PViewPanel pviewPanel, URL codebase, Locale locale, int type, boolean usedBySwing)
pviewPanel
- the panel that the toolbar is to operatecodebase
- URL to the codebaselocale
- the current localetype
- the type of toolbar eg MODEL or MEASUREMENTusedBySwing
- if true, toolbar can float, and tooltips will be displayed on the buttonspublic PViewToolBar(Vector pviewPanels, URL codebase, Locale locale, int type, boolean usedBySwing)
pviewPanels
- a Vector of PViewPanels that the toolbar is to controllcodebase
- URL to the codebaselocale
- the current localetype
- the type of toolbar eg MODEL or MEASUREMENTusedBySwing
- if true, toolbar can float, and tooltips will be displayed on the buttonsMethod Detail |
public static Vector getVector(PViewPanel pviewPanel)
public void setMeasurementBar(PViewToolBar measurementBar)
measurementBar
- the measurement toolbarpublic PViewToolBar getMeasurementBar()
public void projectionButtons(boolean viewState)
viewState
- used to specify the visibility of the projection buttonspublic void snapButtons(boolean viewState)
viewState
- used to specify the visibility of the snap mode buttonsprivate JButton but(String name, String icon)
name
- the tooltip on the buttonicon
- the icon to be displayed on the button referenced as a gifprivate ImageIcon getImageIconFromPViewDir(String gif)
gif
- the icon to be displayed on the buttonpublic void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
e
- the eventpublic void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
e
- the eventpublic void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
e
- the eventpublic void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
e
- the eventpublic void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
e
- the eventpublic void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- the event
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |