bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
---|---|---|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { // We avoid that the icon is gray while the combo isn't deployed if (index == -1) isSelected = true; // We put the label String iso3 = (String) value; setText(iso3); if (isSelected) { if (lnf.equalsIgnoreCase("swing")) setOpaque(true); else if (index == -1) setOpaque(false); else setOpaque(true); setForeground(list.getSelectionForeground()); setBackground(list.getSelectionBackground()); } else setOpaque(false); // We put the icon if (!icons.containsKey(iso3)) { ImageIcon icon = new ImageIcon(this.getClass().getResource("/res/flag." + iso3)); icons.put(iso3, icon); grayIcons.put(iso3, new ImageIcon(GrayFilter.createDisabledImage(icon.getImage()))); } if (isSelected) setIcon((ImageIcon) icons.get(iso3)); else setIcon((ImageIcon) grayIcons.get(iso3)); // We return return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { // We avoid that the icon is gray while the combo isn't deployed if (index == -1) isSelected = true; // We put the label String iso3 = (String) value; setText(iso3); if (isSelected) { if (lnf.equalsIgnoreCase("swing")) setOpaque(true); else if (index == -1) setOpaque(false); else setOpaque(true); setForeground(list.getSelectionForeground()); setBackground(list.getSelectionBackground()); } else setOpaque(false); // We put the icon if (!icons.containsKey(iso3)) { ImageIcon icon = new ImageIcon(this.getClass().getResource("/res/flag." + iso3)); icons.put(iso3, icon); grayIcons.put(iso3, new ImageIcon(GrayFilter.createDisabledImage(icon.getImage()))); } if (isSelected) setIcon((ImageIcon) icons.get(iso3)); else setIcon((ImageIcon) grayIcons.get(iso3)); // We return return this; }
| 3,241,327 |
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { // We avoid that the icon is gray while the combo isn't deployed if (index == -1) isSelected = true; // We put the label String iso3 = (String) value; setText(iso3); if (isSelected) { if (lnf.equalsIgnoreCase("swing")) setOpaque(true); else if (index == -1) setOpaque(false); else setOpaque(true); setForeground(list.getSelectionForeground()); setBackground(list.getSelectionBackground()); } else setOpaque(false); // We put the icon if (!icons.containsKey(iso3)) { ImageIcon icon = new ImageIcon(this.getClass().getResource("/res/flag." + iso3)); icons.put(iso3, icon); grayIcons.put(iso3, new ImageIcon(GrayFilter.createDisabledImage(icon.getImage()))); } if (isSelected) setIcon((ImageIcon) icons.get(iso3)); else setIcon((ImageIcon) grayIcons.get(iso3)); // We return return this; }
|
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { // We avoid that the icon is gray while the combo isn't deployed if (index == -1) isSelected = true; // We put the label String iso3 = (String) value; setText(iso3); if (isSelected) { if (lnf.equalsIgnoreCase("swing")) setOpaque(true); else if (index == -1) setOpaque(false); else setOpaque(true); setForeground(list.getSelectionForeground()); setBackground(list.getSelectionBackground()); } else setOpaque(false); // We put the icon if (!icons.containsKey(iso3)) { ImageIcon icon = new ImageIcon(this.getClass().getResource("/res/flag." + iso3)); icons.put(iso3, icon); grayIcons.put( iso3, new ImageIcon(GrayFilter.createDisabledImage(icon.getImage()))); } if (isSelected) setIcon((ImageIcon) icons.get(iso3)); else setIcon((ImageIcon) grayIcons.get(iso3)); // We return return this; }
| 3,241,328 |
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
|
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
| 3,241,329 |
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
|
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel( "Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
| 3,241,330 |
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
|
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
| 3,241,331 |
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
|
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation( (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
| 3,241,332 |
public ImageIcon getImage() { ImageIcon img; try { img = new ImageIcon(this.getClass().getResource( "/res/installer.langsel.img")); } catch (NullPointerException err) { img = null; } return img; }
|
public ImageIcon getImage() { ImageIcon img; try { img = new ImageIcon(this.getClass().getResource( "/res/installer.langsel.img")); } catch (NullPointerException err) { img = null; } return img; }
| 3,241,333 |
public GUIInstaller() throws Exception { super(); this.installdata = new InstallData(); // Loads the installation data loadInstallData(installdata); // add the GUI install data loadGUIInstallData(); // Checks the Java version checkJavaVersion(); // Sets up the GUI L&F loadLookAndFeel(); // Loads the suitable langpack loadLangPack(); // create the resource manager (after the language selection!) ResourceManager.create (this.installdata); // We launch the installer GUI loadGUI(); }
|
public GUIInstaller() throws Exception { super(); this.installdata = new InstallData(); // Loads the installation data loadInstallData(installdata); // add the GUI install data loadGUIInstallData(); // Checks the Java version checkJavaVersion(); // Sets up the GUI L&F loadLookAndFeel(); // Loads the suitable langpack loadLangPack(); // create the resource manager (after the language selection!) ResourceManager.create (this.installdata); // We launch the installer GUI loadGUI(); }
| 3,241,334 |
public GUIInstaller() throws Exception { super(); this.installdata = new InstallData(); // Loads the installation data loadInstallData(installdata); // add the GUI install data loadGUIInstallData(); // Checks the Java version checkJavaVersion(); // Sets up the GUI L&F loadLookAndFeel(); // Loads the suitable langpack loadLangPack(); // create the resource manager (after the language selection!) ResourceManager.create (this.installdata); // We launch the installer GUI loadGUI(); }
|
public GUIInstaller() throws Exception { super(); this.installdata = new InstallData(); // Loads the installation data loadInstallData(installdata); // add the GUI install data loadGUIInstallData(); // Checks the Java version checkJavaVersion(); // Sets up the GUI L&F loadLookAndFeel(); // Loads the suitable langpack loadLangPack(); // create the resource manager (after the language selection!) ResourceManager.create (this.installdata); // We launch the installer GUI loadGUI(); }
| 3,241,335 |
public GUIInstaller() throws Exception { super(); this.installdata = new InstallData(); // Loads the installation data loadInstallData(installdata); // add the GUI install data loadGUIInstallData(); // Checks the Java version checkJavaVersion(); // Sets up the GUI L&F loadLookAndFeel(); // Loads the suitable langpack loadLangPack(); // create the resource manager (after the language selection!) ResourceManager.create (this.installdata); // We launch the installer GUI loadGUI(); }
|
public GUIInstaller() throws Exception { super(); this.installdata = new InstallData(); // Loads the installation data loadInstallData(installdata); // add the GUI install data loadGUIInstallData(); // Checks the Java version checkJavaVersion(); // Sets up the GUI L&F loadLookAndFeel(); // Loads the suitable langpack loadLangPack(); // create the resource manager (after the language selection!) ResourceManager.create(this.installdata); // We launch the installer GUI loadGUI(); }
| 3,241,336 |
private void checkJavaVersion() throws Exception { String version = System.getProperty("java.version"); String required = this.installdata.info.getJavaVersion(); if (version.compareTo(required) < 0) { System.out.println("Can't install !"); System.out.println("> The minimum Java version required is " + required); System.out.println("> Your version is " + version); System.out.println("Please upgrade to the minimum version."); System.exit(1); } }
|
private void checkJavaVersion() throws Exception { String version = System.getProperty("java.version"); String required = this.installdata.info.getJavaVersion(); if (version.compareTo(required) < 0) { System.out.println("Can't install !"); System.out.println("> The minimum Java version required is " + required); System.out.println("> Your version is " + version); System.out.println("Please upgrade to the minimum version."); System.exit(1); } }
| 3,241,337 |
private void loadGUI() throws Exception { UIManager.put("OptionPane.yesButtonText", installdata.langpack.getString("installer.yes")); UIManager.put("OptionPane.noButtonText", installdata.langpack.getString("installer.no")); UIManager.put("OptionPane.cancelButtonText", installdata.langpack.getString("installer.cancel")); String title = installdata.langpack.getString("installer.title") + this.installdata.info.getAppName(); new InstallerFrame(title, this.installdata); }
|
private void loadGUI() throws Exception { UIManager.put("OptionPane.yesButtonText", installdata.langpack.getString("installer.yes")); UIManager.put("OptionPane.noButtonText", installdata.langpack.getString("installer.no")); UIManager.put("OptionPane.cancelButtonText", installdata.langpack.getString("installer.cancel")); String title = installdata.langpack.getString("installer.title") + this.installdata.info.getAppName(); new InstallerFrame(title, this.installdata); }
| 3,241,338 |
private void loadGUI() throws Exception { UIManager.put("OptionPane.yesButtonText", installdata.langpack.getString("installer.yes")); UIManager.put("OptionPane.noButtonText", installdata.langpack.getString("installer.no")); UIManager.put("OptionPane.cancelButtonText", installdata.langpack.getString("installer.cancel")); String title = installdata.langpack.getString("installer.title") + this.installdata.info.getAppName(); new InstallerFrame(title, this.installdata); }
|
private void loadGUI() throws Exception { UIManager.put("OptionPane.yesButtonText", installdata.langpack.getString("installer.yes")); UIManager.put("OptionPane.noButtonText", installdata.langpack.getString("installer.no")); UIManager.put("OptionPane.cancelButtonText", installdata.langpack.getString("installer.cancel")); String title = installdata.langpack.getString("installer.title") + this.installdata.info.getAppName(); new InstallerFrame(title, this.installdata); }
| 3,241,339 |
public void loadGUIInstallData() throws Exception { InputStream in = getClass().getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
|
public void loadGUIInstallData() throws Exception { InputStream in = getClass().getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
| 3,241,340 |
public void loadGUIInstallData() throws Exception { InputStream in = getClass().getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
|
public void loadGUIInstallData() throws Exception { InputStream in = getClass().getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
| 3,241,341 |
private void loadLangPack() throws Exception { // Initialisations ArrayList availableLangPacks = getAvailableLangPacks(); int npacks = availableLangPacks.size(); if (npacks == 0) throw new Exception("no language pack available"); String selectedPack; // We get the langpack name if (npacks != 1) { LanguageDialog picker = new LanguageDialog(availableLangPacks.toArray()); picker.setSelection(Locale.getDefault().getISO3Country().toLowerCase()); picker.setModal(true); picker.show(); selectedPack = (String) picker.getSelection(); if (selectedPack == null) throw new Exception("installation canceled"); } else selectedPack = (String) availableLangPacks.get(0); // We add an xml data information this.installdata.xmlData.setAttribute("langpack", selectedPack); // We load the langpack installdata.localeISO3 = selectedPack; installdata.setVariable(ScriptParser.ISO3_LANG, installdata.localeISO3); InputStream in = getClass().getResourceAsStream("/langpacks/" + selectedPack + ".xml"); this.installdata.langpack = new LocaleDatabase(in); }
|
private void loadLangPack() throws Exception { // Initialisations ArrayList availableLangPacks = getAvailableLangPacks(); int npacks = availableLangPacks.size(); if (npacks == 0) throw new Exception("no language pack available"); String selectedPack; // We get the langpack name if (npacks != 1) { LanguageDialog picker = new LanguageDialog(availableLangPacks.toArray()); picker.setSelection(Locale.getDefault().getISO3Country().toLowerCase()); picker.setModal(true); picker.show(); selectedPack = (String) picker.getSelection(); if (selectedPack == null) throw new Exception("installation canceled"); } else selectedPack = (String) availableLangPacks.get(0); // We add an xml data information this.installdata.xmlData.setAttribute("langpack", selectedPack); // We load the langpack installdata.localeISO3 = selectedPack; installdata.setVariable(ScriptParser.ISO3_LANG, installdata.localeISO3); InputStream in = getClass().getResourceAsStream("/langpacks/" + selectedPack + ".xml"); this.installdata.langpack = new LocaleDatabase(in); }
| 3,241,342 |
private void loadLangPack() throws Exception { // Initialisations ArrayList availableLangPacks = getAvailableLangPacks(); int npacks = availableLangPacks.size(); if (npacks == 0) throw new Exception("no language pack available"); String selectedPack; // We get the langpack name if (npacks != 1) { LanguageDialog picker = new LanguageDialog(availableLangPacks.toArray()); picker.setSelection(Locale.getDefault().getISO3Country().toLowerCase()); picker.setModal(true); picker.show(); selectedPack = (String) picker.getSelection(); if (selectedPack == null) throw new Exception("installation canceled"); } else selectedPack = (String) availableLangPacks.get(0); // We add an xml data information this.installdata.xmlData.setAttribute("langpack", selectedPack); // We load the langpack installdata.localeISO3 = selectedPack; installdata.setVariable(ScriptParser.ISO3_LANG, installdata.localeISO3); InputStream in = getClass().getResourceAsStream("/langpacks/" + selectedPack + ".xml"); this.installdata.langpack = new LocaleDatabase(in); }
|
private void loadLangPack() throws Exception { // Initialisations ArrayList availableLangPacks = getAvailableLangPacks(); int npacks = availableLangPacks.size(); if (npacks == 0) throw new Exception("no language pack available"); String selectedPack; // We get the langpack name if (npacks != 1) { LanguageDialog picker = new LanguageDialog(availableLangPacks.toArray()); picker.setSelection(Locale.getDefault().getISO3Country().toLowerCase()); picker.setModal(true); picker.show(); selectedPack = (String) picker.getSelection(); if (selectedPack == null) throw new Exception("installation canceled"); } else selectedPack = (String) availableLangPacks.get(0); // We add an xml data information this.installdata.xmlData.setAttribute("langpack", selectedPack); // We load the langpack installdata.localeISO3 = selectedPack; installdata.setVariable(ScriptParser.ISO3_LANG, installdata.localeISO3); InputStream in = getClass().getResourceAsStream("/langpacks/" + selectedPack + ".xml"); this.installdata.langpack = new LocaleDatabase(in); }
| 3,241,343 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,344 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,345 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,346 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,347 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,348 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = { mtheme }; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,349 |
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = {ktheme}; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
|
protected void loadLookAndFeel() throws Exception { if (this.installdata.kind.equalsIgnoreCase("standard") || this.installdata.kind.equalsIgnoreCase("web")) { if (getClass().getResourceAsStream("/res/useNativeLAF") != null) { String nlaf = UIManager.getSystemLookAndFeelClassName(); UIManager.setLookAndFeel(nlaf); } if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) { // We simply put our nice theme MetalLookAndFeel.setCurrentTheme(new IzPackMetalTheme()); ButtonFactory.useHighlightButtons(); this.installdata.buttonsHColor = new Color(182, 182, 204); } lnf = "swing"; } else if (this.installdata.kind.equalsIgnoreCase("standard-kunststoff") || this.installdata.kind.equalsIgnoreCase("web-kunststoff")) { ButtonFactory.useHighlightButtons(); // We change the highlight color for the buttons this.installdata.buttonsHColor = new Color(255, 255, 255); // Some reflection ... Class laf = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel"); Class mtheme = Class.forName("javax.swing.plaf.metal.MetalTheme"); Class[] params = {mtheme}; Class theme = Class.forName("com.izforge.izpack.gui.IzPackKMetalTheme"); Method setCurrentThemeMethod = laf.getMethod("setCurrentTheme", params); // We invoke and place Kunststoff as our L&F LookAndFeel kunststoff = (LookAndFeel) laf.newInstance(); MetalTheme ktheme = (MetalTheme) theme.newInstance(); Object[] kparams = { ktheme }; UIManager.setLookAndFeel(kunststoff); setCurrentThemeMethod.invoke(kunststoff, kparams); lnf = "kunststoff"; } ButtonFactory.useButtonIcons(); }
| 3,241,350 |
private final boolean compareVersions(String in, String template, boolean isMin, int assumedPlace, int halfRange, String useNotIdentifier) { StringTokenizer st = new StringTokenizer(in, " \t\n\r\f\""); int i; int currentRange = 0; String[] interestedEntries = new String[halfRange + halfRange]; for (i = 0; i < assumedPlace - halfRange; ++i) if (st.hasMoreTokens()) st.nextToken(); // Forget this entries. for (i = 0; i < halfRange + halfRange; ++i) { // Put the interesting Strings into an intermediaer array. if (st.hasMoreTokens()) { interestedEntries[i] = st.nextToken(); currentRange++; } } for (i = 0; i < currentRange; ++i) { if (useNotIdentifier != null && interestedEntries[i].indexOf(useNotIdentifier) > -1) continue; if (Character.getType(interestedEntries[i].charAt(0)) != Character.DECIMAL_DIGIT_NUMBER) continue; break; } if (i == currentRange) { detectedVersion = "<not found>"; return (false); } detectedVersion = interestedEntries[i]; StringTokenizer current = new StringTokenizer(interestedEntries[i], "._-"); StringTokenizer needed = new StringTokenizer(template, "._-"); while (needed.hasMoreTokens()) { // Current can have no more tokens if needed has more // and if a privious token was not accepted as good version. // e.g. 1.4.2_02 needed, 1.4.2 current. The false return // will be right here. Only if e.g. needed is 1.4.2_00 the // return value will be false, but zero should not b e used // at the last version part. if (!current.hasMoreTokens()) return (false); String cur = current.nextToken(); String nee = needed.nextToken(); int curVal = 0; int neededVal = 0; try { curVal = Integer.parseInt(cur); neededVal = Integer.parseInt(nee); } catch (NumberFormatException nfe) { // A number format exception will be raised if // there is a non numeric part in the version, // e.g. 1.5.0_beta. The verification runs only into // this deep area of version number (fourth sub place) // if all other are equal to the given limit. Then // it is right to return false because e.g. // the minimal needed version will be 1.5.0.2. return (false); } if (curVal < neededVal) if (isMin) return (false); else return (true); if (Integer.parseInt(cur) > Integer.parseInt(nee)) if (isMin) return (true); else return (false); } return (true); }
|
private boolean compareVersions(String in, String template, boolean isMin, int assumedPlace, int halfRange, String useNotIdentifier) { StringTokenizer st = new StringTokenizer(in, " \t\n\r\f\""); int i; int currentRange = 0; String[] interestedEntries = new String[halfRange + halfRange]; for (i = 0; i < assumedPlace - halfRange; ++i) if (st.hasMoreTokens()) st.nextToken(); // Forget this entries. for (i = 0; i < halfRange + halfRange; ++i) { // Put the interesting Strings into an intermediaer array. if (st.hasMoreTokens()) { interestedEntries[i] = st.nextToken(); currentRange++; } } for (i = 0; i < currentRange; ++i) { if (useNotIdentifier != null && interestedEntries[i].indexOf(useNotIdentifier) > -1) continue; if (Character.getType(interestedEntries[i].charAt(0)) != Character.DECIMAL_DIGIT_NUMBER) continue; break; } if (i == currentRange) { detectedVersion = "<not found>"; return (false); } detectedVersion = interestedEntries[i]; StringTokenizer current = new StringTokenizer(interestedEntries[i], "._-"); StringTokenizer needed = new StringTokenizer(template, "._-"); while (needed.hasMoreTokens()) { // Current can have no more tokens if needed has more // and if a privious token was not accepted as good version. // e.g. 1.4.2_02 needed, 1.4.2 current. The false return // will be right here. Only if e.g. needed is 1.4.2_00 the // return value will be false, but zero should not b e used // at the last version part. if (!current.hasMoreTokens()) return (false); String cur = current.nextToken(); String nee = needed.nextToken(); int curVal = 0; int neededVal = 0; try { curVal = Integer.parseInt(cur); neededVal = Integer.parseInt(nee); } catch (NumberFormatException nfe) { // A number format exception will be raised if // there is a non numeric part in the version, // e.g. 1.5.0_beta. The verification runs only into // this deep area of version number (fourth sub place) // if all other are equal to the given limit. Then // it is right to return false because e.g. // the minimal needed version will be 1.5.0.2. return (false); } if (curVal < neededVal) if (isMin) return (false); else return (true); if (Integer.parseInt(cur) > Integer.parseInt(nee)) if (isMin) return (true); else return (false); } return (true); }
| 3,241,351 |
public void panelActivate() { // Resolve the default for chosenPath super.panelActivate(); String chosenPath; // The variable will be exist if we enter this panel // second time. We would maintain the previos // selected path. if (idata.getVariable(getVariableName()) != null) chosenPath = idata.getVariable(getVariableName()); else // Try the JAVA_HOME as child dir of the jdk path chosenPath = (new File(idata.getVariable("JAVA_HOME"))).getParent(); // Set the path for method pathIsValid ... pathSelectionPanel.setPath(chosenPath); if (!pathIsValid() || !verifyVersion()) chosenPath = ""; // Set the default to the path selection panel. pathSelectionPanel.setPath(chosenPath); String var = idata.getVariable("JDKPathPanel.skipIfValid"); // Should we skip this panel? if (chosenPath.length() > 0 && var != null && var.equalsIgnoreCase("yes")) { idata.setVariable(getVariableName(), chosenPath); parent.skipPanel(); } }
|
public void panelActivate() { // Resolve the default for chosenPath super.panelActivate(); String chosenPath; // The variable will be exist if we enter this panel // second time. We would maintain the previos // selected path. if (idata.getVariable(getVariableName()) != null) chosenPath = idata.getVariable(getVariableName()); else // Try the JAVA_HOME as child dir of the jdk path chosenPath = (new File(idata.getVariable("JAVA_HOME"))).getParent(); // Set the path for method pathIsValid ... pathSelectionPanel.setPath(chosenPath); if (!pathIsValid() || !verifyVersion()) chosenPath = ""; // Set the default to the path selection panel. pathSelectionPanel.setPath(chosenPath); String var = idata.getVariable("JDKPathPanel.skipIfValid"); // Should we skip this panel? if (chosenPath.length() > 0 && var != null && "yes".equalsIgnoreCase(var)) { idata.setVariable(getVariableName(), chosenPath); parent.skipPanel(); } }
| 3,241,352 |
private final boolean verifyVersion() { String min = getMinVersion(); String max = getMaxVersion(); // No min and max, version always ok. if (min == null && max == null) return (true); if (!pathIsValid()) return (false); // No get the version ... // We cannot look to the version of this vm because we should // test the given JDK VM. String[] params = { pathSelectionPanel.getPath() + File.separator + "bin" + File.separator + "java", "-version"}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); fe.executeCommand(params, output); // "My" VM writes the version on stderr :-( String vs = (output[0].length() > 0) ? output[0] : output[1]; if (min != null) { if (!compareVersions(vs, min, true, 4, 4, "__NO_NOT_IDENTIFIER_")) return (false); } if (max != null) if (!compareVersions(vs, max, false, 4, 4, "__NO_NOT_IDENTIFIER_")) return (false); return (true); }
|
private boolean verifyVersion() { String min = getMinVersion(); String max = getMaxVersion(); // No min and max, version always ok. if (min == null && max == null) return (true); if (!pathIsValid()) return (false); // No get the version ... // We cannot look to the version of this vm because we should // test the given JDK VM. String[] params = { pathSelectionPanel.getPath() + File.separator + "bin" + File.separator + "java", "-version"}; String[] output = new String[2]; FileExecutor fe = new FileExecutor(); fe.executeCommand(params, output); // "My" VM writes the version on stderr :-( String vs = (output[0].length() > 0) ? output[0] : output[1]; if (min != null) { if (!compareVersions(vs, min, true, 4, 4, "__NO_NOT_IDENTIFIER_")) return (false); } if (max != null) if (!compareVersions(vs, max, false, 4, 4, "__NO_NOT_IDENTIFIER_")) return (false); return (true); }
| 3,241,353 |
public Unix_Shortcut() { StringBuffer hlp = new StringBuffer(); String userLanguage = System.getProperty("user.language", "en"); hlp.append("[Desktop Entry]" + N); hlp.append("Comment=" + $Comment + N); hlp.append("Comment[" + userLanguage + "]=" + $Comment + N); hlp.append("Encoding=" + $Encoding + N); hlp.append("Exec='" + $Exec + "'" + S + $Arguments + N); hlp.append("GenericName=" + $GenericName + N); hlp.append("GenericName[" + userLanguage + "]=" + $GenericName + N); hlp.append("Icon=" + $Icon + N); hlp.append("MimeType=" + $MimeType + N); hlp.append("Name=" + $Name + N); hlp.append("Name[" + userLanguage + "]=" + $Name + N); hlp.append("Path='" + $Path + "'" + N); hlp.append("ServiceTypes=" + $ServiceTypes + N); hlp.append("SwallowExec=" + $SwallowExec + N); hlp.append("SwallowTitle=" + $SwallowTitle + N); hlp.append("Terminal=" + $Terminal + N); hlp.append("TerminalOptions=" + $Options_For_Terminal + N); hlp.append("Type=" + $Type + N); hlp.append("URL=" + $URL + N); hlp.append("X-KDE-SubstituteUID=" + $X_KDE_SubstituteUID + N); hlp.append("X-KDE-Username=" + $X_KDE_Username + N); template = hlp.toString(); props = new Properties(); initProps(); }
|
public Unix_Shortcut() { StringBuffer hlp = new StringBuffer(); String userLanguage = System.getProperty("user.language", "en"); hlp.append("[Desktop Entry]" + N); hlp.append("Comment=" + $Comment + N); hlp.append("Comment[" + userLanguage + "]=" + $Comment + N); hlp.append("Encoding=" + $Encoding + N); hlp.append("Exec="+ $E_QUOT + $Exec + $E_QUOT + S + $Arguments + N); hlp.append("GenericName=" + $GenericName + N); hlp.append("GenericName[" + userLanguage + "]=" + $GenericName + N); hlp.append("Icon=" + $Icon + N); hlp.append("MimeType=" + $MimeType + N); hlp.append("Name=" + $Name + N); hlp.append("Name[" + userLanguage + "]=" + $Name + N); hlp.append("Path='" + $Path + "'" + N); hlp.append("ServiceTypes=" + $ServiceTypes + N); hlp.append("SwallowExec=" + $SwallowExec + N); hlp.append("SwallowTitle=" + $SwallowTitle + N); hlp.append("Terminal=" + $Terminal + N); hlp.append("TerminalOptions=" + $Options_For_Terminal + N); hlp.append("Type=" + $Type + N); hlp.append("URL=" + $URL + N); hlp.append("X-KDE-SubstituteUID=" + $X_KDE_SubstituteUID + N); hlp.append("X-KDE-Username=" + $X_KDE_Username + N); template = hlp.toString(); props = new Properties(); initProps(); }
| 3,241,354 |
public Unix_Shortcut() { StringBuffer hlp = new StringBuffer(); String userLanguage = System.getProperty("user.language", "en"); hlp.append("[Desktop Entry]" + N); hlp.append("Comment=" + $Comment + N); hlp.append("Comment[" + userLanguage + "]=" + $Comment + N); hlp.append("Encoding=" + $Encoding + N); hlp.append("Exec='" + $Exec + "'" + S + $Arguments + N); hlp.append("GenericName=" + $GenericName + N); hlp.append("GenericName[" + userLanguage + "]=" + $GenericName + N); hlp.append("Icon=" + $Icon + N); hlp.append("MimeType=" + $MimeType + N); hlp.append("Name=" + $Name + N); hlp.append("Name[" + userLanguage + "]=" + $Name + N); hlp.append("Path='" + $Path + "'" + N); hlp.append("ServiceTypes=" + $ServiceTypes + N); hlp.append("SwallowExec=" + $SwallowExec + N); hlp.append("SwallowTitle=" + $SwallowTitle + N); hlp.append("Terminal=" + $Terminal + N); hlp.append("TerminalOptions=" + $Options_For_Terminal + N); hlp.append("Type=" + $Type + N); hlp.append("URL=" + $URL + N); hlp.append("X-KDE-SubstituteUID=" + $X_KDE_SubstituteUID + N); hlp.append("X-KDE-Username=" + $X_KDE_Username + N); template = hlp.toString(); props = new Properties(); initProps(); }
|
public Unix_Shortcut() { StringBuffer hlp = new StringBuffer(); String userLanguage = System.getProperty("user.language", "en"); hlp.append("[Desktop Entry]" + N); hlp.append("Comment=" + $Comment + N); hlp.append("Comment[" + userLanguage + "]=" + $Comment + N); hlp.append("Encoding=" + $Encoding + N); hlp.append("Exec='" + $Exec + "'" + S + $Arguments + N); hlp.append("GenericName=" + $GenericName + N); hlp.append("GenericName[" + userLanguage + "]=" + $GenericName + N); hlp.append("Icon=" + $Icon + N); hlp.append("MimeType=" + $MimeType + N); hlp.append("Name=" + $Name + N); hlp.append("Name[" + userLanguage + "]=" + $Name + N); hlp.append("Path="+ $P_QUOT + $Path + $P_QUOT + N); hlp.append("ServiceTypes=" + $ServiceTypes + N); hlp.append("SwallowExec=" + $SwallowExec + N); hlp.append("SwallowTitle=" + $SwallowTitle + N); hlp.append("Terminal=" + $Terminal + N); hlp.append("TerminalOptions=" + $Options_For_Terminal + N); hlp.append("Type=" + $Type + N); hlp.append("URL=" + $URL + N); hlp.append("X-KDE-SubstituteUID=" + $X_KDE_SubstituteUID + N); hlp.append("X-KDE-Username=" + $X_KDE_Username + N); template = hlp.toString(); props = new Properties(); initProps(); }
| 3,241,355 |
public String getDirectoryCreated() { return this.createdDirectory; // while not stored... }
|
public String getDirectoryCreated() { return this.createdDirectory; // while not stored... }
| 3,241,357 |
public Vector getProgramGroups(int userType) { // if( userType > CURRENT_USER ) // if( System.getProperty( "user.name" ).equals( "root" ) ) String FS = File.separator; // System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File(System.getProperty("user.home")); File kdeHomeShareApplnk; try { File kdeHome = new File(homedir.toString() + FS + ".kde"); if (!kdeHome.exists()) return (groups); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); if (!kdeHomeShare.exists()) return (groups); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders = { "applnk-mdk", "applnk-redhat", "applnk"}; for (int i = 0; i < applnkFolders.length; i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder = applnkFolders[i]; break; } } if (!kdeHomeShareApplnk.exists()) return (groups); } catch (Exception e1) { // e1.printStackTrace(); return (groups); } try { File[] listing = kdeHomeShareApplnk.listFiles(); for (int i = 0; i < listing.length; i++) { if (listing[i].isDirectory()) { groups.add(listing[i].getName()); } } } catch (Exception e) { // ignore and return an empty vector. } return (groups); }
|
public Vector getProgramGroups(int userType) { // if( userType > CURRENT_USER ) // if( System.getProperty( "user.name" ).equals( "root" ) ) // System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File(System.getProperty("user.home")); File kdeHomeShareApplnk; try { File kdeHome = new File(homedir.toString() + FS + ".kde"); if (!kdeHome.exists()) return (groups); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); if (!kdeHomeShare.exists()) return (groups); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders = { "applnk-mdk", "applnk-redhat", "applnk"}; for (int i = 0; i < applnkFolders.length; i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder = applnkFolders[i]; break; } } if (!kdeHomeShareApplnk.exists()) return (groups); } catch (Exception e1) { // e1.printStackTrace(); return (groups); } try { File[] listing = kdeHomeShareApplnk.listFiles(); for (int i = 0; i < listing.length; i++) { if (listing[i].isDirectory()) { groups.add(listing[i].getName()); } } } catch (Exception e) { // ignore and return an empty vector. } return (groups); }
| 3,241,358 |
public Vector getProgramGroups(int userType) { // if( userType > CURRENT_USER ) // if( System.getProperty( "user.name" ).equals( "root" ) ) String FS = File.separator; // System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File(System.getProperty("user.home")); File kdeHomeShareApplnk; try { File kdeHome = new File(homedir.toString() + FS + ".kde"); if (!kdeHome.exists()) return (groups); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); if (!kdeHomeShare.exists()) return (groups); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders = { "applnk-mdk", "applnk-redhat", "applnk"}; for (int i = 0; i < applnkFolders.length; i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder = applnkFolders[i]; break; } } if (!kdeHomeShareApplnk.exists()) return (groups); } catch (Exception e1) { // e1.printStackTrace(); return (groups); } try { File[] listing = kdeHomeShareApplnk.listFiles(); for (int i = 0; i < listing.length; i++) { if (listing[i].isDirectory()) { groups.add(listing[i].getName()); } } } catch (Exception e) { // ignore and return an empty vector. } return (groups); }
|
public Vector getProgramGroups(int userType) { // if( userType > CURRENT_USER ) // if( System.getProperty( "user.name" ).equals( "root" ) ) String FS = File.separator; // System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File(System.getProperty("user.home")); File kdeHomeShareApplnk; try { File kdeHome = new File(homedir.toString() + FS + ".kde"); if (!kdeHome.exists()) return (groups); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); if (!kdeHomeShare.exists()) return (groups); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders = { "applnk-mdk", "applnk-redhat", "applnk"}; for (int i = 0; i < applnkFolders.length; i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder = applnkFolders[i]; break; } } if (!kdeHomeShareApplnk.exists()) return (groups); } catch (Exception e1) { // e1.printStackTrace(); return (groups); } try { File[] listing = kdeHomeShareApplnk.listFiles(); for (int i = 0; i < listing.length; i++) { if (listing[i].isDirectory()) { groups.add(listing[i].getName()); } } } catch (Exception e) { // ignore and return an empty vector. } return (groups); }
| 3,241,359 |
public Vector getProgramGroups(int userType) { // if( userType > CURRENT_USER ) // if( System.getProperty( "user.name" ).equals( "root" ) ) String FS = File.separator; // System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File(System.getProperty("user.home")); File kdeHomeShareApplnk; try { File kdeHome = new File(homedir.toString() + FS + ".kde"); if (!kdeHome.exists()) return (groups); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); if (!kdeHomeShare.exists()) return (groups); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders = { "applnk-mdk", "applnk-redhat", "applnk"}; for (int i = 0; i < applnkFolders.length; i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder = applnkFolders[i]; break; } } if (!kdeHomeShareApplnk.exists()) return (groups); } catch (Exception e1) { // e1.printStackTrace(); return (groups); } try { File[] listing = kdeHomeShareApplnk.listFiles(); for (int i = 0; i < listing.length; i++) { if (listing[i].isDirectory()) { groups.add(listing[i].getName()); } } } catch (Exception e) { // ignore and return an empty vector. } return (groups); }
|
public Vector getProgramGroups(int userType) { // if( userType > CURRENT_USER ) // if( System.getProperty( "user.name" ).equals( "root" ) ) String FS = File.separator; // System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File(System.getProperty("user.home")); File kdeHomeShareApplnk; try { File kdeHome = new File(homedir.toString() + FS + ".kde"); if (!kdeHome.exists()) return (groups); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); if (!kdeHomeShare.exists()) return (groups); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders = { "applnk-mdk", "applnk-redhat", "applnk"}; for (int i = 0; i < applnkFolders.length; i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder = applnkFolders[i]; break; } } if (!kdeHomeShareApplnk.exists()) return (groups); } catch (Exception e1) { // e1.printStackTrace(); return (groups); } try { File[] listing = kdeShareApplnk.listFiles(); for (int i = 0; i < listing.length; i++) { if (listing[i].isDirectory()) { groups.add(listing[i].getName()); } } } catch (Exception e) { // ignore and return an empty vector. } return (groups); }
| 3,241,360 |
private void initProps() { String[] propsArray = { $Comment, $$LANG_Comment, $Encoding, $Exec, $Arguments, $GenericName, $$LANG_GenericName, $MimeType, $Name, $$LANG_Name, $Path, $ServiceTypes, $SwallowExec, $SwallowTitle, $Terminal, $Options_For_Terminal, $Type, $X_KDE_SubstituteUID, $X_KDE_Username, $Icon, $URL}; for (int i = 0; i < propsArray.length; i++) { props.put(propsArray[i], ""); } }
|
private void initProps() { String[] propsArray = { $Comment, $$LANG_Comment, $Encoding, $Exec, $Arguments, $GenericName, $$LANG_GenericName, $MimeType, $Name, $$LANG_Name, $Path, $ServiceTypes, $SwallowExec, $SwallowTitle, $Terminal, $Options_For_Terminal, $Type, $X_KDE_SubstituteUID, $X_KDE_Username, $Icon, $URL, $E_QUOT, $P_QUOT }; for (int i = 0; i < propsArray.length; i++) { props.put(propsArray[i], ""); } }
| 3,241,362 |
public String replace() { String result = new String(template); Enumeration enum = props.keys(); while (enum.hasMoreElements()) { String key = (String) enum.nextElement(); // **DEBUG: System.out.println(key+"="+props.getProperty( key )); result = StringTool.replace(result, key, props.getProperty(key)); }
|
public String replace() { String result = new String(template); Enumeration enum = props.keys(); while (enum.hasMoreElements()) { String key = (String) enum.nextElement(); // **DEBUG: System.out.println(key+"="+props.getProperty( key )); result = StringTool.replace(result, key, props.getProperty(key)); }
| 3,241,363 |
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
|
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); boolean rootUser4All = this.getUserType() == Shortcut.ALL_USERS; boolean create4All = this.getCreateForAll().booleanValue(); if ("".equals(this.itsGroupName) && this.getLinkType() == Shortcut.DESKTOP) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
| 3,241,364 |
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
|
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
| 3,241,365 |
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
|
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
| 3,241,366 |
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
|
public void save() throws Exception { String FS = File.separator; String target = null; String shortCutDef = this.replace(); if ((this.itsGroupName == null) || ("".equals(this.itsGroupName))) { target = System.getProperty("user.home") + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File(System.getProperty("user.home")); File kdeHome = new File(homedir.toString() + FS + ".kde"); File kdeHomeShare = new File(kdeHome.toString() + FS + "share"); File kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File(target.toString().substring(0, target.toString().lastIndexOf(File.separatorChar))); if (!targetPath.exists()) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String(target); File targetFileName = new File(target); FileWriter fileWriter = null; try { fileWriter = new FileWriter(targetFileName); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write(shortCutDef); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); } }
| 3,241,367 |
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
|
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
| 3,241,372 |
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
|
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
| 3,241,373 |
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
|
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
| 3,241,374 |
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JDK5_ANNOTATION_TYPE; } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return TestNG.JDK5_ANNOTATION_TYPE; }
|
private static String convert(String annotationType) { if("1.5".equals(annotationType) || TestNG.JDK5_ANNOTATION_TYPE.equals(annotationType)) { return annoType.toString(); } if("1.4".equals(annotationType) || TestNG.JAVADOC_ANNOTATION_TYPE.equals(annotationType)) { return TestNG.JAVADOC_ANNOTATION_TYPE; } TestNGPlugin.log(new Status(IStatus.INFO, TestNGPlugin.PLUGIN_ID, 1, "Unknown annotation type '" + annotationType + "' Using default: " + TestNG.JDK5_ANNOTATION_TYPE , null) ); return annoType.toString(); }
| 3,241,375 |
public static File createSuite(IJavaProject ijp, IType[] types, IJavaElement ije) { XMLStringBuffer xmlSuite = getSuiteBuffer(ije.getElementName()); if(IJavaElement.COMPILATION_UNIT == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.TYPE == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.METHOD == ije.getElementType()) { createMethodTest(types, ije, xmlSuite); } xmlSuite.pop("suite"); final String projectPath = ijp.getProject().getLocation().toOSString(); File file = new File(projectPath, ije.getElementName() + ".xml"); ppp("saving to file " + file.getAbsolutePath()); saveFileContent(file, xmlSuite); return file; }
|
public static File createSuite(IJavaProject ijp, IType[] types, IJavaElement ije) { XMLStringBuffer xmlSuite = getSuiteBuffer(ije.getElementName()); if(IJavaElement.COMPILATION_UNIT == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.TYPE == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.METHOD == ije.getElementType()) { createMethodTest(types, ije, xmlSuite); } xmlSuite.pop("suite"); final String projectPath = ijp.getProject().getLocation().toOSString(); File file = new File(projectPath, ije.getElementName() + ".xml"); ppp("saving to file " + file.getAbsolutePath()); saveFileContent(file, xmlSuite); return file; }
| 3,241,376 |
public static File createSuite(IJavaProject ijp, IType[] types, IJavaElement ije) { XMLStringBuffer xmlSuite = getSuiteBuffer(ije.getElementName()); if(IJavaElement.COMPILATION_UNIT == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.TYPE == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.METHOD == ije.getElementType()) { createMethodTest(types, ije, xmlSuite); } xmlSuite.pop("suite"); final String projectPath = ijp.getProject().getLocation().toOSString(); File file = new File(projectPath, ije.getElementName() + ".xml"); ppp("saving to file " + file.getAbsolutePath()); saveFileContent(file, xmlSuite); return file; }
|
public static File createSuite(IJavaProject ijp, IType[] types, IJavaElement ije) { XMLStringBuffer xmlSuite = getSuiteBuffer(ije.getElementName()); if(IJavaElement.COMPILATION_UNIT == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.TYPE == ije.getElementType()) { createClassTest(types, ije, xmlSuite); } else if(IJavaElement.METHOD == ije.getElementType()) { createMethodTest(types, ije, xmlSuite); } xmlSuite.pop("suite"); final String projectPath = ijp.getProject().getLocation().toOSString(); File file = new File(projectPath, ije.getElementName() + ".xml"); ppp("saving to file " + file.getAbsolutePath()); saveFileContent(file, xmlSuite); return file; }
| 3,241,377 |
public ChannelBindings(int index, double inputStart, double inputEnd, int red, int green, int blue, int alpha, boolean active) { this.index = index; setInputWindow(inputStart, inputEnd); rgba = new int[4]; setRGBA(red, green, blue, alpha); this.active = active; }
|
public ChannelBindings(int index, double inputStart, double inputEnd, int red, int green, int blue, int alpha, boolean active) { this.index = index; setInputWindow(inputStart, inputEnd); rgba = new int[4]; setRGBA(red, green, blue, alpha); this.active = active; }
| 3,241,378 |
ChannelBindings copy() { ChannelBindings cb = new ChannelBindings(); cb.index = this.index; cb.active = this.active; //Will work b/c the objects are read-only: Integer, Float, etc. cb.inputStart = this.inputStart; cb.inputEnd = this.inputEnd; cb.rgba = getRGBA(); return cb; }
|
ChannelBindings copy() { ChannelBindings cb = new ChannelBindings(); cb.index = this.index; cb.active = this.active; //Will work b/c the objects are read-only: Integer, Float, etc. cb.inputStart = this.inputStart; cb.inputEnd = this.inputEnd; cb.rgba = getRGBA(); return cb; }
| 3,241,380 |
private void verifyColorComponent(int c) { if (c < COLOR_MIN || COLOR_MAX < c) throw new IllegalArgumentException("Value must be in [0,255]."); }
|
private void verifyColorComponent(int c) { if (c < COLOR_MIN || COLOR_MAX < c) throw new IllegalArgumentException("Value must be in [0,255]."); }
| 3,241,381 |
public int executeCommand(String[] params, String[] output) { StringBuffer retval = new StringBuffer(); retval.append("executeCommand\n"); if (params != null) { for (int i = 0; i < params.length; i++) { retval.append("\tparams: " + params[i]); retval.append("\n"); } } Process process = null; MonitorInputStream outMonitor = null; MonitorInputStream errMonitor = null; Thread t1 = null; Thread t2 = null; int exitStatus = -1; Debug.trace(retval); try { // execute command process = Runtime.getRuntime().exec(params); boolean console = false;// TODO: impl from xml <execute // in_console=true ...>, but works already // if this flag is true if (console) { Console c = new Console(process); // save command output output[0] = c.getOutputData(); output[1] = c.getErrorData(); exitStatus = process.exitValue(); } else { StringWriter outWriter = new StringWriter(); StringWriter errWriter = new StringWriter(); InputStreamReader or = new InputStreamReader(process.getInputStream()); InputStreamReader er = new InputStreamReader(process.getErrorStream()); outMonitor = new MonitorInputStream(or, outWriter); errMonitor = new MonitorInputStream(er, errWriter); t1 = new Thread(outMonitor); t2 = new Thread(errMonitor); t1.setDaemon(true); t2.setDaemon(true); t1.start(); t2.start(); // wait for command to complete exitStatus = process.waitFor(); t1.join(); t2.join(); // save command output output[0] = outWriter.toString(); Debug.trace("stdout:"); Debug.trace(output[0]); output[1] = errWriter.toString(); Debug.trace("stderr:"); Debug.trace(output[1]); } Debug.trace("exit status: " + Integer.toString(exitStatus)); } catch (InterruptedException e) { if (Debug.tracing()) e.printStackTrace(System.err); stopThread(t1, outMonitor); stopThread(t2, errMonitor); output[0] = ""; output[1] = e.getMessage() + "\n"; process.destroy(); } catch (IOException e) { if (Debug.tracing()) e.printStackTrace(System.err); output[0] = ""; output[1] = e.getMessage() + "\n"; } return exitStatus; }
|
public int executeCommand(String[] params, String[] output) { StringBuffer retval = new StringBuffer(); retval.append("executeCommand\n"); if (params != null) { for (int i = 0; i < params.length; i++) { retval.append("\tparams: ").append(params[i]); retval.append("\n"); } } Process process = null; MonitorInputStream outMonitor = null; MonitorInputStream errMonitor = null; Thread t1 = null; Thread t2 = null; int exitStatus = -1; Debug.trace(retval); try { // execute command process = Runtime.getRuntime().exec(params); boolean console = false;// TODO: impl from xml <execute // in_console=true ...>, but works already // if this flag is true if (console) { Console c = new Console(process); // save command output output[0] = c.getOutputData(); output[1] = c.getErrorData(); exitStatus = process.exitValue(); } else { StringWriter outWriter = new StringWriter(); StringWriter errWriter = new StringWriter(); InputStreamReader or = new InputStreamReader(process.getInputStream()); InputStreamReader er = new InputStreamReader(process.getErrorStream()); outMonitor = new MonitorInputStream(or, outWriter); errMonitor = new MonitorInputStream(er, errWriter); t1 = new Thread(outMonitor); t2 = new Thread(errMonitor); t1.setDaemon(true); t2.setDaemon(true); t1.start(); t2.start(); // wait for command to complete exitStatus = process.waitFor(); t1.join(); t2.join(); // save command output output[0] = outWriter.toString(); Debug.trace("stdout:"); Debug.trace(output[0]); output[1] = errWriter.toString(); Debug.trace("stderr:"); Debug.trace(output[1]); } Debug.trace("exit status: " + Integer.toString(exitStatus)); } catch (InterruptedException e) { if (Debug.tracing()) e.printStackTrace(System.err); stopThread(t1, outMonitor); stopThread(t2, errMonitor); output[0] = ""; output[1] = e.getMessage() + "\n"; process.destroy(); } catch (IOException e) { if (Debug.tracing()) e.printStackTrace(System.err); output[0] = ""; output[1] = e.getMessage() + "\n"; } return exitStatus; }
| 3,241,382 |
public void addJarContent(String file) throws Exception { sendMsg("Adding a jar file content ..."); JarFile jar = new JarFile(file); Enumeration entries = jar.entries(); while (entries.hasMoreElements()) { // Puts a new entry ZipEntry zentry = (ZipEntry) entries.nextElement(); try { InputStream zin = jar.getInputStream(zentry); outJar.putNextEntry(new ZipEntry(zentry.getName())); // Copy the data copyStream(zin, outJar); outJar.closeEntry(); zin.close(); } catch (ZipException zerr) { } } }
|
public void addJarContent(String file) throws Exception { sendMsg("Adding a jar file content ..."); JarFile jar = new JarFile(file); Enumeration entries = jar.entries(); while (entries.hasMoreElements()) { // Puts a new entry ZipEntry zentry = (ZipEntry) entries.nextElement(); try { InputStream zin = jar.getInputStream(zentry); outJar.putNextEntry(new ZipEntry(zentry.getName())); // Copy the data copyStream(zin, outJar); outJar.closeEntry(); zin.close(); } catch (ZipException zerr) { } } }
| 3,241,383 |
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); webJar.putNextEntry(entry); return webJar; }
|
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); webJar.putNextEntry(entry); return webJar; }
| 3,241,384 |
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); webJar.putNextEntry(entry); return webJar; }
|
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); webJar.putNextEntry(entry); return webJar; }
| 3,241,385 |
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry(new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
|
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry(new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
| 3,241,386 |
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry(new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
|
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry( new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
| 3,241,387 |
public boolean allowPackFileBackReferences() { return false; }
|
public boolean allowPackFileBackReferences() { return false; }
| 3,241,388 |
public void setPanelsOrder(ArrayList order) throws Exception { sendMsg("Setting the panels order ..."); outJar.putNextEntry(new ZipEntry("panelsOrder")); ObjectOutputStream objOut = new ObjectOutputStream(outJar); objOut.writeObject(order); objOut.flush(); outJar.closeEntry(); }
|
public void setPanelsOrder(ArrayList order) throws Exception { sendMsg("Setting the panels order ..."); outJar.putNextEntry(new ZipEntry("panelsOrder")); ObjectOutputStream objOut = new ObjectOutputStream(outJar); objOut.writeObject(order); objOut.flush(); outJar.closeEntry(); }
| 3,241,389 |
public void setPanelsOrder(ArrayList order) throws Exception { sendMsg("Setting the panels order ..."); outJar.putNextEntry(new ZipEntry("panelsOrder")); ObjectOutputStream objOut = new ObjectOutputStream(outJar); objOut.writeObject(order); objOut.flush(); outJar.closeEntry(); }
|
public void setPanelsOrder(ArrayList order) throws Exception { sendMsg("Setting the panels order ..."); outJar.putNextEntry(new ZipEntry("panelsOrder")); ObjectOutputStream objOut = new ObjectOutputStream(outJar); objOut.writeObject(order); objOut.flush(); outJar.closeEntry(); }
| 3,241,390 |
private void addComboBox (XMLElement spec) { Vector forPacks = spec.getChildrenNamed (PACKS); Vector forOs = spec.getChildrenNamed(OS); XMLElement element = spec.getFirstChildNamed (SPEC); String variable = spec.getAttribute (VARIABLE); TextValuePair listItem = null; JComboBox field = new JComboBox (); JLabel label; // ---------------------------------------------------- // extract the specification details // ---------------------------------------------------- if (element != null) { label = new JLabel (getText (element)); Vector choices = element.getChildrenNamed (COMBO_CHOICE); if (choices == null) { return; } for (int i = 0; i < choices.size (); i++) { String processorClass = ((XMLElement)choices.elementAt (i)).getAttribute("processor"); if (!"".equals(processorClass)) { String choiceValues = ""; try { choiceValues = ((Processor) Class.forName(processorClass).newInstance()).process(null); } catch (Throwable t) { t.printStackTrace(); } String set = ((XMLElement)choices.elementAt (i)).getAttribute (SET); if (set == null) { set = ""; } StringTokenizer tokenizer = new StringTokenizer(choiceValues, ":"); int counter = 0; while (tokenizer.hasMoreTokens()){ String token = tokenizer.nextToken(); listItem = new TextValuePair(token, token); field.addItem(listItem); if (set.equals(token)){ field.setSelectedIndex (field.getItemCount()-1); } counter++; } } else { listItem = new TextValuePair (getText ((XMLElement)choices.elementAt (i)), ((XMLElement)choices.elementAt (i)).getAttribute (COMBO_VALUE)); field.addItem (listItem); String set = ((XMLElement)choices.elementAt (i)).getAttribute (SET); if (set != null) { if (set.equals (TRUE)) { field.setSelectedIndex (i); } } } } } // ---------------------------------------------------- // if there is no specification element, return without // doing anything. // ---------------------------------------------------- else { return; } // ---------------------------------------------------- // get the description and add it to the list of UI // elements if it exists. // ---------------------------------------------------- element = spec.getFirstChildNamed (DESCRIPTION); addDescription (element, forPacks, forOs); TwoColumnConstraints constraints = new TwoColumnConstraints (); constraints.position = TwoColumnConstraints.WEST; uiElements.add (new Object [] {null, FIELD_LABEL, null, constraints, label, forPacks, forOs}); TwoColumnConstraints constraints2 = new TwoColumnConstraints (); constraints2.position = TwoColumnConstraints.EAST; uiElements.add (new Object [] {null, COMBO_FIELD, variable, constraints2, field, forPacks, forOs}); }
|
private void addComboBox (XMLElement spec) { Vector forPacks = spec.getChildrenNamed (PACKS); Vector forOs = spec.getChildrenNamed(OS); XMLElement element = spec.getFirstChildNamed (SPEC); String variable = spec.getAttribute (VARIABLE); TextValuePair listItem = null; JComboBox field = new JComboBox (); JLabel label; // ---------------------------------------------------- // extract the specification details // ---------------------------------------------------- if (element != null) { label = new JLabel (getText (element)); Vector choices = element.getChildrenNamed (COMBO_CHOICE); if (choices == null) { return; } for (int i = 0; i < choices.size (); i++) { String processorClass = ((XMLElement)choices.elementAt (i)).getAttribute("processor"); if (processorClass != null && !"".equals(processorClass)) { String choiceValues = ""; try { choiceValues = ((Processor) Class.forName(processorClass).newInstance()).process(null); } catch (Throwable t) { t.printStackTrace(); } String set = ((XMLElement)choices.elementAt (i)).getAttribute (SET); if (set == null) { set = ""; } StringTokenizer tokenizer = new StringTokenizer(choiceValues, ":"); int counter = 0; while (tokenizer.hasMoreTokens()){ String token = tokenizer.nextToken(); listItem = new TextValuePair(token, token); field.addItem(listItem); if (set.equals(token)){ field.setSelectedIndex (field.getItemCount()-1); } counter++; } } else { listItem = new TextValuePair (getText ((XMLElement)choices.elementAt (i)), ((XMLElement)choices.elementAt (i)).getAttribute (COMBO_VALUE)); field.addItem (listItem); String set = ((XMLElement)choices.elementAt (i)).getAttribute (SET); if (set != null) { if (set.equals (TRUE)) { field.setSelectedIndex (i); } } } } } // ---------------------------------------------------- // if there is no specification element, return without // doing anything. // ---------------------------------------------------- else { return; } // ---------------------------------------------------- // get the description and add it to the list of UI // elements if it exists. // ---------------------------------------------------- element = spec.getFirstChildNamed (DESCRIPTION); addDescription (element, forPacks, forOs); TwoColumnConstraints constraints = new TwoColumnConstraints (); constraints.position = TwoColumnConstraints.WEST; uiElements.add (new Object [] {null, FIELD_LABEL, null, constraints, label, forPacks, forOs}); TwoColumnConstraints constraints2 = new TwoColumnConstraints (); constraints2.position = TwoColumnConstraints.EAST; uiElements.add (new Object [] {null, COMBO_FIELD, variable, constraints2, field, forPacks, forOs}); }
| 3,241,391 |
public NativeInstallerListener(boolean useSpecHelper) { super(useSpecHelper); }
|
public NativeInstallerListener() { super(useSpecHelper); }
| 3,241,392 |
public NativeInstallerListener(boolean useSpecHelper) { super(useSpecHelper); }
|
public NativeInstallerListener(boolean useSpecHelper) { super(); }
| 3,241,393 |
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
|
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if ("N".equals(token)) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
| 3,241,395 |
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
|
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if ("H".equals(token)) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
| 3,241,396 |
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
|
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if ("A".equals(token)) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
| 3,241,397 |
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
|
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if ("O".equals(token)) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
| 3,241,398 |
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
|
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if ("AN".equals(token)) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
| 3,241,399 |
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if (token.equals("U")) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
|
public FieldSpec(String spec) throws Exception { StringTokenizer tokenizer = new StringTokenizer(spec, ":"); if ((tokenizer.countTokens() >= MIN_TOKENS) && (tokenizer.countTokens() <= MAX_TOKENS)) { String token = tokenizer.nextToken().toUpperCase(); // ------------------------------------------------ // test the first token for a valid type identifier // if it's valid assign the token to the type. // ------------------------------------------------ if (token.equals("N")) { type = RuleTextField.N; } else if (token.equals("H")) { type = RuleTextField.H; } else if (token.equals("A")) { type = RuleTextField.A; } else if (token.equals("O")) { type = RuleTextField.O; } else if (token.equals("AN")) { type = RuleTextField.AN; } else { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the size // of the field and assing to columns. // ------------------------------------------------ try { token = tokenizer.nextToken(); columns = Integer.parseInt(token); } catch (Throwable exception) { throw (new Exception()); } // ------------------------------------------------ // test for a valid integer to define the edit // length and assign to editLength. If this fails // test for identifier for unlimited edit length. // If this works, set unlimitedEdit to true. // ------------------------------------------------ try { token = tokenizer.nextToken().toUpperCase(); editLength = Integer.parseInt(token); } catch (Throwable exception) { if ("U".equals(token)) { unlimitedEdit = true; } else { throw (new Exception()); } } } else { throw (new Exception()); } }
| 3,241,400 |
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("") && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("")) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { ; } } } }
|
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!"".equals(className) && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("")) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { ; } } } }
| 3,241,401 |
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("") && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("")) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { ; } } } }
|
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("") && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!"".equals(className)) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { ; } } } }
| 3,241,402 |
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("") && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!className.equals("")) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { ; } } } }
|
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data) String token String indexString int index boolean process = false String[] vals = null int i = 0 vals = new String[tokenizer.countTokens()] while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken() indexString = token.substring(0, token.indexOf(':')) try { index = Integer.parseInt(indexString) if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()) String className = "" if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1) val = val.substring(0, val.indexOf(":")) } if (!className.equals("") && !process) { process = true } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()) val = vs.substitute(val, null) vals[i] = val i++ ((JTextField) inputFields.elementAt(index)).setText(val) } } catch (Throwable exception) { exception.printStackTrace() } } if (process) { tokenizer = new StringTokenizer(data) while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken() indexString = token.substring(0, token.indexOf(':')) try { index = Integer.parseInt(indexString) if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()) String className = "" String presult = "" if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1) val = val.substring(0, val.indexOf(":")) } if (!className.equals("")) { Processor p = (Processor) Class.forName(className).newInstance() presult = p.process(this) } String[] td = new RE("\\*").split(presult) ((JTextField) inputFields.elementAt(index)).setText(td[index]) } } catch (Throwable exception) { } } } }
| 3,241,403 |
public StdPackager(String outputFilename, PackagerListener plistener) throws Exception { packs = new ArrayList(); langpacks = new ArrayList(); setPackagerListener(plistener); sendStart(); // Sets up the zipped output stream FileOutputStream outFile = new FileOutputStream(outputFilename); outJar = new JarOutputStream(outFile); outJar.setLevel(Deflater.BEST_COMPRESSION); // Copies the skeleton installer sendMsg("Copying the skeleton installer ..."); writeSkeletonInstaller (outJar); }
|
public StdPackager(String outputFilename, PackagerListener plistener) throws Exception { packs = new ArrayList(); langpacks = new ArrayList(); setPackagerListener(plistener); sendStart(); // Sets up the zipped output stream FileOutputStream outFile = new FileOutputStream(outputFilename); outJar = new JarOutputStream(outFile); outJar.setLevel(Deflater.BEST_COMPRESSION); // Copies the skeleton installer sendMsg("Copying the skeleton installer ..."); writeSkeletonInstaller (outJar); }
| 3,241,404 |
public StdPackager(String outputFilename, PackagerListener plistener) throws Exception { packs = new ArrayList(); langpacks = new ArrayList(); setPackagerListener(plistener); sendStart(); // Sets up the zipped output stream FileOutputStream outFile = new FileOutputStream(outputFilename); outJar = new JarOutputStream(outFile); outJar.setLevel(Deflater.BEST_COMPRESSION); // Copies the skeleton installer sendMsg("Copying the skeleton installer ..."); writeSkeletonInstaller (outJar); }
|
public StdPackager(String outputFilename, PackagerListener plistener) throws Exception { packs = new ArrayList(); langpacks = new ArrayList(); setPackagerListener(plistener); sendStart(); // Sets up the zipped output stream FileOutputStream outFile = new FileOutputStream(outputFilename); outJar = new JarOutputStream(outFile); outJar.setLevel(Deflater.BEST_COMPRESSION); // Copies the skeleton installer sendMsg("Copying the skeleton installer ..."); writeSkeletonInstaller(outJar); }
| 3,241,405 |
public void addJarContent(String file) throws Exception { sendMsg("Adding a jar file content ..."); JarFile jar = new JarFile(file); Enumeration entries = jar.entries(); while (entries.hasMoreElements()) { // Puts a new entry ZipEntry zentry = (ZipEntry) entries.nextElement(); try { InputStream zin = jar.getInputStream(zentry); outJar.putNextEntry(new ZipEntry(zentry.getName())); // Copy the data copyStream(zin, outJar); outJar.closeEntry(); zin.close(); } catch (ZipException zerr) { } } }
|
public void addJarContent(String file) throws Exception { sendMsg("Adding a jar file content ..."); JarFile jar = new JarFile(file); Enumeration entries = jar.entries(); while (entries.hasMoreElements()) { // Puts a new entry ZipEntry zentry = (ZipEntry) entries.nextElement(); try { InputStream zin = jar.getInputStream(zentry); outJar.putNextEntry(new ZipEntry(zentry.getName())); // Copy the data copyStream(zin, outJar); outJar.closeEntry(); zin.close(); } catch (ZipException zerr) { } } }
| 3,241,406 |
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; }
|
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; }
| 3,241,407 |
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; }
|
public ZipOutputStream addPack(int packNumber, String name, List osConstraints, boolean required, String description, boolean preselected) throws Exception { sendMsg("Adding pack #" + packNumber + " : " + name + " ..."); // Adds it in the packs array Pack pack = new Pack(name, description, osConstraints, required, preselected); packs.add(packNumber, pack); // Returns the suiting output stream String entryName = "packs/pack" + packNumber; ZipEntry entry = new ZipEntry(entryName); outJar.putNextEntry(entry); return outJar; }
| 3,241,408 |
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry(new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
|
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry(new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
| 3,241,409 |
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry(new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
|
public void addPanelClass(String classFilename, InputStream input) throws Exception { sendMsg("Adding the (sub)classes for " + classFilename + " ..."); outJar.putNextEntry( new ZipEntry("com/izforge/izpack/panels/" + classFilename)); copyStream(input, outJar); outJar.closeEntry(); }
| 3,241,410 |
public boolean allowPackFileBackReferences() { return true; }
|
public boolean allowPackFileBackReferences() { return true; }
| 3,241,411 |
public void setPanelsOrder(ArrayList order) throws Exception { sendMsg("Setting the panels order ..."); outJar.putNextEntry(new ZipEntry("panelsOrder")); ObjectOutputStream objOut = new ObjectOutputStream(outJar); objOut.writeObject(order); objOut.flush(); outJar.closeEntry(); }
|
public void setPanelsOrder(ArrayList order) throws Exception { sendMsg("Setting the panels order ..."); outJar.putNextEntry(new ZipEntry("panelsOrder")); ObjectOutputStream objOut = new ObjectOutputStream(outJar); objOut.writeObject(order); objOut.flush(); outJar.closeEntry(); }
| 3,241,412 |
public boolean valueExist(String key, String value) throws NativeLibException { try { this.getValue(currentRoot, key, value); } catch (NativeLibException ne) { String em = ne.getLibMessage(); if (em.equals("functionFailed.RegOpenKeyEx")) { return (false); } throw (ne); } return (true); }
|
public boolean valueExist(String key, String value) throws NativeLibException { try { this.getValue(currentRoot, key, value); } catch (NativeLibException ne) { String em = ne.getLibMessage(); if (em.equals("functionFailed.RegOpenKeyEx") || em.equals("functionFailed.RegQueryValueEx")) { return (false); } throw (ne); } return (true); }
| 3,241,413 |
public static String stringArrayListToString(ArrayList aStringList) { StringBuffer temp = new StringBuffer(); for (int idx = 0; idx < aStringList.size(); idx++) { temp.append(aStringList.get(idx) + "\n"); } return temp.toString(); }
|
public static String stringArrayListToString(ArrayList aStringList) { StringBuffer temp = new StringBuffer(); for (int idx = 0; idx < aStringList.size(); idx++) { temp.append(aStringList.get(idx)).append("\n"); } return temp.toString(); }
| 3,241,414 |
public void windowClosing(WindowEvent e) { // We show an alert anyway if (!installdata.canClose) JOptionPane.showMessageDialog(null, langpack.getString("installer.quit.message"), langpack.getString("installer.warning"), JOptionPane.ERROR_MESSAGE); Housekeeper.getInstance ().shutDown (0); }
|
wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); public void windowClosing(WindowEvent e)wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); {wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); // We show an alert anywaywipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); if (!installdata.canClose)wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); JOptionPane.showMessageDialog(null, langpack.getString("installer.quit.message"),wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); langpack.getString("installer.warning"),wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); JOptionPane.ERROR_MESSAGE);wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); Housekeeper.getInstance ().shutDown (0);wipeAborted(); wipeAborted(); wipeAborted(); wipeAborted(); }
| 3,241,415 |
public void activateObject(Object obj) { }
|
public void activateObject(Object obj) { }
| 3,241,417 |
void setThrowExceptionOnPassivate(boolean bool) { exceptionOnPassivate = bool; }
|
public void setThrowExceptionOnPassivate(boolean bool) { exceptionOnPassivate = bool; }
| 3,241,418 |
public boolean validateObject(Object obj) { return validateCounter++%2 == 0 ? evenValid : oddValid; }
|
public boolean validateObject(Object obj) { return validateCounter++%2 == 0 ? evenValid : oddValid; }
| 3,241,419 |
public int executeFiles(int currentStage, AbstractUIHandler handler) { int exitStatus = 0; String[] output = new String[2]; String pathSep = System.getProperty("path.separator"); String osName = System.getProperty("os.name").toLowerCase(); String permissions = (System.getProperty("user.name").equals("root")) ? "a+x" : "u+x"; // loop through all executables Iterator efileIterator = files.iterator(); while ((exitStatus == 0) && efileIterator.hasNext()) { ExecutableFile efile = (ExecutableFile) efileIterator.next(); boolean deleteAfterwards = ! efile.keepFile; File file = new File(efile.path); Debug.trace("handeling executable file "+efile); // skip file if not for current OS (it might not have been installed at all) if (! OsConstraint.oneMatchesCurrentSystem (efile.osList)) continue; if(currentStage!=ExecutableFile.UNINSTALL) { // fix executable permission for unix systems if (pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x"))) { Debug.trace("making file executable (setting executable flag)"); String[] params = {"/bin/chmod", permissions, file.toString()}; exitStatus = executeCommand(params, output); } } // execute command in POSTINSTALL stage if ((exitStatus == 0) && ((currentStage == ExecutableFile.POSTINSTALL && efile.executionStage == ExecutableFile.POSTINSTALL) || (currentStage==ExecutableFile.UNINSTALL && efile.executionStage == ExecutableFile.UNINSTALL))) { List paramList = new ArrayList(); if (ExecutableFile.BIN == efile.type) paramList.add(file.toString()); else if (ExecutableFile.JAR == efile.type && null == efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-jar"); paramList.add(file.toString()); } else if (ExecutableFile.JAR == efile.type && null != efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-cp=" + file.toString()); paramList.add(efile.mainClass); } if (null != efile.argList && !efile.argList.isEmpty()) paramList.addAll(efile.argList); String[] params = new String[paramList.size()]; for (int i = 0; i < paramList.size(); i++) params[i] = (String) paramList.get(i); exitStatus = executeCommand(params, output); // bring a dialog depending on return code and failure handling if (exitStatus != 0) { deleteAfterwards = false; String message = output[0] + "\n" + output[1]; if (message.length() == 1) message = new String("Failed to execute " + file.toString() + "."); if (efile.onFailure == ExecutableFile.ABORT) { // CHECKME: let the user decide or abort anyway? handler.emitError("file execution error", message); } else if (efile.onFailure == ExecutableFile.WARN) { // CHECKME: let the user decide or abort anyway? handler.emitWarning ("file execution error", message); exitStatus = 0; } else { if (handler.askQuestion (null, "Continue?", AbstractUIHandler.CHOICES_YES_NO) == AbstractUIHandler.ANSWER_YES) exitStatus = 0; } } } // POSTINSTALL executables will be deleted if (efile.executionStage == ExecutableFile.POSTINSTALL && deleteAfterwards) { if (file.canWrite()) file.delete(); } } return exitStatus; }
|
public int executeFiles(int currentStage, AbstractUIHandler handler) { int exitStatus = 0; String[] output = new String[2]; String pathSep = System.getProperty("path.separator"); String osName = System.getProperty("os.name").toLowerCase(); String permissions = (System.getProperty("user.name").equals("root")) ? "a+x" : "u+x"; // loop through all executables Iterator efileIterator = files.iterator(); while ((exitStatus == 0) && efileIterator.hasNext()) { ExecutableFile efile = (ExecutableFile) efileIterator.next(); boolean deleteAfterwards = ! efile.keepFile; File file = new File(efile.path); Debug.trace("handeling executable file "+efile); // skip file if not for current OS (it might not have been installed at all) if (! OsConstraint.oneMatchesCurrentSystem (efile.osList)) continue; if(currentStage!=ExecutableFile.UNINSTALL) { // fix executable permission for unix systems if (pathSep.equals(":") && (!osName.startsWith("mac") || osName.endsWith("x"))) { Debug.trace("making file executable (setting executable flag)"); String[] params = {"/bin/chmod", permissions, file.toString()}; exitStatus = executeCommand(params, output); } } // execute command in POSTINSTALL stage if ((exitStatus == 0) && ((currentStage == ExecutableFile.POSTINSTALL && efile.executionStage == ExecutableFile.POSTINSTALL) || (currentStage==ExecutableFile.UNINSTALL && efile.executionStage == ExecutableFile.UNINSTALL))) { List paramList = new ArrayList(); if (ExecutableFile.BIN == efile.type) paramList.add(file.toString()); else if (ExecutableFile.JAR == efile.type && null == efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-jar"); paramList.add(file.toString()); } else if (ExecutableFile.JAR == efile.type && null != efile.mainClass) { paramList.add(System.getProperty("java.home") + "/bin/java"); paramList.add("-cp " + file.toString()); paramList.add(efile.mainClass); } if (null != efile.argList && !efile.argList.isEmpty()) paramList.addAll(efile.argList); String[] params = new String[paramList.size()]; for (int i = 0; i < paramList.size(); i++) params[i] = (String) paramList.get(i); exitStatus = executeCommand(params, output); // bring a dialog depending on return code and failure handling if (exitStatus != 0) { deleteAfterwards = false; String message = output[0] + "\n" + output[1]; if (message.length() == 1) message = new String("Failed to execute " + file.toString() + "."); if (efile.onFailure == ExecutableFile.ABORT) { // CHECKME: let the user decide or abort anyway? handler.emitError("file execution error", message); } else if (efile.onFailure == ExecutableFile.WARN) { // CHECKME: let the user decide or abort anyway? handler.emitWarning ("file execution error", message); exitStatus = 0; } else { if (handler.askQuestion (null, "Continue?", AbstractUIHandler.CHOICES_YES_NO) == AbstractUIHandler.ANSWER_YES) exitStatus = 0; } } } // POSTINSTALL executables will be deleted if (efile.executionStage == ExecutableFile.POSTINSTALL && deleteAfterwards) { if (file.canWrite()) file.delete(); } } return exitStatus; }
| 3,241,421 |
public void caretUpdate(CaretEvent event) { String text = activeField.getText(); int fieldSize = activeField.getEditLength(); int caretPosition = activeField.getCaretPosition(); int selection = activeField.getSelectionEnd() - activeField.getSelectionStart(); if ((!inputFields.lastElement().equals(activeField)) && (!activeField.unlimitedEdit())) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { activeField.transferFocus(); } } }
|
public void caretUpdate(CaretEvent event) { String text = activeField.getText(); int fieldSize = activeField.getEditLength(); int caretPosition = activeField.getCaretPosition(); int selection = activeField.getSelectionEnd() - activeField.getSelectionStart(); if ((!inputFields.lastElement().equals(activeField)) && (!activeField.unlimitedEdit())) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { activeField.transferFocus(); } } }
| 3,241,422 |
public void caretUpdate(CaretEvent event) { String text = activeField.getText(); int fieldSize = activeField.getEditLength(); int caretPosition = activeField.getCaretPosition(); int selection = activeField.getSelectionEnd() - activeField.getSelectionStart(); if ((!inputFields.lastElement().equals(activeField)) && (!activeField.unlimitedEdit())) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { activeField.transferFocus(); } } }
|
public void caretUpdate(CaretEvent event) { String text = activeField.getText(); int fieldSize = activeField.getEditLength(); int caretPosition = activeField.getCaretPosition(); int selection = activeField.getSelectionEnd() - activeField.getSelectionStart(); if ((!inputFields.lastElement().equals(activeField)) && (!activeField.unlimitedEdit())) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { activeField.transferFocus(); } } }
| 3,241,423 |
public void caretUpdate(CaretEvent event) { String text = activeField.getText(); int fieldSize = activeField.getEditLength(); int caretPosition = activeField.getCaretPosition(); int selection = activeField.getSelectionEnd() - activeField.getSelectionStart(); if ((!inputFields.lastElement().equals(activeField)) && (!activeField.unlimitedEdit())) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { activeField.transferFocus(); } } }
|
public void caretUpdate(CaretEvent event) { String text = activeField.getText(); int fieldSize = activeField.getEditLength(); int caretPosition = activeField.getCaretPosition(); int selection = activeField.getSelectionEnd() - activeField.getSelectionStart(); if ((!inputFields.lastElement().equals(activeField)) && (!activeField.unlimitedEdit())) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { if ((text.length() == fieldSize) && (selection == 0) && (caretPosition == fieldSize) && !backstep) { activeField.transferFocus(); } } } }
| 3,241,424 |
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!"".equals(className) && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!"".equals(className)) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { } } } }
|
private void setFields(String data) { StringTokenizer tokenizer = new StringTokenizer(data); String token; String indexString; int index; boolean process = false; String[] vals = null; int i = 0; vals = new String[tokenizer.countTokens()]; while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!"".equals(className) && !process) { process = true; } VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); val = vs.substitute(val, null); vals[i] = val; i++; ((JTextField) inputFields.elementAt(index)).setText(val); } } catch (Throwable exception) { exception.printStackTrace(); } } if (process) { tokenizer = new StringTokenizer(data); while (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); indexString = token.substring(0, token.indexOf(':')); try { index = Integer.parseInt(indexString); if (index < inputFields.size()) { String val = token.substring((token.indexOf(':') + 1), token.length()); String className = ""; String presult = ""; if (val.indexOf(":") > -1) { className = val.substring(val.indexOf(":") + 1); val = val.substring(0, val.indexOf(":")); } if (!"".equals(className)) { Processor p = (Processor) Class.forName(className).newInstance(); presult = p.process(this); } String[] td = new RE("\\*").split(presult); ((JTextField) inputFields.elementAt(index)).setText(td[index]); } } catch (Throwable exception) { } } } }
| 3,241,425 |
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // We load the licence loadLicence(); // We put our components JLabel infoLabel = LabelFactory.create(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); add(infoLabel); add(Box.createRigidArea(new Dimension(0, 3))); textArea = new JTextArea(licence); textArea.setMargin(new Insets(2, 2, 2, 2)); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); scroller.setAlignmentX(LEFT_ALIGNMENT); add(scroller); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.agree"), false); group.add(yesRadio); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.notagree"), true); group.add(noRadio); add(noRadio); noRadio.addActionListener(this); }
|
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // We load the licence loadLicence(); // We put our components JLabel infoLabel = LabelFactory.create(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); add(infoLabel); add(Box.createRigidArea(new Dimension(0, 3))); JTextArea textArea = new JTextArea(licence); textArea.setMargin(new Insets(2, 2, 2, 2)); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); scroller.setAlignmentX(LEFT_ALIGNMENT); add(scroller); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.agree"), false); group.add(yesRadio); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.notagree"), true); group.add(noRadio); add(noRadio); noRadio.addActionListener(this); }
| 3,241,426 |
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // We load the licence loadLicence(); // We put our components JLabel infoLabel = LabelFactory.create(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); add(infoLabel); add(Box.createRigidArea(new Dimension(0, 3))); textArea = new JTextArea(licence); textArea.setMargin(new Insets(2, 2, 2, 2)); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); scroller.setAlignmentX(LEFT_ALIGNMENT); add(scroller); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.agree"), false); group.add(yesRadio); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.notagree"), true); group.add(noRadio); add(noRadio); noRadio.addActionListener(this); }
|
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // We load the licence loadLicence(); // We put our components JLabel infoLabel = LabelFactory.create(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); add(infoLabel); add(Box.createRigidArea(new Dimension(0, 3))); textArea = new JTextArea(licence); textArea.setMargin(new Insets(2, 2, 2, 2)); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); JScrollPane scroller = new JScrollPane(textArea); scroller.setAlignmentX(LEFT_ALIGNMENT); add(scroller); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.agree"), false); group.add(yesRadio); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.notagree"), true); group.add(noRadio); add(noRadio); noRadio.addActionListener(this); }
| 3,241,427 |
synchronized String debugInfo() { StringBuffer buf = new StringBuffer(); buf.append("Active: ").append(numActive()).append("\n"); buf.append("Idle: ").append(numIdle()).append("\n"); Iterator it = _poolList.iterator(); while(it.hasNext()) { buf.append("\t").append(_poolMap.get(it.next())).append("\n"); } return buf.toString(); }
|
synchronized String debugInfo() { StringBuffer buf = new StringBuffer(); buf.append("Active: ").append(numActive()).append("\n"); buf.append("Idle: ").append(numIdle()).append("\n"); Iterator it = _poolList.iterator(); while(it.hasNext()) { buf.append("\t").append(_poolMap.get(it.next())).append("\n"); } return buf.toString(); }
| 3,241,428 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
| 3,241,429 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
| 3,241,430 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
| 3,241,431 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { try { _factory.passivateObject(key, obj); } catch(Exception e) { success = false; } } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
| 3,241,432 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
| 3,241,433 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
| 3,241,434 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { } } notifyAll(); }
| 3,241,435 |
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } notifyAll(); }
|
public synchronized void returnObject(Object key, Object obj) throws Exception { _totalActive--; CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); if(null == pool) { pool = new CursorableLinkedList(); _poolMap.put(key,pool); _poolList.add(key); } Integer active = (Integer)(_activeMap.get(key)); if(null == active) { // do nothing, either null or zero is OK } else if(active.intValue() <= 1) { _activeMap.remove(key); } else { _activeMap.put(key,new Integer(active.intValue() - 1)); } if(_maxIdle > 0 && (pool.size() >= _maxIdle || (_testOnReturn && !_factory.validateObject(key,obj)))) { try { _factory.passivateObject(key,obj); } catch(Exception e) { ; // ignored, we're throwing it out anyway } _factory.destroyObject(key,obj); } else { try { _factory.passivateObject(key,obj); pool.addFirst(new ObjectTimestampPair(obj)); _totalIdle++; } catch(Exception e) { _factory.destroyObject(key,obj); } } }
| 3,241,436 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.