package org.reldb.dbrowser.ui.content.conversion;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ToolBar;
import org.reldb.dbrowser.ui.DbTab;
import org.reldb.dbrowser.ui.preferences.PreferenceChangeAdapter;
import org.reldb.dbrowser.ui.preferences.PreferenceChangeEvent;
import org.reldb.dbrowser.ui.preferences.PreferenceChangeListener;
import org.reldb.dbrowser.ui.preferences.PreferencePageGeneral;
import org.reldb.dbrowser.ui.preferences.Preferences;

public class DbTabContentConversion extends Composite {
    
	private Label conversion;
	
    private PreferenceChangeListener preferenceChangeListener;
	
	public DbTabContentConversion(DbTab parentTab, String dbURL, Composite contentParent) {
		super(contentParent, SWT.None);
		setLayout(new FormLayout());

		ToolBar toolBar = new ToolBar(this, SWT.None);
		FormData fd_toolBar = new FormData();
		fd_toolBar.left = new FormAttachment(0);
		fd_toolBar.top = new FormAttachment(0);
		fd_toolBar.right = new FormAttachment(100);
		toolBar.setLayoutData(fd_toolBar);
		
		conversion = new Label(this, SWT.None);
		conversion.setText("Conversion content goes here.");
		FormData fd_composite = new FormData();
		fd_composite.left = new FormAttachment(0);
		fd_composite.top = new FormAttachment(toolBar);
		fd_composite.right = new FormAttachment(100);
		fd_composite.bottom = new FormAttachment(100);
		conversion.setLayoutData(fd_composite);
		
		setupIcons();
		
		preferenceChangeListener = new PreferenceChangeAdapter("DbTabContentConversion") {
			@Override
			public void preferenceChange(PreferenceChangeEvent evt) {
				setupIcons();
			}
		};		
		Preferences.addPreferenceChangeListener(PreferencePageGeneral.LARGE_ICONS, preferenceChangeListener);
	}

	public void dispose() {
		Preferences.removePreferenceChangeListener(PreferencePageGeneral.LARGE_ICONS, preferenceChangeListener);
		super.dispose();
	}
	
	private void setupIcons() {
	}

	public void notifyIconSizeChange() {
		setupIcons();
	}

	public void redisplayed() {
	}

}

@@ -2185,39 +2185,6 @@
 %09%7D%0A%0A
-%09public void redisplayed() %7B%0A%09%7D%0A%0A
 %7D%0A

Remove redundant method.