Last active
September 12, 2016 19:51
-
-
Save chen-fishbein/4960f0529e25229badd1 to your computer and use it in GitHub Desktop.
CodenameOne Circle Progress Demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("Circle Progress"); | |
hi.setLayout(new BoxLayout(BoxLayout.Y_AXIS)); | |
final CircleProgress p = new CircleProgress(); | |
p.setProgress(100); | |
p.setClockwise(true); | |
p.setStartAngle(CircleProgress.START_9_OCLOCK); | |
hi.add(p); | |
final ArcProgress p2 = new ArcProgress(); | |
p2.setProgress(70); | |
hi.add(p2); | |
final CircleFilledProgress p3 = new CircleFilledProgress(); | |
p3.setProgress(70); | |
hi.add(p3); | |
Slider slider = new Slider(); | |
slider.setEditable(true); | |
slider.addDataChangedListener(new DataChangedListener() { | |
@Override | |
public void dataChanged(int type, int index) { | |
p.setProgress(index); | |
p2.setProgress(index); | |
p3.setProgress(index); | |
} | |
}); | |
hi.add(slider); | |
hi.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Chen for this good example!