@@ -62,50 +62,40 @@ public Container createContentPane() {
6262 "Button is the base class for several UI" ,
6363 "widgets allowing clickability. It has 3 States: rollover, pressed and the default state. Button can also " +
6464 "have an Action Listener that react when the button is clicked or handle actions via a Command.Button UIID by " +
65- "default." , e ->{
66- showDemo ("Buttons" , createButtonsDemo ());
67- }));
65+ "default." , e -> showDemo ("Buttons" , createButtonsDemo ())));
6866
6967 demoContainer .add (createComponent (getGlobalResources ().getImage ("span-button.png" ),
7068 "Span Buttons" ,
7169 "A complex button similar to MultiButton" ,
7270 "that breaks lines automatically and looks like a regular button(more or less). Unlike the multi button the " +
73- "span buttons has the UIID style of a button." , e ->{
74- showDemo ("Span Buttons" , createSpanButtonsDemo ());
75- }));
71+ "span buttons has the UIID style of a button." ,
72+ e -> showDemo ("Span Buttons" , createSpanButtonsDemo ())));
7673
7774 demoContainer .add (createComponent (getGlobalResources ().getImage ("multi-buttons.png" ),
7875 "Multi Buttons" ,
7976 "A powerful button like component that" ,
8077 "allows multiple rows/and an icon to be added every row/icon can have its own UIID.\n \n Internally the " +
81- "multi-button is a container with a lead component. Up to 4 rows are supported." , e ->{
82- showDemo ("Multi Buttons" , createMultiButtonsDemo ());
83- }));
78+ "multi-button is a container with a lead component. Up to 4 rows are supported." , e -> showDemo ("Multi Buttons" , createMultiButtonsDemo ())));
8479
8580 demoContainer .add (createComponent (getGlobalResources ().getImage ("scale-image-label.png" ),
8681 "Scale Image Button" ,
8782 "Button that simplifies the usage of scale to" ,
8883 "fill/fit. This is effectively equivalent to just setting the style image on a button but more convenient " +
89- "for some special circumstances.\n \n One major difference is that preferred size equals the image in this case." , e ->{
90- showDemo ("Scale Image Button" , createScaleImageButton ());
91- }));
84+ "for some special circumstances.\n \n One major difference is that preferred size equals the image in this case." ,
85+ e -> showDemo ("Scale Image Button" , createScaleImageButton ())));
9286
9387 demoContainer .add (createComponent (getGlobalResources ().getImage ("floating-action-button.png" ),
9488 "Floating Action Button" ,
9589 "Floating action buttons are a material design" ,
9690 "element used to promote a special action in a form. They are represented as a floating circle with a " +
97- "flat icon floating above the UI typically in the bottom right area." , e ->{
98- showDemo ("Floating Action Button" , createFloatingActionButtonDemo ());
99- }));
91+ "flat icon floating above the UI typically in the bottom right area." , e -> showDemo ("Floating Action Button" , createFloatingActionButtonDemo ())));
10092
10193 demoContainer .add (createComponent (getGlobalResources ().getImage ("share-button.png" ),
10294 "Share Button" ,
10395 "The share button allows sharing a String" ,
10496 "or an image either thru the defined sharing services or thru native OS sharing support. On Android & iOS the " +
10597 "native sharing API is invoked for this class.\n \n The code below demonstrates image sharing, notice that an " +
106- "image must be stored using the FileSystemStorage API and shouldn't use a different API like Storage." , e ->{
107- showDemo ("Share Button" , createShareButtonDemo ());
108- }));
98+ "image must be stored using the FileSystemStorage API and shouldn't use a different API like Storage." , e -> showDemo ("Share Button" , createShareButtonDemo ())));
10999 return demoContainer ;
110100 }
111101
@@ -138,9 +128,9 @@ private Container createSpanButtonsDemo(){
138128 button .setUIID ("DemoButton" );
139129 button .addActionListener (e -> ToastBar .showInfoMessage ("Button was pressed" ));
140130
141- Container SpanLabelContainer = BoxLayout .encloseY (new Label ("SpanButton:" , "DemoLabel" ), button );
142- SpanLabelContainer .setUIID ("ButtonContainer" );
143- return BoxLayout .encloseY (SpanLabelContainer );
131+ Container spanLabelContainer = BoxLayout .encloseY (new Label ("SpanButton:" , "DemoLabel" ), button );
132+ spanLabelContainer .setUIID ("ButtonContainer" );
133+ return BoxLayout .encloseY (spanLabelContainer );
144134 }
145135
146136 private Container createMultiButtonsDemo (){
@@ -272,7 +262,7 @@ private Container createFloatingActionButtonDemo(){
272262 Container tasksContainer = new Container (new BoxLayout (BoxLayout .Y_AXIS ));
273263 tasksContainer .setScrollableY (true );
274264 FloatingActionButton addNew = FloatingActionButton .createFAB (FontImage .MATERIAL_ADD , "RedFabDemo" );
275- badge = FloatingActionButton .createBadge (String . valueOf ( "0" ) );
265+ badge = FloatingActionButton .createBadge ("0" );
276266
277267 FloatingActionButton greenButton = addNew .createSubFAB (FontImage .MATERIAL_ADD_TASK , "" );
278268 greenButton .setUIID ("GreenFabDemo" );
@@ -283,7 +273,7 @@ private Container createFloatingActionButtonDemo(){
283273 Command cancel = new Command ("Cancel" );
284274 if (Dialog .show ("Enter Note" , BoxLayout .encloseY (header , body ), ok , cancel ) == ok && header .getText ().length () != 0 ){
285275 tasksContainer .add (createNote (header .getText (), body .getText (), tasksContainer , true ));
286- int taskCount = Integer .valueOf (badge .getText ()) + 1 ;
276+ int taskCount = Integer .parseInt (badge .getText ()) + 1 ;
287277 badge .setText (String .valueOf (taskCount ));
288278 tasksContainer .revalidate ();
289279 }
@@ -298,7 +288,7 @@ private Container createFloatingActionButtonDemo(){
298288 Command cancel = new Command ("Cancel" );
299289 if (Dialog .show ("Enter Note" , BoxLayout .encloseY (header , body ), ok , cancel ) == ok && header .getText ().length () != 0 ){
300290 tasksContainer .add (createNote (header .getText (), body .getText (), tasksContainer , false ));
301- int taskCount = Integer .valueOf (badge .getText ()) + 1 ;
291+ int taskCount = Integer .parseInt (badge .getText ()) + 1 ;
302292 badge .setText (String .valueOf (taskCount ));
303293 tasksContainer .revalidate ();
304294 }
@@ -329,7 +319,7 @@ private Component createNote(String header, String body, Container notes, boolea
329319 SwipeableContainer note = new SwipeableContainer (deleteButton , noteContainer );
330320 deleteButton .addActionListener (e ->{
331321 notes .removeComponent (note );
332- int taskCount = Integer .valueOf (badge .getText ()) - 1 ;
322+ int taskCount = Integer .parseInt (badge .getText ()) - 1 ;
333323 badge .setText (String .valueOf (taskCount ));
334324 notes .revalidate ();
335325 });
0 commit comments