|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcae.viewer3d.ViewableAdaptor
org.jcae.viewer3d.cad.ViewableCAD
public class ViewableCAD
A Viewable specilized to display CAD scenes. The selected elements are highlighted.
| Nested Class Summary | |
|---|---|
protected static interface |
ViewableCAD.CADPickingInfo
|
protected static class |
ViewableCAD.EdgePickingInfo
|
protected static class |
ViewableCAD.FacePickingInfo
|
protected static class |
ViewableCAD.VertexPickingInfo
|
| Field Summary | |
|---|---|
static short |
DOMAIN_SELECTION
|
static short |
EDGE_SELECTION
|
static short |
FACE_SELECTION
|
static short |
MULTI_SELECTION
|
static short |
NONE_SELECTION
|
static javax.media.j3d.PolygonAttributes |
polygonAttrBack
|
static javax.media.j3d.PolygonAttributes |
polygonAttrFront
|
static javax.media.j3d.PolygonAttributes |
polygonAttrNone
|
static short |
VERTEX_SELECTION
|
| Constructor Summary | |
|---|---|
ViewableCAD(CADProvider provider)
|
|
| Method Summary | |
|---|---|
void |
addSelectionListener(CADSelectionListener listener)
Add a selectionListener to this viewable As an optimisation, when there is no listener, the picking should be disabled on this viewable |
void |
addSelectionListener(SelectionListener listener)
|
void |
domainsChangedPerform(int[] domainId)
|
protected void |
fireSelectionChanged()
|
DomainProvider |
getDomainProvider()
Return the domain provider of this viewable |
javax.media.j3d.Node |
getJ3DNode()
Return the Java3D Node associated to this Viewable |
protected static java.lang.Object |
getPickUserData(PickViewable result)
|
CADSelection[] |
getSelection()
|
void |
highlightEdge(int edgeID,
boolean status)
|
void |
highlightEdge(int edgeID,
boolean status,
boolean fireListeners)
|
void |
highlightFace(int faceID,
boolean status)
|
void |
highlightFace(int faceID,
boolean status,
boolean fireListeners)
|
void |
highlightVertex(int vertexID,
boolean status)
|
void |
highlightVertex(int vertexID,
boolean status,
boolean fireListeners)
|
void |
pick(PickViewable result)
|
void |
removeSelectionListener(CADSelectionListener listener)
Remove a selectionListener from this viewable. |
void |
removeSelectionListener(SelectionListener listener)
|
void |
setDomainVisible(java.util.Map<java.lang.Integer,java.lang.Boolean> map)
|
void |
setLineWidth(float lineWidth)
|
void |
setName(java.lang.String name)
|
void |
setSelectionMode(short mode)
Set the picking mode of this viewable. |
void |
setSelectionMode(short mode,
boolean unselectAll)
|
java.lang.String |
toString()
|
void |
unselectAll()
|
| Methods inherited from class org.jcae.viewer3d.ViewableAdaptor |
|---|
domainsChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final javax.media.j3d.PolygonAttributes polygonAttrFront
public static final javax.media.j3d.PolygonAttributes polygonAttrBack
public static final javax.media.j3d.PolygonAttributes polygonAttrNone
public static final short NONE_SELECTION
public static final short DOMAIN_SELECTION
public static final short FACE_SELECTION
public static final short EDGE_SELECTION
public static final short VERTEX_SELECTION
public static final short MULTI_SELECTION
| Constructor Detail |
|---|
public ViewableCAD(CADProvider provider)
| Method Detail |
|---|
public void domainsChangedPerform(int[] domainId)
domainsChangedPerform in class ViewableAdaptordomainId - The ids (Integer) of domains that changed or null to
specify that even ids may have changepublic DomainProvider getDomainProvider()
Viewable
getDomainProvider in interface ViewablegetDomainProvider in class ViewableAdaptorpublic void setDomainVisible(java.util.Map<java.lang.Integer,java.lang.Boolean> map)
setDomainVisible in interface ViewablesetDomainVisible in class ViewableAdaptormap - map domain id (Integer) to visible state (Boolean)public void setSelectionMode(short mode)
mode -
public void setSelectionMode(short mode,
boolean unselectAll)
public void addSelectionListener(CADSelectionListener listener)
public void removeSelectionListener(CADSelectionListener listener)
listener - public void pick(PickViewable result)
pick in interface Viewablepick in class ViewableAdaptorprotected static java.lang.Object getPickUserData(PickViewable result)
public void highlightFace(int faceID,
boolean status)
faceID - status -
public void highlightFace(int faceID,
boolean status,
boolean fireListeners)
faceID - status - fireListeners -
public void highlightEdge(int edgeID,
boolean status)
edgeID - status -
public void highlightEdge(int edgeID,
boolean status,
boolean fireListeners)
edgeID - status - fireListeners -
public void highlightVertex(int vertexID,
boolean status)
public void highlightVertex(int vertexID,
boolean status,
boolean fireListeners)
protected void fireSelectionChanged()
fireSelectionChanged in class ViewableAdaptorpublic CADSelection[] getSelection()
public javax.media.j3d.Node getJ3DNode()
Viewable
getJ3DNode in interface ViewablegetJ3DNode in class ViewableAdaptorpublic void unselectAll()
unselectAll in interface ViewableunselectAll in class ViewableAdaptorpublic void setName(java.lang.String name)
public java.lang.String toString()
toString in class java.lang.Objectpublic void addSelectionListener(SelectionListener listener)
addSelectionListener in interface ViewableaddSelectionListener in class ViewableAdaptorpublic void removeSelectionListener(SelectionListener listener)
removeSelectionListener in interface ViewableremoveSelectionListener in class ViewableAdaptorpublic void setLineWidth(float lineWidth)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||