001/*
002 * Copyright 2010-2015 Institut Pasteur.
003 * 
004 * This file is part of Icy.
005 * 
006 * Icy is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU General Public License as published by
008 * the Free Software Foundation, either version 3 of the License, or
009 * (at your option) any later version.
010 * 
011 * Icy is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014 * GNU General Public License for more details.
015 * 
016 * You should have received a copy of the GNU General Public License
017 * along with Icy. If not, see <http://www.gnu.org/licenses/>.
018 */
019package icy.gui.dialog;
020
021import icy.gui.frame.ActionFrame;
022
023import java.awt.Font;
024import java.awt.GridBagConstraints;
025import java.awt.GridBagLayout;
026import java.awt.Insets;
027
028import javax.swing.ImageIcon;
029import javax.swing.JLabel;
030import javax.swing.SwingConstants;
031
032/**
033 * @deprecated Not anymore used.
034 * @author Stephane
035 */
036@Deprecated
037public class IncompatibleImageFormatDialog extends ActionFrame
038{
039    public IncompatibleImageFormatDialog()
040    {
041        super("Information", true);
042
043        initialize();
044
045        getCancelBtn().setVisible(false);
046
047        setSize(600, 240);
048        addToDesktopPane();
049        center();
050        setVisible(true);
051    }
052
053    private void initialize()
054    {
055        GridBagLayout gridBagLayout = new GridBagLayout();
056        gridBagLayout.columnWidths = new int[] {434, 0};
057        gridBagLayout.rowHeights = new int[] {48, 0, 0};
058        gridBagLayout.columnWeights = new double[] {1.0, Double.MIN_VALUE};
059        gridBagLayout.rowWeights = new double[] {0.0, 1.0, Double.MIN_VALUE};
060        mainPanel.setLayout(gridBagLayout);
061
062        final JLabel lblNewLabel = new JLabel("The selected format is not compatible with your sequence format.");
063        lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 12));
064        lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
065        GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
066        gbc_lblNewLabel.insets = new Insets(0, 0, 5, 0);
067        gbc_lblNewLabel.fill = GridBagConstraints.HORIZONTAL;
068        gbc_lblNewLabel.gridx = 0;
069        gbc_lblNewLabel.gridy = 0;
070        mainPanel.add(lblNewLabel, gbc_lblNewLabel);
071
072        final JLabel lblNewLabel_1 = new JLabel(
073                "<html>Convert your sequence to 8 bits RGB or Grayscale.<br/>You can do it in the <i><b>Sequence operation</b></i> tab, <i><b>rendering</b></i> group :<br/><br/>You can also choose a compatible image format as TIFF.");
074        lblNewLabel_1.setHorizontalTextPosition(SwingConstants.LEADING);
075        lblNewLabel_1.setIconTextGap(22);
076        lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
077        lblNewLabel_1.setIcon(new ImageIcon(IncompatibleImageFormatDialog.class
078                .getResource("/res/image/app/convertrg.png")));
079        GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
080        gbc_lblNewLabel_1.gridx = 0;
081        gbc_lblNewLabel_1.gridy = 1;
082        mainPanel.add(lblNewLabel_1, gbc_lblNewLabel_1);
083    }
084}