Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10178
Modified Files:
AbstractView.java
Log Message:
implemented selection of front or back space-label of a surface
Index: AbstractView.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** AbstractView.java 1 Nov 2005 16:27:39 -0000 1.51
--- AbstractView.java 3 Nov 2005 11:08:50 -0000 1.52
***************
*** 163,167 ****
/** The list of clipping planes */
private List clippingPlanes;
!
static {
setTransparency(100);
--- 163,173 ----
/** The list of clipping planes */
private List clippingPlanes;
!
! /** Indicating if the front space-label is selected */
! private boolean frontLabelSelect = false;
!
! /** Indicating if the back space-label is selected */
! private boolean backLabelSelect = false;
!
static {
setTransparency(100);
***************
*** 443,448 ****
}
}
!
!
/**
* Put labels on a Surface
--- 449,471 ----
}
}
! /**
! * Called when a space-label corresponding to the front of a Surface is selected.
! */
! public void selectFrontLabel() {
! frontLabelSelect = true;
! }
! /**
! * Called when a space-label corresponding to the back of a Surface is selected.
! */
! public void selectBackLabel() {
! backLabelSelect = true;
! }
! /**
! * De selects the currently selected label.
! */
! public void deSelectLabel() {
! backLabelSelect = false;
! frontLabelSelect = false;
! }
/**
* Put labels on a Surface
***************
*** 503,523 ****
popName(gl);
} else {
//draw the front domain name
if (frontDomain instanceof FunctionalSpace) {
! gl.glColor3d(0.2, 0.2, 0.5);
} else if (frontDomain instanceof ConstructionSpace) {
! gl.glColor3d(0.8, 0.2, 0.4);
} else {
! gl.glColor3d(0.2, 0.2, 0.2);
}
drawString(frontTextAnchor.getX(), frontTextAnchor.getY(), frontName);
//draw the back domain name
if (backDomain instanceof FunctionalSpace) {
! gl.glColor3d(0.2, 0.2, 0.5);
} else if (backDomain instanceof ConstructionSpace) {
! gl.glColor3d(0.8, 0.2, 0.4);
} else {
! gl.glColor3d(0.2, 0.2, 0.2);
}
drawString(backTextAnchor.getX(), backTextAnchor.getY(), backName);
--- 526,554 ----
popName(gl);
} else {
+ double fcb = 0;
+ if (frontLabelSelect) {
+ fcb = 0.3;
+ }
//draw the front domain name
if (frontDomain instanceof FunctionalSpace) {
! gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.5 + fcb);
} else if (frontDomain instanceof ConstructionSpace) {
! gl.glColor3d(0.8 + fcb, 0.2 + fcb, 0.4 + fcb);
} else {
! gl.glColor3d(0.2 + fcb, 0.2 + fcb, 0.2 + fcb);
}
drawString(frontTextAnchor.getX(), frontTextAnchor.getY(), frontName);
+ double bcb = 0;
+ if (backLabelSelect) {
+ bcb = 0.3;
+ }
//draw the back domain name
if (backDomain instanceof FunctionalSpace) {
! gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.5 + bcb);
} else if (backDomain instanceof ConstructionSpace) {
! gl.glColor3d(0.8 + bcb, 0.2 + bcb, 0.4 + bcb);
} else {
! gl.glColor3d(0.2 + bcb, 0.2 + bcb, 0.2 + bcb);
}
drawString(backTextAnchor.getX(), backTextAnchor.getY(), backName);
|