From ad276b6660fe60f16c566d879efbf15632474437 Mon Sep 17 00:00:00 2001 From: GoToLoop Date: Sun, 17 Jul 2016 11:26:26 -0300 Subject: [PATCH] Update Accordion.java --- src/controlP5/Accordion.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controlP5/Accordion.java b/src/controlP5/Accordion.java index 7df1780..fb9ccb2 100755 --- a/src/controlP5/Accordion.java +++ b/src/controlP5/Accordion.java @@ -101,7 +101,7 @@ public class Accordion extends ControlGroup< Accordion > { */ public Accordion updateItems( ) { setWidth( _myWidth ); - if ( controllers.size( ) != 0 ) synchronized ( controllers.get( ) ) { + synchronized ( controllers.get( ) ) { int n = 0; for ( final ControllerInterface< ? > ci : controllers.get( ) ) if ( ci instanceof ControlGroup< ? > ) { @@ -121,7 +121,7 @@ public class Accordion extends ControlGroup< Accordion > { */ public Accordion setMinItemHeight( int theHeight ) { minHeight = theHeight; - if ( controllers.size( ) != 0 ) synchronized ( controllers.get( ) ) { + synchronized ( controllers.get( ) ) { for ( final ControllerInterface< ? > ci : controllers.get( ) ) if ( ci instanceof ControlGroup< ? > ) { final ControlGroup< ? > cg = ( ControlGroup< ? > ) ci; @@ -138,7 +138,7 @@ public class Accordion extends ControlGroup< Accordion > { public Accordion setItemHeight( int theHeight ) { itemHeight = theHeight; - if ( controllers.size( ) != 0 ) synchronized ( controllers.get( ) ) { + synchronized ( controllers.get( ) ) { for ( final ControllerInterface< ? > ci : controllers.get( ) ) if ( cg instanceof ControlGroup< ? > ) ( ( ControlGroup< ? > ) ci ).setBackgroundHeight( itemHeight ); @@ -151,7 +151,7 @@ public class Accordion extends ControlGroup< Accordion > { } @Override public T setWidth( final int theWidth ) { - if ( controllers.size( ) != 0 ) synchronized ( controllers.get( ) ) { + synchronized ( controllers.get( ) ) { for ( ControllerInterface< ? > ci : controllers.get( ) ) if ( cg instanceof ControlGroup< ? > ) ( ( ControlGroup< ? > ) ci ).setWidth( theWidth ); @@ -193,7 +193,7 @@ public class Accordion extends ControlGroup< Accordion > { @SafeVarargs public final T open( final int... theIds ) { if ( theIds == null || theIds[ 0 ] == -1 ) return open( ); - if ( controllers.size( ) != 0 ) synchronized ( controllers.get( ) ) { + synchronized ( controllers.get( ) ) { int n = 0 , i = 0; for ( final ControllerInterface< ? > ci : controllers.get( ) ) if ( ci instanceof ControlGroup< ? > ) { @@ -213,7 +213,7 @@ public class Accordion extends ControlGroup< Accordion > { @SafeVarargs public final T close( final int... theIds ) { if ( theIds == null || theIds[ 0 ] == -1 ) return close( ); - if ( controllers.size( ) != 0 ) synchronized ( controllers.get( ) ) { + synchronized ( controllers.get( ) ) { int n = 0 , i = 0; for ( final ControllerInterface< ? > ci : controllers.get( ) ) if ( ci instanceof ControlGroup< ? > ) {