Java Reference
In-Depth Information
h.25 functIon for button press or release
events
//Button action, press or release
private void ButtonAct(Point3f object, TransformGroup trans, boolean tag, float span)
{
if (tag)
{
setPosition(trans, new Point3f(object.x, object.y, object.z-span));
}
else
{
setPosition(trans, new Point3f(object.x, object.y, object.z));
}
}
h.26 maIn mouse release event functIons for
knobs, clIps, slIders and buttons
private void MouseRelease(int obj)
{
switch (obj)
{
//----------------------------------------- for the oscilloscope
case 1101:
osci_knobangle[0] = RotationPosition(osci_knobangle[0], osciknob1_circleposi.length,
osciknob1_circleposi);
setRotationZ(osciknobTrans[0], osci_knobangle[0]);
if (tcp_osciservice!=null)
{
if (osci_knobangle[0]==osciknob1_circleposi[0])
{
tcp_osciservice.SendCmd(“ch1position 5”);
positionch1 = 0;
}
else if (osci_knobangle[0]==osciknob1_circleposi[1])
{
tcp_osciservice.SendCmd(“ch1position 4”);
positionch1 = 1;
}
else if (osci_knobangle[0]==osciknob1_circleposi[2])
{
tcp_osciservice.SendCmd(“ch1position 3”);
positionch1 = 2;
}
else if (osci_knobangle[0]==osciknob1_circleposi[3])
{
tcp_osciservice.SendCmd(“ch1position 2”);
positionch1 = 3;
Search WWH ::




Custom Search