information.setColor( builder.getRGB( ) );
if ( builder.getRGB( ) == null ) { information.setColor( autoColor ); } else { information.setColor( builder.getRGB( ) ); }
			public void widgetSelected( SelectionEvent e )			{				if ( ( (Button) e.widget ).getSelection( ) )				{					SessionHandleAdapter.getInstance( )							.getCommandStack( )							.startTrans( Messages.getString( "BordersPage.Trans.SelectAllborders" ) );					for ( int i = 0; i < toggleProviders.length; i++ )					{						BorderInfomation information = new BorderInfomation( );						information.setPosition( toggleProviders[i].getPosition( ) );						information.setColor( builder.getRGB( ) );						information.setStyle( (String) styleCombo.getSelectedItem( ) );						information.setWidth( (String) widthCombo.getSelectedItem( ) );						toggles[i].setSelection( true );						previewCanvas.setBorderInfomation( information );						try						{							toggleProviders[i].save( information );						}						catch ( Exception e1 )						{							ExceptionHandler.handle( e1 );						}					}					restoreInfo = (BorderInfomation) toggleProviders[toggleProviders.length - 1].load( );					SessionHandleAdapter.getInstance( )							.getCommandStack( )							.commit( );				}				else				{					boolean reset = true;					RGB oldColor = null;					for ( int i = 0; i < toggleProviders.length; i++ )					{						BorderInfomation info = (BorderInfomation) toggleProviders[i].load( );						oldColor = info.getColor( );						if ( oldColor == null )						{							oldColor = autoColor;						}						if ( !( info.getStyle( ).equals( (String) styleCombo.getSelectedItem( ) ) )								|| !( oldColor.equals( builder.getRGB( ) ) )								|| !( info.getWidth( ).equals( (String) widthCombo.getSelectedItem( ) ) ) )						{							reset = false;							break;						}					}					if ( reset )					{						SessionHandleAdapter.getInstance( )								.getCommandStack( )								.startTrans( Messages.getString( "BordersPage.Trans.UnSelectAllborders" ) );						for ( int i = 0; i < toggleProviders.length; i++ )						{							previewCanvas.removeBorderInfomation( toggleProviders[i].getPosition( ) );							toggles[i].setSelection( false );							try							{								toggleProviders[i].reset( );							}							catch ( Exception e1 )							{								ExceptionHandler.handle( e1 );							}						}						SessionHandleAdapter.getInstance( )								.getCommandStack( )								.commit( );					}					else					{						SessionHandleAdapter.getInstance( )								.getCommandStack( )								.startTrans( Messages.getString( "BordersPage.Trans.SelectAllborders" ) );						for ( int i = 0; i < toggleProviders.length; i++ )						{							BorderInfomation information = new BorderInfomation( );							information.setPosition( toggleProviders[i].getPosition( ) );							information.setColor( builder.getRGB( ) );							information.setStyle( (String) styleCombo.getSelectedItem( ) );							information.setWidth( (String) widthCombo.getSelectedItem( ) );							previewCanvas.setBorderInfomation( information );							restoreInfo = information;							try							{								toggleProviders[i].save( information );							}							catch ( Exception e1 )							{								ExceptionHandler.handle( e1 );							}						}						( (Button) e.widget ).setSelection( true );						SessionHandleAdapter.getInstance( )								.getCommandStack( )								.commit( );					}				}				previewCanvas.redraw( );			}