ExportConfirmationWizardPanel.java :  » Database-Client » DBBrowser » org » dbbrowser » ui » helper » exporthelper » wizard » panel » Java Open Source

Java Open Source » Database Client » DBBrowser 
DBBrowser » org » dbbrowser » ui » helper » exporthelper » wizard » panel » ExportConfirmationWizardPanel.java
package org.dbbrowser.ui.helper.exporthelper.wizard.panel;

import infrastructure.internationalization.InternationalizationManager;

import java.awt.BorderLayout;
import java.util.Iterator;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.dbbrowser.ui.UIControllerForQueries;
import org.dbbrowser.ui.helper.exporthelper.wizard.WizardState;

public class ExportConfirmationWizardPanel extends AbstractWizardPanel
{
  private static final long serialVersionUID = UIControllerForQueries.version;  
  private static final String PANEL_TITLE = InternationalizationManager.getInstance().getMessage( "dbbrowser-export-wizard", "dbbrowser-ui-export-wizard-confirmation-message", null);;
  private JPanel panel = new JPanel();
  
  /**
   * Constrcuter
   * @param wizard
   */
    public ExportConfirmationWizardPanel()
    {
        super(PANEL_TITLE);
    }
    
    public void setupPanel()
    {
      panel.setBorder( BorderFactory.createEtchedBorder() );
      panel.setLayout( new BoxLayout(panel, BoxLayout.Y_AXIS) );
        
        Iterator i = WizardState.getInstance().getWizardState().keySet().iterator();
        while(i.hasNext())
        {
          Object key = i.next();
          Object value = WizardState.getInstance().getState( key );
          JLabel label = new JLabel(key.toString() + ": " + value.toString());
          panel.add( label );
        }
        
      this.add( panel, BorderLayout.CENTER );
    } 
    
    public void repaint()
    {
      if( panel != null )
      {
        panel.removeAll();
        setupPanel();
      }
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.