/*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
package org.geoforge.guillc.dialog;
import java.awt.Frame;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.event.ChangeListener;
import org.geoforge.guillc.dialog.GfrDlgTabsSettingsDspActionAllObjAbs;
import org.geoforge.guillc.tabbedpane.GfrTabCntSetInfAllObjImg;
/**
*
* @author bantchao@gmail.com
*/
public class GfrDlgTabsSettingsDspActionAllObjImg extends GfrDlgTabsSettingsDspActionAllObjAbs
{
public GfrDlgTabsSettingsDspActionAllObjImg(
Frame frmOwner,
String strPathAbs,
String strWhat) throws Exception
{
super(
frmOwner,
strWhat);
ImageIcon iin = new ImageIcon(strPathAbs);
int intWidth = iin.getIconWidth();
if(intWidth < 150)
intWidth = 150;
if(intWidth > 800)
intWidth = 800;
intWidth += 50;
int intHeight = iin.getIconHeight();
if(intHeight < 100)
intHeight = 100;
if(intHeight > 600)
intHeight = 600;
intHeight += 50;
super._tabContents = new GfrTabCntSetInfAllObjImg(
(ActionListener) this,
(ChangeListener) this,
iin,
intWidth,
intHeight);
}
}