1. Modify the attached FBFaceplate.java as necessary for the new
display, save and compile it.
2. Move the new FBFaceplate.class file to the FBDK/lib/fb/rt/process
subdirectory.
To do a different tank rendering, you would do the following:
1. Add a new enumerated value, say TANK, to VSTYLE and compile it (The
new VSTYLE.class will be in FBDK/lib/fb/rt/mva).
2. Modify the attached FBMechanismView.java by adding a VSTYLE.TANK
case to the paintView(Graphics, int, int) method which invokes a new
paintTank(Graphics, int, int) method.
3. Compile and copy the new FBMechanismView.class file to FBDK/lib/fb/rt/mva.
Not easy - recommended only for the experienced and brave.
--
Best regards,
Jim Christensen
Thank you for your help, making this change in your FBFaceplate.java:
/** The set point slider. */
//public JSlider sp = new JSlider(0, 100);
public FBBar sp = new FBBar();
we are obtaining the following errors:
Exception in thread "Thread-10" java.lang.NoSuchFieldError: sp
at fb.rt.process.FACEPLATE.service_INIT(FACEPLATE.java:97)
at fb.rt.INITEvent.serviceEvent(INITEvent.java:36)
at fb.rt.EventOutput.serviceEvent(EventOutput.java:80)
at fb.rt.mva.XABS_VIEW.service_INIT(XABS_VIEW.java:93)
at fb.rt.INITEvent.serviceEvent(INITEvent.java:36)
at fb.rt.EventOutput.serviceEvent(EventOutput.java:80)
is it necessary to modify another file? is it necessary to add/modify
a file between FBFaceplate.java and FACEPLATE.java ?
On the other hand, do you mind borrowing me FBBar.java to understand
this kind of relation between graphic code in java and FunctionBlock
java code.
Bests regards.
Attached is the FBBar.java code.
--
Best regards,
Jim Christensen