Example usage for javax.swing JOptionPane INFORMATION_MESSAGE

List of usage examples for javax.swing JOptionPane INFORMATION_MESSAGE

Introduction

In this page you can find the example usage for javax.swing JOptionPane INFORMATION_MESSAGE.

Prototype

int INFORMATION_MESSAGE

To view the source code for javax.swing JOptionPane INFORMATION_MESSAGE.

Click Source Link

Document

Used for information messages.

Usage

From source file:edu.harvard.i2b2.query.QueryListNamesClient.java

public static String sendQueryRequestSOAP(String XMLstr) {
    try {//from   w w  w . java2  s  .  com

        HttpTransportProperties.Authenticator basicAuthentication = new HttpTransportProperties.Authenticator();

        basicAuthentication.setUsername(UserInfoBean.getInstance().getUserName());
        basicAuthentication.setPassword(UserInfoBean.getInstance().getUserPassword());

        OMElement payload = getQueryPayLoad(XMLstr);
        Options options = new Options();

        // options.setProperty(HTTPConstants.PROXY, proxyProperties);
        targetEPR = new EndpointReference(getCRCNavigatorQueryProcessorServiceName());
        options.setTo(targetEPR);
        options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        options.setTimeOutInMilliSeconds(2000);
        ConfigurationContext configContext = ConfigurationContextFactory
                .createConfigurationContextFromFileSystem(null, null);

        // Blocking invocation
        ServiceClient sender = new ServiceClient(configContext, null);
        sender.setOptions(options);

        OMElement result = sender.sendReceive(payload);
        //System.out.println("Response XML: "+result.toString());
        return result.toString();
    } catch (AxisFault axisFault) {
        axisFault.printStackTrace();
        if (axisFault.getMessage().indexOf("No route to host") >= 0) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(null,
                            "Unable to make a connection to the remote server,\n this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        } else if (axisFault.getMessage().indexOf("Read timed out") >= 0) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(null,
                            "Unable to obtain a response from the remote server, this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        }
        return null;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}

From source file:edu.harvard.i2b2.query.QueryRequestClient.java

public static String sendQueryRequestSOAP(String XMLstr) {
    try {/*from   www . j  a  va2  s.com*/

        HttpTransportProperties.Authenticator basicAuthentication = new HttpTransportProperties.Authenticator();

        basicAuthentication.setUsername(UserInfoBean.getInstance().getUserName());
        basicAuthentication.setPassword(UserInfoBean.getInstance().getUserPassword());

        OMElement payload = getQueryPayLoad(XMLstr);
        Options options = new Options();

        // options.setProperty(HTTPConstants.PROXY, proxyProperties);
        targetEPR = new EndpointReference(getCRCNavigatorQueryProcessorServiceName());
        options.setTo(targetEPR);
        options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        options.setTimeOutInMilliSeconds(200000);
        ConfigurationContext configContext = ConfigurationContextFactory
                .createConfigurationContextFromFileSystem(null, null);

        // Blocking invocation
        ServiceClient sender = new ServiceClient(configContext, null);
        sender.setOptions(options);

        OMElement result = sender.sendReceive(payload);
        //System.out.println(result.toString());
        return result.toString();
    } catch (AxisFault axisFault) {
        axisFault.printStackTrace();
        if (axisFault.getMessage().indexOf("No route to host") >= 0) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(null,
                            "Unable to make a connection to the remote server,\n this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        } else if (axisFault.getMessage().indexOf("Read timed out") >= 0) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(null,
                            "Unable to obtain a response from the remote server, this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        }
        return null;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}

From source file:edu.harvard.i2b2.previousquery.QueryListNamesClient.java

public static String sendQueryRequestSOAP(String XMLstr) {
    try {/*w  w  w .j  a v  a2  s.c o  m*/
        HttpTransportProperties.Authenticator basicAuthentication = new HttpTransportProperties.Authenticator();
        basicAuthentication.setUsername(UserInfoBean.getInstance().getUserName());
        basicAuthentication.setPassword(UserInfoBean.getInstance().getUserPassword());

        OMElement payload = getQueryPayLoad(XMLstr);
        Options options = new Options();

        // options.setProperty(HTTPConstants.PROXY, proxyProperties);
        targetEPR = new EndpointReference(getCRCNavigatorQueryProcessorServiceName());
        options.setTo(targetEPR);
        options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        options.setTimeOutInMilliSeconds(200000);
        ConfigurationContext configContext = ConfigurationContextFactory
                .createConfigurationContextFromFileSystem(null, null);

        // Blocking invocation
        ServiceClient sender = new ServiceClient(configContext, null);
        sender.setOptions(options);

        OMElement result = sender.sendReceive(payload);
        //System.out.println("Response XML: "+result.toString());
        return result.toString();
    } catch (AxisFault axisFault) {
        axisFault.printStackTrace();
        if (axisFault.getMessage().indexOf("No route to host") >= 0
                || axisFault.getMessage().indexOf("Connection refused") >= 0) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(null,
                            "Unable to make a connection to the remote server,\n this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        } else if (axisFault.getMessage().indexOf("Read timed out") >= 0) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(null,
                            "Unable to obtain a response from the remote server, this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        }
        log.error("CellDown");
        return null;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}

From source file:net.pms.encoders.AviSynthMEncoder.java

@Override
public JComponent config() {
    FormLayout layout = new FormLayout("left:pref, 0:grow",
            "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 12dlu, p, 3dlu, 0:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.border(Borders.EMPTY);//  w  w w . j av  a2s.co m
    builder.opaque(false);

    CellConstraints cc = new CellConstraints();

    JComponent cmp = builder.addSeparator(Messages.getString("NetworkTab.5"), cc.xyw(2, 1, 1));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    multithreading = new JCheckBox(Messages.getString("MEncoderVideo.35"),
            configuration.getAvisynthMultiThreading());
    multithreading.setContentAreaFilled(false);
    multithreading.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setAvisynthMultiThreading((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(GuiUtil.getPreferredSizeComponent(multithreading), cc.xy(2, 3));

    interframe = new JCheckBox(Messages.getString("AviSynthMEncoder.13"),
            configuration.getAvisynthInterFrame());
    interframe.setContentAreaFilled(false);
    interframe.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            configuration.setAvisynthInterFrame(interframe.isSelected());
            if (configuration.getAvisynthInterFrame()) {
                JOptionPane.showMessageDialog(
                        SwingUtilities.getWindowAncestor((Component) PMS.get().getFrame()),
                        Messages.getString("AviSynthMEncoder.16"), Messages.getString("Dialog.Information"),
                        JOptionPane.INFORMATION_MESSAGE);
            }
        }
    });
    builder.add(GuiUtil.getPreferredSizeComponent(interframe), cc.xy(2, 5));

    interframegpu = new JCheckBox(Messages.getString("AviSynthMEncoder.15"),
            configuration.getAvisynthInterFrameGPU());
    interframegpu.setContentAreaFilled(false);
    interframegpu.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setAvisynthInterFrameGPU((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(GuiUtil.getPreferredSizeComponent(interframegpu), cc.xy(2, 7));

    convertfps = new JCheckBox(Messages.getString("AviSynthMEncoder.3"), configuration.getAvisynthConvertFps());
    convertfps.setContentAreaFilled(false);
    convertfps.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
            configuration.setAvisynthConvertFps((e.getStateChange() == ItemEvent.SELECTED));
        }
    });
    builder.add(GuiUtil.getPreferredSizeComponent(convertfps), cc.xy(2, 9));

    String aviSynthScriptInstructions = Messages.getString("AviSynthMEncoder.4")
            + Messages.getString("AviSynthMEncoder.5") + Messages.getString("AviSynthMEncoder.6")
            + Messages.getString("AviSynthMEncoder.7") + Messages.getString("AviSynthMEncoder.8");
    JTextArea aviSynthScriptInstructionsContainer = new JTextArea(aviSynthScriptInstructions);
    aviSynthScriptInstructionsContainer.setEditable(false);
    aviSynthScriptInstructionsContainer.setBorder(BorderFactory.createEtchedBorder());
    aviSynthScriptInstructionsContainer.setBackground(new Color(255, 255, 192));
    aviSynthScriptInstructionsContainer.setBorder(
            BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(new Color(130, 135, 144)),
                    BorderFactory.createEmptyBorder(3, 5, 3, 5)));
    builder.add(aviSynthScriptInstructionsContainer, cc.xy(2, 11));

    String clip = configuration.getAvisynthScript();
    if (clip == null) {
        clip = "";
    }
    StringBuilder sb = new StringBuilder();
    StringTokenizer st = new StringTokenizer(clip, PMS.AVS_SEPARATOR);
    int i = 0;
    while (st.hasMoreTokens()) {
        if (i > 0) {
            sb.append("\n");
        }
        sb.append(st.nextToken());
        i++;
    }
    textArea = new JTextArea(sb.toString());
    textArea.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            StringBuilder sb = new StringBuilder();
            StringTokenizer st = new StringTokenizer(textArea.getText(), "\n");
            int i = 0;
            while (st.hasMoreTokens()) {
                if (i > 0) {
                    sb.append(PMS.AVS_SEPARATOR);
                }
                sb.append(st.nextToken());
                i++;
            }
            configuration.setAvisynthScript(sb.toString());
        }
    });

    JScrollPane pane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    pane.setPreferredSize(new Dimension(500, 350));
    builder.add(pane, cc.xy(2, 13));

    configuration.addConfigurationListener(new ConfigurationListener() {
        @Override
        public void configurationChanged(ConfigurationEvent event) {
            if (event.getPropertyName() == null) {
                return;
            }
            if ((!event.isBeforeUpdate())
                    && event.getPropertyName().equals(PmsConfiguration.KEY_GPU_ACCELERATION)) {
                interframegpu.setEnabled(configuration.isGPUAcceleration());
            }
        }
    });

    return builder.getPanel();
}

From source file:com.tiempometa.muestradatos.JProgramTags.java

public JProgramTags(Frame owner, boolean modal) {
    super(owner, modal);
    initComponents();/*w ww  .j  av a2  s  .  com*/
    logger.debug("Adding self to tag read listeners");
    ReaderContext.addReadingListener(this);
    tagReadTable.setModel(tagTableModel);
    tagReadTable.setAutoCreateRowSorter(true);
    TableRowSorter<TableModel> sorter = new TableRowSorter<>(tagReadTable.getModel());
    sorter.setComparator(0, new BibComparator());
    tagReadTable.setRowSorter(sorter);
    List<Rfid> rfidList;
    try {
        rfidList = rfidDao.findAll();
        for (Rfid rfid : rfidList) {
            totalRfidMap.put(rfid.getRfid().toUpperCase(), rfid);
        }
        JOptionPane.showMessageDialog(this, "Se cargaron " + rfidList.size() + " tags de la base de datos",
                "Cantidad de tags disponibles", JOptionPane.INFORMATION_MESSAGE);
    } catch (SQLException e) {
        JOptionPane.showMessageDialog(this,
                "No se pudo cargar la lista de tags a programar.\n" + e.getMessage(), "Error de base de datos",
                JOptionPane.ERROR_MESSAGE);
    }
}

From source file:net.pms.newgui.Wizard.java

public static void run(final PmsConfiguration configuration) {
    // Total number of questions
    int numberOfQuestions = Platform.isMac() ? 4 : 5;

    // The current question number
    int currentQuestionNumber = 1;

    String status = new StringBuilder().append(Messages.getString("Wizard.2")).append(" %d ")
            .append(Messages.getString("Wizard.4")).append(" ").append(numberOfQuestions).toString();

    Object[] okOptions = { Messages.getString("Dialog.OK") };

    Object[] yesNoOptions = { Messages.getString("Dialog.YES"), Messages.getString("Dialog.NO") };

    Object[] networkTypeOptions = { Messages.getString("Wizard.8"), Messages.getString("Wizard.9"),
            Messages.getString("Wizard.10") };

    if (!Platform.isMac()) {
        // Ask if they want UMS to start minimized
        int whetherToStartMinimized = JOptionPane.showOptionDialog(null, Messages.getString("Wizard.3"),
                String.format(status, currentQuestionNumber++), JOptionPane.YES_NO_OPTION,
                JOptionPane.QUESTION_MESSAGE, null, yesNoOptions, yesNoOptions[1]);

        if (whetherToStartMinimized == JOptionPane.YES_OPTION) {
            configuration.setMinimized(true);
        } else if (whetherToStartMinimized == JOptionPane.NO_OPTION) {
            configuration.setMinimized(false);
        }/*from  w  w w .  j a  v a 2  s. c  o  m*/
    }

    // Ask if their network is wired, etc.
    int networkType = JOptionPane.showOptionDialog(null, Messages.getString("Wizard.7"),
            String.format(status, currentQuestionNumber++), JOptionPane.YES_NO_CANCEL_OPTION,
            JOptionPane.QUESTION_MESSAGE, null, networkTypeOptions, networkTypeOptions[1]);

    switch (networkType) {
    case JOptionPane.YES_OPTION:
        // Wired (Gigabit)
        configuration.setMaximumBitrate("0");
        configuration.setMPEG2MainSettings("Automatic (Wired)");
        configuration.setx264ConstantRateFactor("Automatic (Wired)");
        break;
    case JOptionPane.NO_OPTION:
        // Wired (100 Megabit)
        configuration.setMaximumBitrate("90");
        configuration.setMPEG2MainSettings("Automatic (Wired)");
        configuration.setx264ConstantRateFactor("Automatic (Wired)");
        break;
    case JOptionPane.CANCEL_OPTION:
        // Wireless
        configuration.setMaximumBitrate("30");
        configuration.setMPEG2MainSettings("Automatic (Wireless)");
        configuration.setx264ConstantRateFactor("Automatic (Wireless)");
        break;
    default:
        break;
    }

    // Ask if they want to hide advanced options
    int whetherToHideAdvancedOptions = JOptionPane.showOptionDialog(null, Messages.getString("Wizard.11"),
            String.format(status, currentQuestionNumber++), JOptionPane.YES_NO_OPTION,
            JOptionPane.QUESTION_MESSAGE, null, yesNoOptions, yesNoOptions[0]);

    if (whetherToHideAdvancedOptions == JOptionPane.YES_OPTION) {
        configuration.setHideAdvancedOptions(true);
    } else if (whetherToHideAdvancedOptions == JOptionPane.NO_OPTION) {
        configuration.setHideAdvancedOptions(false);
    }

    // Ask if they want to scan shared folders
    int whetherToScanSharedFolders = JOptionPane.showOptionDialog(null,
            Messages.getString("Wizard.IsStartupScan"), String.format(status, currentQuestionNumber++),
            JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, yesNoOptions, yesNoOptions[0]);

    if (whetherToScanSharedFolders == JOptionPane.YES_OPTION) {
        configuration.setScanSharedFoldersOnStartup(true);
    } else if (whetherToScanSharedFolders == JOptionPane.NO_OPTION) {
        configuration.setScanSharedFoldersOnStartup(false);
    }

    // Ask to set at least one shared folder
    JOptionPane.showOptionDialog(null, Messages.getString("Wizard.12"),
            String.format(status, currentQuestionNumber++), JOptionPane.OK_OPTION,
            JOptionPane.INFORMATION_MESSAGE, null, okOptions, okOptions[0]);

    try {
        SwingUtilities.invokeAndWait(new Runnable() {
            @Override
            public void run() {
                JFileChooser chooser;
                try {
                    chooser = new JFileChooser();
                } catch (Exception ee) {
                    chooser = new JFileChooser(new RestrictedFileSystemView());
                }

                chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                chooser.setDialogTitle(Messages.getString("Wizard.12"));
                chooser.setMultiSelectionEnabled(false);
                if (chooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {
                    configuration.setOnlySharedDirectory(chooser.getSelectedFile().getAbsolutePath());
                } else {
                    // If the user cancels this option, the default directories will be used.
                }
            }
        });
    } catch (InterruptedException | InvocationTargetException e) {
        LOGGER.error("Error when saving folders: ", e);
    }

    // The wizard finished, do not ask them again
    configuration.setRunWizard(false);

    // Save all changes
    try {
        configuration.save();
    } catch (ConfigurationException e) {
        LOGGER.error("Error when saving changed configuration: ", e);
    }
}

From source file:net.openbyte.gui.WorkFrame.java

private void showBukkitIncompatibleFeature() {
    JOptionPane.showMessageDialog(this, "This feature is only compatible in other APIs, sorry.", "Error",
            JOptionPane.INFORMATION_MESSAGE);
}

From source file:au.com.jwatmuff.eventmanager.util.GUIUtils.java

public static void displayMessage(Component parent, String string, String title) {
    JOptionPane.showMessageDialog(parent, string, title, JOptionPane.INFORMATION_MESSAGE);
}

From source file:edu.harvard.mcz.imagecapture.ThumbnailBuilder.java

@Override
public void run() {
    int existsCounter = 0;
    // mkdir thumbs ; mogrify -path thumbs -resize 80x120 *.JPG                   
    if (startPoint.isDirectory() && (!startPoint.getName().equals("thumbs"))) {
        File thumbsDir = new File(startPoint.getPath() + File.separator + "thumbs");
        log.debug(thumbsDir.getPath());//  w ww.  ja  va2  s .c o  m
        if (!thumbsDir.exists()) {
            thumbsDir.mkdir();
            thumbsDir.setWritable(true);
            log.debug("Creating " + thumbsDir.getPath());
        }
        File[] potentialFilesToThumb = startPoint.listFiles();
        List<File> filesToThumb = new ArrayList<File>();
        int filesToThumbCount = 0;
        for (int i = 0; i < potentialFilesToThumb.length; i++) {
            if (potentialFilesToThumb[i].getName().endsWith(".JPG")) {
                filesToThumb.add(potentialFilesToThumb[i]);
                filesToThumbCount++;
            }
        }
        if (filesToThumbCount > 0) {
            int targetWidth = 100;
            int targetHeight = 150;

            Iterator<File> i = filesToThumb.iterator();
            while (i.hasNext()) {
                File file = i.next();
                File output = new File(thumbsDir.getPath().concat(File.separator).concat(file.getName()));
                if (!output.exists()) {
                    // don't overwrite existing thumnails
                    try {
                        BufferedImage img = ImageIO.read(file);
                        BufferedImage thumbnail = Scalr.resize(img, Scalr.Method.BALANCED,
                                Scalr.Mode.FIT_TO_WIDTH, targetWidth, targetHeight, Scalr.OP_ANTIALIAS);
                        // img.createGraphics().drawImage(ImageIO.read(file).getScaledInstance(targetWidth, targetHeigh, Image.SCALE_SMOOTH),0,0,null);
                        ImageIO.write(thumbnail, "jpg", output);
                        thumbnailCounter++;
                    } catch (IOException e1) {
                        log.error(e1.getMessage(), e1);
                        JOptionPane.showMessageDialog(null, e1.getMessage() + "\n", "Error",
                                JOptionPane.ERROR_MESSAGE);
                    }
                } else {
                    existsCounter++;
                }
            }

        } else {
            String message = "No *.JPG files found in " + startPoint.getPath();
            log.debug(message);
        }
    }
    String exists = "";
    if (existsCounter > 0) {
        exists = "\nSkipped " + existsCounter + " existing thumbnails.";
    }
    JOptionPane.showMessageDialog(null,
            "Done building " + thumbnailCounter + " thumbnails in ./thumbs/" + exists, "Thumbnails Built.",
            JOptionPane.INFORMATION_MESSAGE);
}

From source file:edu.ku.brc.specify.tasks.DataEntryConfigDlg.java

@Override
protected void addItem(final JList list, final Vector<TaskConfigItemIFace> itemList) {
    // Hash all the names so we can figure out which forms are not used
    Hashtable<String, Object> hash = new Hashtable<String, Object>();
    ListModel model = stdPanel.getOrderModel();
    for (int i = 0; i < model.getSize(); i++) {
        DataEntryView dev = (DataEntryView) model.getElementAt(i);
        hash.put(dev.getView(), dev);//from www  .j ava  2 s.  c o m
    }

    model = miscPanel.getOrderModel();
    for (int i = 0; i < model.getSize(); i++) {
        DataEntryView dev = (DataEntryView) model.getElementAt(i);
        hash.put(dev.getView(), dev);
    }

    // Add only the unused forms (does NOT return internal views).
    List<String> uniqueList = new Vector<String>();
    List<ViewIFace> views = ((SpecifyAppContextMgr) AppContextMgr.getInstance()).getAllViews();
    Hashtable<String, ViewIFace> newAvailViews = new Hashtable<String, ViewIFace>();
    for (ViewIFace view : views) {
        //System.out.println("["+view.getName()+"]["+view.getTitle()+"]");

        if (hash.get(view.getName()) == null) {
            DBTableInfo ti = DBTableIdMgr.getInstance().getByClassName(view.getClassName());
            if (ti != null) {
                if (!ti.isHidden() && !InteractionsTask.isInteractionTable(ti.getTableId())) {
                    hash.put(view.getName(), view);
                    String title = StringUtils.isNotEmpty(view.getObjTitle()) ? view.getObjTitle()
                            : ti != null ? ti.getTitle() : view.getName();
                    if (newAvailViews.get(title) != null) {
                        title = view.getName();
                    }
                    uniqueList.add(title);
                    newAvailViews.put(title, view);
                }
            } else {
                System.err.println("DBTableInfo was null for class[" + view.getClassName() + "]");
            }
        }
    }

    if (uniqueList.size() == 0) {
        JOptionPane.showMessageDialog(this, getResourceString("DET_DEV_NONE_AVAIL"),
                getResourceString("DET_DEV_NONE_AVAIL_TITLE"), JOptionPane.INFORMATION_MESSAGE);
        return;
    }

    Collections.sort(uniqueList);

    ToggleButtonChooserDlg<String> dlg = new ToggleButtonChooserDlg<String>((Frame) UIRegistry.getTopWindow(),
            "DET_AVAIL_VIEWS", uniqueList);

    dlg.setUseScrollPane(true);
    UIHelper.centerAndShow(dlg);

    if (!dlg.isCancelled()) {
        model = list.getModel();

        for (String title : dlg.getSelectedObjects()) {
            ViewIFace view = newAvailViews.get(title);
            DBTableInfo ti = DBTableIdMgr.getInstance().getByClassName(view.getClassName());

            String frmTitle = StringUtils.isNotEmpty(view.getObjTitle()) ? view.getObjTitle()
                    : ti != null ? ti.getTitle() : view.getName();
            DataEntryView dev = new DataEntryView(frmTitle, // Title 
                    view.getName(), // Name
                    ti != null ? ti.getName() : null, // Icon Name
                    view.getObjTitle(), // ToolTip
                    model.getSize(), // Order
                    true);
            dev.setTableInfo(ti);
            ((DefaultListModel) model).addElement(dev);
            itemList.add(dev);
        }
        //pack();
    }
    setHasChanged(true);
}