/*
* Copyright (C) 2011-2014 GeoForge Project
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.geoforge.guillc.dialog;
import java.awt.event.ActionEvent;
import java.util.logging.Logger;
import javax.swing.JFrame;
import org.geoforge.guillc.button.GfrBtnTxtRndCmdOkXXSmall;
import org.geoforge.guillc.optionpane.GfrOptionPaneAbs;
import org.geoforge.guillc.handler.IGfrHandlerListenerPanelDialog;
import org.geoforge.guillc.panel.GfrPnlSelEdtIoChooserFileReaderDiskAbs;
import org.geoforge.guillc.panel.GfrPnlSelEdtIoChooserFileReaderDiskCsv;
import org.geoforge.lang.handler.IGfrHandlerEventListenerThreadJobProgress;
import org.geoforge.java.util.logging.filehandler.FileHandlerLogger;
/**
*
* @author bgwilliams71
*
* email: bgwilliams71_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*/
public class GfrDlgIoFixRdrHeadSheetCsv extends GfrDlgIoFixRdrHeadSheetAbs
{
// ----
// begin: instantiate logger for this class
final private static Logger _LOGGER_ = Logger.getLogger(GfrDlgIoFixRdrHeadSheetCsv.class.getName());
static
{
GfrDlgIoFixRdrHeadSheetCsv._LOGGER_.addHandler(FileHandlerLogger.s_getInstance());
}
// end: instantiate logger for this class
// ----
public GfrDlgIoFixRdrHeadSheetCsv(
JFrame frmOwner,
String strSentence,
int intColumnMin)
{
super(
frmOwner,
strSentence,
intColumnMin);
super._pnlIoChooser = new GfrPnlSelEdtIoChooserFileReaderDiskCsv(
(IGfrHandlerListenerPanelDialog) this);
this._pnlIoChooser.setLengths(
INT_WIDTH_LABEL, INT_WIDTH_CONTENT, INT_WIDTH_RIGHT);
super.setLengths(
INT_WIDTH_LABEL,
INT_WIDTH_CONTENT,
INT_WIDTH_RIGHT);
((GfrPnlSelEdtIoChooserFileReaderDiskAbs)this._pnlIoChooser).setWidth(240);
}
@Override
public void actionPerformed(ActionEvent e)
{
if (! (e.getSource() instanceof GfrBtnTxtRndCmdOkXXSmall))
{
super.actionPerformed(e);
return;
}
super._dlgProgress = new GfrDlgPgsRdrHeadSheetCsv(
null,
super.getPath(),
(IGfrHandlerEventListenerThreadJobProgress) this,
super._intColumnMin
);
if (! super._dlgProgress.init())
{
String str = "! super._dlgProgress.init()";
GfrDlgIoFixRdrHeadSheetCsv._LOGGER_.warning(str);
GfrOptionPaneAbs.s_showDialogWarning(null, "Failed to open progress dialog");
return;
}
super._centerDialogProgress();
}
}