rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
private boolean attributeIsTrue (XMLElement element, String name) { String value = element.getAttribute (name, "").toUpperCase (); if (value.equals ("YES")) { return (true); } else if (value.equals ("TRUE")) { return (true); } else if (value.equals ("ON")) { return (true); } else if (value.equals ("1")) { return (true); } return (false); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void buildAlternateUI () { layout = new GridBagLayout (); constraints = new GridBagConstraints (); setLayout (layout); // ---------------------------------------------------- // static text a the top of the panel, that apologizes // about the fact that we can not create shortcuts on // this particular target OS. // ---------------------------------------------------- MultiLineLabel apologyLabel = new MultiLineLabel (parent.langpack.getString ("ShortcutPanel.alternate.apology"), 0, 0); constraints.gridx = 0; constraints.gridy = 0; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 1.0; constraints.weighty = 1.0; constraints.insets = new Insets (5, 5, 5, 5); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent (apologyLabel, constraints); add (apologyLabel); // ---------------------------------------------------- // label that explains the significance ot the list box // ---------------------------------------------------- MultiLineLabel listLabel = new MultiLineLabel (parent.langpack.getString ("ShortcutPanel.alternate.targetsLabel"), 0, 0); constraints.gridx = 0; constraints.gridy = 1; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 1.0; constraints.weighty = 1.0; layout.addLayoutComponent (listLabel, constraints); add (listLabel); // ---------------------------------------------------- // list box to list all of the intended shortcut targets // ---------------------------------------------------- Vector targets = new Vector (); for (int i = 0; i < shortcuts.size (); i++) { targets.add (((ShortcutData)shortcuts.elementAt (i)).target); } targetList = new JList (targets); JScrollPane scrollPane = new JScrollPane (targetList); constraints.gridx = 0; constraints.gridy = 2; constraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent (scrollPane, constraints); add (scrollPane); // ---------------------------------------------------- // static text that explains about the text file // ---------------------------------------------------- MultiLineLabel fileExplanation = new MultiLineLabel (parent.langpack.getString ("ShortcutPanel.alternate.textFileExplanation"), 0, 0); constraints.gridx = 0; constraints.gridy = 3; constraints.weightx = 1.0; constraints.weighty = 1.0; constraints.fill = GridBagConstraints.HORIZONTAL; layout.addLayoutComponent (fileExplanation, constraints); add (fileExplanation); // ---------------------------------------------------- // button to save the text file // ---------------------------------------------------- saveButton = ButtonFactory.createButton( parent.langpack.getString("ShortcutPanel.alternate.saveButton"), idata.buttonsHColor); saveButton.addActionListener(this); constraints.gridx = 0; constraints.gridy = 4; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.NONE; constraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(saveButton, constraints); add(saveButton); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void buildUI (Vector groups, boolean currentUserList) { layout = new GridBagLayout (); constraints = new GridBagConstraints (); setLayout(layout); // ---------------------------------------------------- // label a the top of the panel, that gives the // basic instructions // ---------------------------------------------------- listLabel = LabelFactory.create (parent.langpack.getString ("ShortcutPanel.regular.list"), JLabel.LEADING); constraints.gridx = 0; constraints.gridy = 0; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 1.0; constraints.weighty = 1.0; constraints.insets = new Insets (5, 5, 5, 5); constraints.fill = GridBagConstraints.NONE; constraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent (listLabel, constraints); add (listLabel); // ---------------------------------------------------- // list box to list all of the existing program groups // at the intended destination // ---------------------------------------------------- groupList = new JList (groups); groupList.setSelectionMode (ListSelectionModel.SINGLE_SELECTION); groupList.getSelectionModel ().addListSelectionListener (this); JScrollPane scrollPane = new JScrollPane (groupList); constraints.gridx = 0; constraints.gridy = 1; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent (scrollPane, constraints); add (scrollPane); // ---------------------------------------------------- // radio buttons to select current user or all users. // ---------------------------------------------------- if (shortcut.multipleUsers ()) { JPanel usersPanel = new JPanel (new GridLayout (2, 1)); ButtonGroup usersGroup = new ButtonGroup (); currentUser = new JRadioButton (parent.langpack.getString ("ShortcutPanel.regular.currentUser"), currentUserList); currentUser.addActionListener (this); usersGroup.add (currentUser); usersPanel.add (currentUser); allUsers = new JRadioButton (parent.langpack.getString ("ShortcutPanel.regular.allUsers"), !currentUserList); if( ! OsConstraint.isWindows() ) allUsers.setEnabled( false ); allUsers.addActionListener (this); usersGroup.add (allUsers); usersPanel.add (allUsers); TitledBorder border = new TitledBorder (new EmptyBorder(2, 2, 2, 2), parent.langpack.getString ("ShortcutPanel.regular.userIntro")); usersPanel.setBorder (border); constraints.gridx = 1; constraints.gridy = 1; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent (usersPanel, constraints); add (usersPanel); } // ---------------------------------------------------- // edit box that contains the suggested program group // name, which can be modfied or substituted from the // list by the user // ---------------------------------------------------- programGroup = new JTextField (suggestedProgramGroup, 40); // 40? constraints.gridx = 0; constraints.gridy = 2; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.HORIZONTAL; layout.addLayoutComponent (programGroup, constraints); add (programGroup); // ---------------------------------------------------- // reset button that allows the user to revert to the // original suggestion for the program group // ---------------------------------------------------- defaultButton = ButtonFactory.createButton( parent.langpack.getString("ShortcutPanel.regular.default"), idata.buttonsHColor); defaultButton.addActionListener(this); constraints.gridx = 1; constraints.gridy = 2; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent(defaultButton, constraints); add(defaultButton); // ---------------------------------------------------- // check box to allow the user to decide if a desktop // shortcut should be created. // this should only be created if needed and requested // in the definition file. // ---------------------------------------------------- allowDesktopShortcut = new JCheckBox (parent.langpack.getString ("ShortcutPanel.regular.desktop"), true); constraints.gridx = 0; constraints.gridy = 3; constraints.gridwidth = 1; constraints.gridheight = 1; if (hasDesktopShortcuts) { layout.addLayoutComponent (allowDesktopShortcut, constraints); add (allowDesktopShortcut); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
allUsers.addActionListener (this);
allUsers.addActionListener (this);
private void buildUI (Vector groups, boolean currentUserList) { layout = new GridBagLayout (); constraints = new GridBagConstraints (); setLayout(layout); // ---------------------------------------------------- // label a the top of the panel, that gives the // basic instructions // ---------------------------------------------------- listLabel = LabelFactory.create (parent.langpack.getString ("ShortcutPanel.regular.list"), JLabel.LEADING); constraints.gridx = 0; constraints.gridy = 0; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.weightx = 1.0; constraints.weighty = 1.0; constraints.insets = new Insets (5, 5, 5, 5); constraints.fill = GridBagConstraints.NONE; constraints.anchor = GridBagConstraints.WEST; layout.addLayoutComponent (listLabel, constraints); add (listLabel); // ---------------------------------------------------- // list box to list all of the existing program groups // at the intended destination // ---------------------------------------------------- groupList = new JList (groups); groupList.setSelectionMode (ListSelectionModel.SINGLE_SELECTION); groupList.getSelectionModel ().addListSelectionListener (this); JScrollPane scrollPane = new JScrollPane (groupList); constraints.gridx = 0; constraints.gridy = 1; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent (scrollPane, constraints); add (scrollPane); // ---------------------------------------------------- // radio buttons to select current user or all users. // ---------------------------------------------------- if (shortcut.multipleUsers ()) { JPanel usersPanel = new JPanel (new GridLayout (2, 1)); ButtonGroup usersGroup = new ButtonGroup (); currentUser = new JRadioButton (parent.langpack.getString ("ShortcutPanel.regular.currentUser"), currentUserList); currentUser.addActionListener (this); usersGroup.add (currentUser); usersPanel.add (currentUser); allUsers = new JRadioButton (parent.langpack.getString ("ShortcutPanel.regular.allUsers"), !currentUserList); if( ! OsConstraint.isWindows() ) allUsers.setEnabled( false ); allUsers.addActionListener (this); usersGroup.add (allUsers); usersPanel.add (allUsers); TitledBorder border = new TitledBorder (new EmptyBorder(2, 2, 2, 2), parent.langpack.getString ("ShortcutPanel.regular.userIntro")); usersPanel.setBorder (border); constraints.gridx = 1; constraints.gridy = 1; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent (usersPanel, constraints); add (usersPanel); } // ---------------------------------------------------- // edit box that contains the suggested program group // name, which can be modfied or substituted from the // list by the user // ---------------------------------------------------- programGroup = new JTextField (suggestedProgramGroup, 40); // 40? constraints.gridx = 0; constraints.gridy = 2; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.HORIZONTAL; layout.addLayoutComponent (programGroup, constraints); add (programGroup); // ---------------------------------------------------- // reset button that allows the user to revert to the // original suggestion for the program group // ---------------------------------------------------- defaultButton = ButtonFactory.createButton( parent.langpack.getString("ShortcutPanel.regular.default"), idata.buttonsHColor); defaultButton.addActionListener(this); constraints.gridx = 1; constraints.gridy = 2; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.fill = GridBagConstraints.NONE; layout.addLayoutComponent(defaultButton, constraints); add(defaultButton); // ---------------------------------------------------- // check box to allow the user to decide if a desktop // shortcut should be created. // this should only be created if needed and requested // in the definition file. // ---------------------------------------------------- allowDesktopShortcut = new JCheckBox (parent.langpack.getString ("ShortcutPanel.regular.desktop"), true); constraints.gridx = 0; constraints.gridy = 3; constraints.gridwidth = 1; constraints.gridheight = 1; if (hasDesktopShortcuts) { layout.addLayoutComponent (allowDesktopShortcut, constraints); add (allowDesktopShortcut); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
Vector intermediates = new Vector();
Vector intermediates = new Vector();
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void createShortcuts () { ShortcutData data; for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); try { groupName = groupName + data.subgroup; shortcut.setLinkName( data.name ); shortcut.setLinkType( data.type ); shortcut.setArguments( data.commandLine ); shortcut.setDescription( data.description ); shortcut.setIconLocation( data.iconFile, data.iconIndex ); shortcut.setShowCommand( data.initialState); shortcut.setTargetPath( data.target ); shortcut.setWorkingDirectory( data.workingDirectory ); shortcut.setEncoding( data.deskTopEntryLinux_Encoding ); shortcut.setMimetype( data.deskTopEntryLinux_MimeType ); shortcut.setTerminal( data.deskTopEntryLinux_Terminal ); shortcut.setTerminalOptions( data.deskTopEntryLinux_TerminalOptions ); shortcut.setType( data.deskTopEntryLinux_Type ); shortcut.setKdeSubstUID( data.deskTopEntryLinux_X_KDE_SubstituteUID ); shortcut.setURL( data.deskTopEntryLinux_URL ); if( data.addToGroup ) { shortcut.setProgramGroup (groupName); } else { shortcut.setProgramGroup (""); } try { // ---------------------------------------------- // save the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { // save the shortcut shortcut.save (); // add the file and directory name to the file list String fileName = shortcut.getFileName (); files.add (0, fileName); File file = new File(fileName); File base = new File(shortcut.getBasePath()); Vector intermediates = new Vector(); //String directoryName = shortcut.getDirectoryCreated (); execFiles.add( new ExecutableFile( fileName, 2, ExecutableFile.NEVER, new ArrayList(), false ) ); files.add( fileName ); while ( ( file = file.getParentFile()) != null) { if (file.equals( base )) break; intermediates.add(file); } if (file != null) { for (Iterator iter = intermediates.iterator(); iter.hasNext(); ) files.add (0, iter.next().toString()); } } } catch (Exception exception) { } } catch (Throwable exception) { continue; } } //System.out.println( "files:" + files ); try { FileExecutor executor = new FileExecutor( execFiles ); executor.executeFiles( ExecutableFile.NEVER, null ); } catch( Exception cannot ){ cannot.printStackTrace(); } parent.unlockNextButton(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private String fixSeparatorChar (String path) { String newPath = path.replace ('/', File.separatorChar); newPath = newPath.replace ('\\', File.separatorChar); return (newPath); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
Border border = getBorder ();
Border border = getBorder ();
public Dimension getSize () { Dimension size = getParent ().getSize (); Insets insets = getInsets (); Border border = getBorder (); Insets borderInsets = new Insets (0, 0, 0, 0); if (border != null) { borderInsets = border.getBorderInsets (this); } size.height = size.height - insets.top - insets.bottom - borderInsets.top - borderInsets.bottom - 50; size.width = size.width - insets.left - insets.right - borderInsets.left - borderInsets.right - 50; return (size); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public Dimension getSize () { Dimension size = getParent ().getSize (); Insets insets = getInsets (); Border border = getBorder (); Insets borderInsets = new Insets (0, 0, 0, 0); if (border != null) { borderInsets = border.getBorderInsets (this); } size.height = size.height - insets.top - insets.bottom - borderInsets.top - borderInsets.bottom - 50; size.width = size.width - insets.left - insets.right - borderInsets.left - borderInsets.right - 50; return (size); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public Dimension getSize () { Dimension size = getParent ().getSize (); Insets insets = getInsets (); Border border = getBorder (); Insets borderInsets = new Insets (0, 0, 0, 0); if (border != null) { borderInsets = border.getBorderInsets (this); } size.height = size.height - insets.top - insets.bottom - borderInsets.top - borderInsets.bottom - 50; size.width = size.width - insets.left - insets.right - borderInsets.left - borderInsets.right - 50; return (size); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public Dimension getSize () { Dimension size = getParent ().getSize (); Insets insets = getInsets (); Border border = getBorder (); Insets borderInsets = new Insets (0, 0, 0, 0); if (border != null) { borderInsets = border.getBorderInsets (this); } size.height = size.height - insets.top - insets.bottom - borderInsets.top - borderInsets.bottom - 50; size.width = size.width - insets.left - insets.right - borderInsets.left - borderInsets.right - 50; return (size); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; }
try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; }
public boolean isValidated () { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); return (true); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
createShortcuts (); addToUninstaller ();
createShortcuts (); addToUninstaller ();
public boolean isValidated () { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); return (true); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
if (!shortcutsToCreate ||
if (!shortcutsToCreate ||
public void makeXMLData (XMLElement panelRoot) { // ---------------------------------------------------- // if there are no shortcuts to create, shortcuts are // not supported, or we should simulate that they are // not supported, then we have nothing to add. Just // return // ---------------------------------------------------- if (!shortcutsToCreate || !shortcut.supported () || simulteNotSupported ) { return; } ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // add the item that defines the name of the program group // ---------------------------------------------------- dataElement = new XMLElement (AUTO_KEY_PROGRAM_GROUP); dataElement.setAttribute (AUTO_ATTRIBUTE_NAME, groupName); panelRoot.addChild (dataElement); // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); dataElement = new XMLElement (AUTO_KEY_SHORTCUT); dataElement.setAttribute (AUTO_ATTRIBUTE_NAME, data.name); dataElement.setAttribute (AUTO_ATTRIBUTE_GROUP, Boolean.valueOf(data.addToGroup).toString ()); dataElement.setAttribute (AUTO_ATTRIBUTE_TYPE, Integer.toString (data.type)); dataElement.setAttribute (AUTO_ATTRIBUTE_COMMAND, data.commandLine); dataElement.setAttribute (AUTO_ATTRIBUTE_DESCRIPTION, data.description); dataElement.setAttribute (AUTO_ATTRIBUTE_ICON, data.iconFile); dataElement.setAttribute (AUTO_ATTRIBUTE_ICON_INDEX, Integer.toString (data.iconIndex)); dataElement.setAttribute (AUTO_ATTRIBUTE_INITIAL_STATE, Integer.toString (data.initialState)); dataElement.setAttribute (AUTO_ATTRIBUTE_TARGET, data.target); dataElement.setAttribute (AUTO_ATTRIBUTE_WORKING_DIR, data.workingDirectory); // ---------------------------------------------- // add the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { panelRoot.addChild (dataElement); } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void makeXMLData (XMLElement panelRoot) { // ---------------------------------------------------- // if there are no shortcuts to create, shortcuts are // not supported, or we should simulate that they are // not supported, then we have nothing to add. Just // return // ---------------------------------------------------- if (!shortcutsToCreate || !shortcut.supported () || simulteNotSupported ) { return; } ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // add the item that defines the name of the program group // ---------------------------------------------------- dataElement = new XMLElement (AUTO_KEY_PROGRAM_GROUP); dataElement.setAttribute (AUTO_ATTRIBUTE_NAME, groupName); panelRoot.addChild (dataElement); // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- for (int i = 0; i < shortcuts.size (); i++) { data = (ShortcutData)shortcuts.elementAt (i); dataElement = new XMLElement (AUTO_KEY_SHORTCUT); dataElement.setAttribute (AUTO_ATTRIBUTE_NAME, data.name); dataElement.setAttribute (AUTO_ATTRIBUTE_GROUP, Boolean.valueOf(data.addToGroup).toString ()); dataElement.setAttribute (AUTO_ATTRIBUTE_TYPE, Integer.toString (data.type)); dataElement.setAttribute (AUTO_ATTRIBUTE_COMMAND, data.commandLine); dataElement.setAttribute (AUTO_ATTRIBUTE_DESCRIPTION, data.description); dataElement.setAttribute (AUTO_ATTRIBUTE_ICON, data.iconFile); dataElement.setAttribute (AUTO_ATTRIBUTE_ICON_INDEX, Integer.toString (data.iconIndex)); dataElement.setAttribute (AUTO_ATTRIBUTE_INITIAL_STATE, Integer.toString (data.initialState)); dataElement.setAttribute (AUTO_ATTRIBUTE_TARGET, data.target); dataElement.setAttribute (AUTO_ATTRIBUTE_WORKING_DIR, data.workingDirectory); // ---------------------------------------------- // add the shortcut only if it is either not on // the desktop or if it is on the desktop and // the user has signalled that it is ok to place // shortcuts on the desktop. // ---------------------------------------------- if ( (data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP) && allowDesktopShortcut.isSelected ()) ) { panelRoot.addChild (dataElement); } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void panelActivate () { if (firstTime) firstTime = false; else return; analyzeShortcutSpec (); if (shortcutsToCreate) { if (shortcut.supported () && !simulteNotSupported) { buildUI (shortcut.getProgramGroups (ShellLink.CURRENT_USER), true); // always start out with the current user } else { if (skipIfNotSupported) { parent.skipPanel(); } else { buildAlternateUI (); parent.unlockNextButton(); parent.lockPrevButton (); } } } else { parent.skipPanel (); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception
private void readShortcutSpec () throws Exception
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME );
input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME );
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void readShortcutSpec () throws Exception { // open an input stream InputStream input = null; try { input = parent.getResource( TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME ); } catch( ResourceNotFoundException e ) { input = parent.getResource( SPEC_FILE_NAME ); if( input == null ) { haveShortcutSpec = false; return; } } // initialize the parser StdXMLParser parser = new StdXMLParser (); parser.setBuilder (new StdXMLBuilder ()); parser.setValidator (new NonValidator ()); parser.setReader (new StdXMLReader (input)); // get the data spec = (XMLElement) parser.parse (); // close the stream input.close (); haveShortcutSpec = true; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void runAutomated (XMLElement panelRoot) { // ---------------------------------------------------- // if shortcuts are not supported, then we can not // create shortcuts, even if there was any install // data. Just return. // ---------------------------------------------------- if (!shortcut.supported ()) { return; } shortcuts = new Vector (); Vector shortcutElements; ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // set the name of the program group // ---------------------------------------------------- dataElement = panelRoot.getFirstChildNamed (AUTO_KEY_PROGRAM_GROUP); groupName = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); if (groupName == null) { groupName = ""; } // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- shortcutElements = panelRoot.getChildrenNamed (AUTO_KEY_SHORTCUT); for (int i = 0; i < shortcutElements.size (); i++) { data = new ShortcutData (); dataElement = (XMLElement)shortcutElements.elementAt (i); data.name = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); data.addToGroup = Boolean.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_GROUP)).booleanValue (); data.type = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_TYPE)).intValue (); data.commandLine = dataElement.getAttribute (AUTO_ATTRIBUTE_COMMAND); data.description = dataElement.getAttribute (AUTO_ATTRIBUTE_DESCRIPTION); data.iconFile = dataElement.getAttribute (AUTO_ATTRIBUTE_ICON); data.iconIndex = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_ICON_INDEX)).intValue (); data.initialState = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_INITIAL_STATE)).intValue (); data.target = dataElement.getAttribute (AUTO_ATTRIBUTE_TARGET); data.workingDirectory = dataElement.getAttribute (AUTO_ATTRIBUTE_WORKING_DIR); shortcuts.add (data); } createShortcuts (); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void runAutomated (XMLElement panelRoot) { // ---------------------------------------------------- // if shortcuts are not supported, then we can not // create shortcuts, even if there was any install // data. Just return. // ---------------------------------------------------- if (!shortcut.supported ()) { return; } shortcuts = new Vector (); Vector shortcutElements; ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // set the name of the program group // ---------------------------------------------------- dataElement = panelRoot.getFirstChildNamed (AUTO_KEY_PROGRAM_GROUP); groupName = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); if (groupName == null) { groupName = ""; } // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- shortcutElements = panelRoot.getChildrenNamed (AUTO_KEY_SHORTCUT); for (int i = 0; i < shortcutElements.size (); i++) { data = new ShortcutData (); dataElement = (XMLElement)shortcutElements.elementAt (i); data.name = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); data.addToGroup = Boolean.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_GROUP)).booleanValue (); data.type = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_TYPE)).intValue (); data.commandLine = dataElement.getAttribute (AUTO_ATTRIBUTE_COMMAND); data.description = dataElement.getAttribute (AUTO_ATTRIBUTE_DESCRIPTION); data.iconFile = dataElement.getAttribute (AUTO_ATTRIBUTE_ICON); data.iconIndex = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_ICON_INDEX)).intValue (); data.initialState = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_INITIAL_STATE)).intValue (); data.target = dataElement.getAttribute (AUTO_ATTRIBUTE_TARGET); data.workingDirectory = dataElement.getAttribute (AUTO_ATTRIBUTE_WORKING_DIR); shortcuts.add (data); } createShortcuts (); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void runAutomated (XMLElement panelRoot) { // ---------------------------------------------------- // if shortcuts are not supported, then we can not // create shortcuts, even if there was any install // data. Just return. // ---------------------------------------------------- if (!shortcut.supported ()) { return; } shortcuts = new Vector (); Vector shortcutElements; ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // set the name of the program group // ---------------------------------------------------- dataElement = panelRoot.getFirstChildNamed (AUTO_KEY_PROGRAM_GROUP); groupName = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); if (groupName == null) { groupName = ""; } // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- shortcutElements = panelRoot.getChildrenNamed (AUTO_KEY_SHORTCUT); for (int i = 0; i < shortcutElements.size (); i++) { data = new ShortcutData (); dataElement = (XMLElement)shortcutElements.elementAt (i); data.name = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); data.addToGroup = Boolean.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_GROUP)).booleanValue (); data.type = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_TYPE)).intValue (); data.commandLine = dataElement.getAttribute (AUTO_ATTRIBUTE_COMMAND); data.description = dataElement.getAttribute (AUTO_ATTRIBUTE_DESCRIPTION); data.iconFile = dataElement.getAttribute (AUTO_ATTRIBUTE_ICON); data.iconIndex = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_ICON_INDEX)).intValue (); data.initialState = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_INITIAL_STATE)).intValue (); data.target = dataElement.getAttribute (AUTO_ATTRIBUTE_TARGET); data.workingDirectory = dataElement.getAttribute (AUTO_ATTRIBUTE_WORKING_DIR); shortcuts.add (data); } createShortcuts (); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void runAutomated (XMLElement panelRoot) { // ---------------------------------------------------- // if shortcuts are not supported, then we can not // create shortcuts, even if there was any install // data. Just return. // ---------------------------------------------------- if (!shortcut.supported ()) { return; } shortcuts = new Vector (); Vector shortcutElements; ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // set the name of the program group // ---------------------------------------------------- dataElement = panelRoot.getFirstChildNamed (AUTO_KEY_PROGRAM_GROUP); groupName = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); if (groupName == null) { groupName = ""; } // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- shortcutElements = panelRoot.getChildrenNamed (AUTO_KEY_SHORTCUT); for (int i = 0; i < shortcutElements.size (); i++) { data = new ShortcutData (); dataElement = (XMLElement)shortcutElements.elementAt (i); data.name = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); data.addToGroup = Boolean.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_GROUP)).booleanValue (); data.type = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_TYPE)).intValue (); data.commandLine = dataElement.getAttribute (AUTO_ATTRIBUTE_COMMAND); data.description = dataElement.getAttribute (AUTO_ATTRIBUTE_DESCRIPTION); data.iconFile = dataElement.getAttribute (AUTO_ATTRIBUTE_ICON); data.iconIndex = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_ICON_INDEX)).intValue (); data.initialState = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_INITIAL_STATE)).intValue (); data.target = dataElement.getAttribute (AUTO_ATTRIBUTE_TARGET); data.workingDirectory = dataElement.getAttribute (AUTO_ATTRIBUTE_WORKING_DIR); shortcuts.add (data); } createShortcuts (); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void runAutomated (XMLElement panelRoot) { // ---------------------------------------------------- // if shortcuts are not supported, then we can not // create shortcuts, even if there was any install // data. Just return. // ---------------------------------------------------- if (!shortcut.supported ()) { return; } shortcuts = new Vector (); Vector shortcutElements; ShortcutData data; XMLElement dataElement; // ---------------------------------------------------- // set the name of the program group // ---------------------------------------------------- dataElement = panelRoot.getFirstChildNamed (AUTO_KEY_PROGRAM_GROUP); groupName = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); if (groupName == null) { groupName = ""; } // ---------------------------------------------------- // add the details for each of the shortcuts // ---------------------------------------------------- shortcutElements = panelRoot.getChildrenNamed (AUTO_KEY_SHORTCUT); for (int i = 0; i < shortcutElements.size (); i++) { data = new ShortcutData (); dataElement = (XMLElement)shortcutElements.elementAt (i); data.name = dataElement.getAttribute (AUTO_ATTRIBUTE_NAME); data.addToGroup = Boolean.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_GROUP)).booleanValue (); data.type = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_TYPE)).intValue (); data.commandLine = dataElement.getAttribute (AUTO_ATTRIBUTE_COMMAND); data.description = dataElement.getAttribute (AUTO_ATTRIBUTE_DESCRIPTION); data.iconFile = dataElement.getAttribute (AUTO_ATTRIBUTE_ICON); data.iconIndex = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_ICON_INDEX)).intValue (); data.initialState = Integer.valueOf (dataElement.getAttribute (AUTO_ATTRIBUTE_INITIAL_STATE)).intValue (); data.target = dataElement.getAttribute (AUTO_ATTRIBUTE_TARGET); data.workingDirectory = dataElement.getAttribute (AUTO_ATTRIBUTE_WORKING_DIR); shortcuts.add (data); } createShortcuts (); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
output = new FileWriter (file);
output = new FileWriter (file);
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
}
}
private void saveToFile () { File file = null; // ---------------------------------------------------- // open a file chooser dialog to get a path / file name // ---------------------------------------------------- JFileChooser fileDialog = new JFileChooser (idata.getInstallPath ()); fileDialog.setSelectedFile (new File (TEXT_FILE_NAME)); if(fileDialog.showSaveDialog (this) == JFileChooser.APPROVE_OPTION) { file = fileDialog.getSelectedFile (); } else { return; } // ---------------------------------------------------- // save to the file // ---------------------------------------------------- FileWriter output = null; StringBuffer buffer = new StringBuffer (); String header = parent.langpack.getString ("ShortcutPanel.textFile.header"); String newline = System.getProperty ("line.separator", "\n"); try { output = new FileWriter (file); } catch (Throwable exception) { // !!! show an error dialog return; } // ---------------------------------------------------- // break the header down into multiple lines based // on '\n' line breaks. // ---------------------------------------------------- int nextIndex = 0; int currentIndex = 0; do { nextIndex = header.indexOf ("\\n", currentIndex); if (nextIndex > -1) { buffer.append (header.substring (currentIndex, nextIndex)); buffer.append (newline); currentIndex = nextIndex + 2; } else { buffer.append (header.substring (currentIndex, header.length ())); buffer.append (newline); } } while (nextIndex > -1); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); for (int i = 0; i < shortcuts.size (); i++) { ShortcutData data = (ShortcutData)shortcuts.elementAt (i); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.name")); buffer.append (data.name); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.location")); switch (data.type) { case Shortcut.DESKTOP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.desktop")); break; } case Shortcut.APPLICATIONS : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.applications")); break; } case Shortcut.START_MENU : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startMenu")); break; } case Shortcut.START_UP : { buffer.append (parent.langpack.getString ("ShortcutPanel.location.startup")); break; } } buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.description")); buffer.append (data.description); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.target")); buffer.append (data.target); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.command")); buffer.append (data.commandLine); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconName")); buffer.append (data.iconFile); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.iconIndex")); buffer.append (data.iconIndex); buffer.append (newline); buffer.append (parent.langpack.getString ("ShortcutPanel.textFile.work")); buffer.append (data.workingDirectory); buffer.append (newline); buffer.append (newline); buffer.append (SEPARATOR_LINE); buffer.append (newline); buffer.append (newline); } try { output.write (buffer.toString ()); } catch (Throwable exception) { } finally { try { output.flush (); output.close (); files.add (file.getPath ()); } catch (Throwable exception) { // not really anything I can do here, maybe should show a dialog that // tells the user that data might not have been saved completely!? } } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private boolean shortcutRequiredFor (Vector packs) { String selected; String required; if (packs.size () == 0) { return (true); } for (int i = 0; i < idata.selectedPacks.size (); i++) { selected = ((Pack)idata.selectedPacks.get (i)).name; for (int k = 0; k < packs.size (); k++) { required = (String)((XMLElement)packs.elementAt (k)).getAttribute (SPEC_ATTRIBUTE_NAME, ""); if (selected.equals (required)) { return (true); } } } return (false); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private boolean shortcutRequiredFor (Vector packs) { String selected; String required; if (packs.size () == 0) { return (true); } for (int i = 0; i < idata.selectedPacks.size (); i++) { selected = ((Pack)idata.selectedPacks.get (i)).name; for (int k = 0; k < packs.size (); k++) { required = (String)((XMLElement)packs.elementAt (k)).getAttribute (SPEC_ATTRIBUTE_NAME, ""); if (selected.equals (required)) { return (true); } } } return (false); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private boolean shortcutRequiredFor (Vector packs) { String selected; String required; if (packs.size () == 0) { return (true); } for (int i = 0; i < idata.selectedPacks.size (); i++) { selected = ((Pack)idata.selectedPacks.get (i)).name; for (int k = 0; k < packs.size (); k++) { required = (String)((XMLElement)packs.elementAt (k)).getAttribute (SPEC_ATTRIBUTE_NAME, ""); if (selected.equals (required)) { return (true); } } } return (false); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
private boolean shortcutRequiredFor (Vector packs) { String selected; String required; if (packs.size () == 0) { return (true); } for (int i = 0; i < idata.selectedPacks.size (); i++) { selected = ((Pack)idata.selectedPacks.get (i)).name; for (int k = 0; k < packs.size (); k++) { required = (String)((XMLElement)packs.elementAt (k)).getAttribute (SPEC_ATTRIBUTE_NAME, ""); if (selected.equals (required)) { return (true); } } } return (false); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void valueChanged (ListSelectionEvent event) { if (programGroup == null) { return; } String value = ""; try { value = (String)groupList.getSelectedValue (); } catch (ClassCastException exception) {} if (value == null) { value = ""; } programGroup.setText( value + File.separator + suggestedProgramGroup ); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void valueChanged (ListSelectionEvent event) { if (programGroup == null) { return; } String value = ""; try { value = (String)groupList.getSelectedValue (); } catch (ClassCastException exception) {} if (value == null) { value = ""; } programGroup.setText( value + File.separator + suggestedProgramGroup ); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
public void valueChanged (ListSelectionEvent event) { if (programGroup == null) { return; } String value = ""; try { value = (String)groupList.getSelectedValue (); } catch (ClassCastException exception) {} if (value == null) { value = ""; } programGroup.setText( value + File.separator + suggestedProgramGroup ); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/df53b17757bee3d8fd6a9cb585cb425bb91e3213/ShortcutPanel.java/clean/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk");
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; } }
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"); 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 );}
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/72c6267fd2cb9c156fec9a549c1fcbb463814033/Unix_Shortcut.java/clean/src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
File kdeHomeShareApplnk = new File( kdeHomeShare.toString()+ FS + "applnk" );
File kdeHomeShareApplnk = new File( kdeHomeShare.toString()+ FS + itsApplnkFolder);
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 + "applnk" ); 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(); }}
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/72c6267fd2cb9c156fec9a549c1fcbb463814033/Unix_Shortcut.java/clean/src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
assertFalse(sec.allowDelete(e)); assertTrue(sec.allowDelete(i));
assertFalse(sec.allowDelete(e,e.getDetails())); assertTrue(sec.allowDelete(i,i.getDetails()));
public void testAllowDelete() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowDelete(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowDelete(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowDelete(obj));
assertTrue(sec.allowDelete(obj,obj.getDetails()));
public void testAllowDelete() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowDelete(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowDelete(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowDelete(e)); assertTrue(sec.allowDelete(i));
assertTrue(sec.allowDelete(e,e.getDetails())); assertTrue(sec.allowDelete(i,i.getDetails()));
public void testAllowDelete() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowDelete(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowDelete(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowDelete(i));
assertTrue(sec.allowDelete(i,i.getDetails()));
public void testAllowDelete() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowDelete(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowDelete(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertFalse(sec.allowDelete(i));
assertFalse(sec.allowDelete(i,i.getDetails()));
public void testAllowDelete() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowDelete(e)); assertTrue(sec.allowDelete(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowDelete(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowDelete(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowDelete(obj));
assertTrue(sec.allowDelete(obj,obj.getDetails()));
public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertFalse(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i));
assertFalse(sec.allowUpdate(e,e.getDetails())); assertTrue(sec.allowUpdate(i,i.getDetails()));
public void testAllowUpdate() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // BASICS // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowUpdate(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowUpdate(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowUpdate(obj));
assertTrue(sec.allowUpdate(obj,obj.getDetails()));
public void testAllowUpdate() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // BASICS // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowUpdate(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowUpdate(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i));
assertTrue(sec.allowUpdate(e,e.getDetails())); assertTrue(sec.allowUpdate(i,i.getDetails()));
public void testAllowUpdate() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // BASICS // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowUpdate(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowUpdate(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowUpdate(i));
assertTrue(sec.allowUpdate(i,i.getDetails()));
public void testAllowUpdate() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // BASICS // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowUpdate(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowUpdate(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertFalse(sec.allowUpdate(i));
assertFalse(sec.allowUpdate(i,i.getDetails()));
public void testAllowUpdate() { Experimenter e = new Experimenter(); Image i = new Image(); prepareMocksWithUserDetails(); // BASICS // 1. not system type sec.setCurrentDetails(); assertFalse(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // 2. is privileged SecureAction checkAllowCreate = new SecureAction(){ public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; } }; sec.doAction(e, checkAllowCreate); sec.doAction(i, checkAllowCreate); // 3. user is admin. prepareMocksWithRootDetails(); sec.setCurrentDetails(); assertTrue(sec.allowUpdate(e)); assertTrue(sec.allowUpdate(i)); sec.clearCurrentDetails(); // PERMISSIONS BASED prepareMocksWithUserDetails(); sec.setCurrentDetails(); // different owner but all permissions i = new Image(2L); i.getDetails().setOwner(new Experimenter(2L)); i.getDetails().setGroup(new ExperimenterGroup(2L)); assertTrue(sec.allowUpdate(i)); // now lower permissions i.getDetails().setPermissions(Permissions.READ_ONLY); assertFalse(sec.allowUpdate(i)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
assertTrue(sec.allowUpdate(obj));
assertTrue(sec.allowUpdate(obj,obj.getDetails()));
public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
sec.allowUpdate( user ); sec.allowDelete( user );
sec.allowUpdate( user, new Details() ); sec.allowDelete( user, new Details() );
public void testIsReady() { prepareMocksWithUserDetails(); assertFalse( sec.isReady() ); sec.setCurrentDetails(); assertTrue( sec.isReady() ); sec.clearCurrentDetails(); assertFalse( sec.isReady() ); // don't need ready sec.sys. sec.isReady( ); sec.isSystemType( null ); sec.allowLoad( user.getClass(), new Details() ); sec.allowCreation( user ); sec.allowUpdate( user ); sec.allowDelete( user ); sec.getRootId(); sec.getRootName(); sec.getSystemGroupName(); sec.getSystemGroupId(); sec.getUserGroupId(); sec.getUserGroupName(); sec.doAction(user,new SecureAction(){public <T extends IObject> T updateObject(T obj) {return null;};}); sec.copyToken(user,user); sec.setCurrentDetails(); sec.clearCurrentDetails(); sec.newEvent(type); sec.setCurrentEvent(event); sec.emptyDetails(); // need ready sec.sys try { sec.enableReadFilter( null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.disableReadFilter( null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.transientDetails( null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.managedDetails( null, null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.currentUserId(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.currentGroupId(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.leaderOfGroups(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.currentUser(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.currentGroup(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.currentEvent(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.currentUserIsAdmin(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.getCurrentEvent(); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.addLog("",Image.class,1L); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; // throw no matter what try { sec.throwLoadViolation( user ); fail("Should throw SecViol"); } catch (SecurityViolation sv) {}; try { sec.throwCreationViolation( user ); fail("Should throw SecViol"); } catch (SecurityViolation sv) {}; try { sec.throwUpdateViolation( user ); fail("Should throw SecViol"); } catch (SecurityViolation sv) {}; try { sec.throwDeleteViolation( user ); fail("Should throw SecViol"); } catch (SecurityViolation sv) {}; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
try { sec.allowUpdate( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.allowDelete( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {};
try { sec.allowUpdate( null,null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.allowDelete( null,null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {};
public void testNullChecksOnAllMethods() throws Exception { prepareMocksWithRootDetails(); sec.setCurrentDetails(); // can handle nulls sec.isSystemType( null ); sec.copyToken( null,null); sec.newEvent( null ); sec.setCurrentEvent( null ); // uses Springs assert try { sec.allowLoad( null,null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.allowCreation( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.allowUpdate( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.allowDelete( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.doAction( null,null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.addLog( null, null,null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.throwLoadViolation( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.throwCreationViolation( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.throwUpdateViolation( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; try { sec.throwDeleteViolation( null ); fail("Should throw IllegalArg"); } catch (IllegalArgumentException iae) {}; // api usage try { sec.enableReadFilter( null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.disableReadFilter( null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.transientDetails( null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; try { sec.managedDetails( null, null ); fail("Should throw ApiUsage"); } catch (ApiUsageException api) {}; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1fa4aa1df076354d9e858cfea9c54d59ae47d22a/SecuritySystemTest.java/buggy/components/server/test/ome/server/utests/sec/SecuritySystemTest.java
if (children.size() == 1 && children.get(0).getUserObject() != null) {
if (children.size() == 1 && children.get(0).getUserObject() instanceof Example) {
CodeTabSheet(final TabFolder tf, final Panel panel, final EventTabSheet eventTab) { super("Source Code"); final TextArea ta = new TextArea(); ta.getStyle().getFont().setFamily(Font.Family.MONOSPACE); ta.setPosition(GAP, GAP); addPropertyChangeListener(Main.SIZE_ARY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (getInnerHeight() > 20 && getInnerWidth() > 20) { ta.setSize(getInnerWidth() - GAP * 2, getInnerHeight() - GAP * 2); } } }); tf.addPropertyChangeListener(TabFolder.PROPERTY_CURRENT_INDEX, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (((Integer)ev.getNewValue()) == tf.getChildren().indexOf(CodeTabSheet.this)) { List<Component> children = panel.getChildren(); if (!children.isEmpty()) { if (children.size() == 1 && children.get(0).getUserObject() != null) { Example example = (Example)children.get(0).getUserObject(); ta.setText(example.getSourceCode()); } else { StringBuilder sb = new StringBuilder(); for (int i = 0, cnt = children.size(); i < cnt; i++) { Component comp = children.get(i); if (comp instanceof RadioButton && i == 0) sb.append("RadioButton.Group rbg = new RadioButton.Group();\r\n"); String var = i == 0 ? "comp" : "comp" + i; getSourceCode(sb, var, comp, eventTab.getCheckedEventDetails()); if (comp instanceof RadioButton) sb.append("rbg.add(").append(var).append(");\r\n"); } ta.setText(sb.toString()); } } } } }); getChildren().add(ta); }
57467 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57467/7e6fa19b43f70aafed5df473b8b0f919b6d0b6c8/CodeTabSheet.java/clean/src/thinwire/apps/playground/CodeTabSheet.java
if (children.size() == 1 && children.get(0).getUserObject() != null) {
if (children.size() == 1 && children.get(0).getUserObject() instanceof Example) {
public void propertyChange(PropertyChangeEvent ev) { if (((Integer)ev.getNewValue()) == tf.getChildren().indexOf(CodeTabSheet.this)) { List<Component> children = panel.getChildren(); if (!children.isEmpty()) { if (children.size() == 1 && children.get(0).getUserObject() != null) { Example example = (Example)children.get(0).getUserObject(); ta.setText(example.getSourceCode()); } else { StringBuilder sb = new StringBuilder(); for (int i = 0, cnt = children.size(); i < cnt; i++) { Component comp = children.get(i); if (comp instanceof RadioButton && i == 0) sb.append("RadioButton.Group rbg = new RadioButton.Group();\r\n"); String var = i == 0 ? "comp" : "comp" + i; getSourceCode(sb, var, comp, eventTab.getCheckedEventDetails()); if (comp instanceof RadioButton) sb.append("rbg.add(").append(var).append(");\r\n"); } ta.setText(sb.toString()); } } } }
57467 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57467/7e6fa19b43f70aafed5df473b8b0f919b6d0b6c8/CodeTabSheet.java/clean/src/thinwire/apps/playground/CodeTabSheet.java
if (prop.isValidFor(comp)) {
if (prop.isValidFor(comp.getClass())) {
static void getSourceCode(StringBuilder sb, String var, Component comp, List<EventDetail> led) { String tab = " "; String compType = Main.getSimpleClassName(comp.getClass()); sb.append(compType).append(' ').append(var).append(" = new ").append(compType).append('('); boolean textComp = comp instanceof TextComponent; if (textComp) sb.append('"').append(((TextComponent)comp).getText()).append('"'); sb.append(");\r\n"); sb.append(var).append(".setBounds(") .append(Property.X.getValue(comp)).append(", ") .append(Property.Y.getValue(comp)).append(", ") .append(Property.WIDTH.getValue(comp)).append(", ") .append(Property.HEIGHT.getValue(comp)).append(");\r\n"); if (comp instanceof TabFolder) { for (TabSheet ts : ((TabFolder)comp).getChildren()) { sb.append(var).append(".getChildren().add(new TabSheet("); sb.append('"').append(ts.getText()).append('"'); if (ts.getImage().length() > 0) sb.append(", \"").append(ts.getImage()).append('"'); sb.append("));\r\n"); } } for (Property prop : Property.values()) { if (prop.isValidFor(comp)) { String name = prop.getName(); if (name == PROPERTY_X || name == PROPERTY_Y || name == PROPERTY_WIDTH || name == PROPERTY_HEIGHT) continue; if (textComp && name == PROPERTY_TEXT) continue; Object defaultValue = prop.getDefaultValue(comp); Object value = prop.getValue(comp); if (defaultValue == value || (defaultValue != null && defaultValue.equals(value)) || (value != null && value.equals(defaultValue))) continue; Class type = prop.getType(); sb.append(var).append('.'); if (prop.isStyleProperty()) { String styleGroup = Main.getSimpleClassName(prop.getObjectType()); String styleName = prop.getName().substring(styleGroup.length()); sb.append("getStyle().get").append(styleGroup).append("().set").append(styleName); } else { sb.append("set").append(Character.toUpperCase(prop.getName().charAt(0))).append(prop.getName().substring(1)); } sb.append('('); if (type == String.class) { sb.append('"').append(value).append('"'); } else if (type.isPrimitive()) { sb.append(value); } else { sb.append(Main.getSimpleClassName(type).replace('$', '.')).append('.').append(value.toString().toUpperCase()); } sb.append(");\r\n"); } } if (comp instanceof DropDownGridBox || comp instanceof GridBox) { sb.append("\r\n//ADD COLUMNS AND ROWS TO THE GRID, JAVA 5 MAY USE VARARG CONSTRUCTORS\r\n"); GridBox gb; String gbVar; if (comp instanceof DropDownGridBox) { gb = ((DropDownGridBox)comp).getComponent(); gbVar = "gb"; sb.append("GridBox ").append(gbVar).append(" = ").append(var).append(".getComponent();\r\n"); } else { gb = (GridBox)comp; gbVar = var; } final String colVar = "col"; sb.append("GridBox.Column ").append(colVar).append(";\r\n"); List<GridBox> genList = new ArrayList<GridBox>(); genList.add(gb); int gbVarNum = 0; while (genList.size() > 0) { if (gbVarNum != 0) { gbVar = "gb" + gbVarNum; sb.append("GridBox ").append(gbVar).append(" = ").append("new GridBox();\r\n"); } genGridBox(sb, genList, gbVar, colVar); gbVarNum++; } } else if (comp instanceof Tree || comp instanceof Menu) { String itemClass = comp instanceof Tree ? "Tree.Item" : "Menu.Item"; List<String> imgs = new ArrayList<String>(); String rootVar = "root"; sb.append("\r\n//ADD ITEMS TO THE HIERARCHY\r\n"); HierarchyComponent.Item root = ((HierarchyComponent)comp).getRootItem(); sb.append(itemClass).append(' ').append(rootVar).append(" = ").append(var).append(".getRootItem();\r\n"); if (root.getText().length() > 0) sb.append(rootVar).append(".setText(\"").append(root.getText()).append("\");\r\n"); if (root.getImage().length() > 0) sb.append(rootVar).append(".setImage(").append(getImageVar(imgs, root.getImage())).append(");\r\n"); if (root instanceof Tree.Item && ((Tree.Item)root).isExpanded()) sb.append(rootVar).append(".setExpanded(true);\r\n"); int itemNum = 1; if (root.hasChildren()) genBranch(itemClass, rootVar, sb, root, itemNum, imgs); for (int i = imgs.size(); --i >= 0;) { sb.insert(0, "String IMG" + (i + 1) + " = \"" + imgs.get(i) + "\";\r\n"); } } if (!led.isEmpty()) { for (EventDetail ed : led) { String ln = Main.getSimpleClassName(ed.listener); sb.append("\r\n"); sb.append(var).append(".add").append(ln).append('('); if (ed.subType != null) sb.append('"').append(ed.subType).append('"').append(", "); sb.append("new ").append(ln).append("() {\r\n"); sb.append(tab).append("public void ").append(ed.getMethodName()).append('(').append(Main.getSimpleClassName(ed.event)).append(" ev) {\r\n"); sb.append(tab).append(tab).append("//ADD CODE HERE TO HANDLE EVENT\r\n"); sb.append(tab).append("}\r\n"); sb.append("});\r\n"); } } }
57467 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57467/7e6fa19b43f70aafed5df473b8b0f919b6d0b6c8/CodeTabSheet.java/clean/src/thinwire/apps/playground/CodeTabSheet.java
String resource = LANG_FILE_NAME + "_" + idata.localeISO3; this.langpack = new LocaleDatabase(ResourceManager.getInstance().getInputStream( resource));
this.langpack = parent.langpack;
public PacksPanelBase(InstallerFrame parent, InstallData idata) { super(parent, idata); // Load langpack. try { String resource = LANG_FILE_NAME + "_" + idata.localeISO3; this.langpack = new LocaleDatabase(ResourceManager.getInstance().getInputStream( resource)); } catch (Throwable exception) {} // init the map computePacks(idata.availablePacks); createNormalLayout(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/342142861db885f675e10c47f7da5869288bec6b/PacksPanelBase.java/clean/src/lib/com/izforge/izpack/panels/PacksPanelBase.java
{}
{ err.printStackTrace(); }
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); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/08ecc635ba8049aeb419722893f373a4a7f99a77/GUIInstaller.java/clean/src/lib/com/izforge/izpack/installer/GUIInstaller.java
img = new ImageIcon(this.getClass().getResource(
img = new ImageIcon(LanguageDialog.class.getResource(
public ImageIcon getImage() { ImageIcon img; try { img = new ImageIcon(this.getClass().getResource( "/res/installer.langsel.img")); } catch (NullPointerException err) { img = null; } return img; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/08ecc635ba8049aeb419722893f373a4a7f99a77/GUIInstaller.java/clean/src/lib/com/izforge/izpack/installer/GUIInstaller.java
InputStream in = getClass().getResourceAsStream("/GUIPrefs");
InputStream in = GUIInstaller.class.getResourceAsStream("/GUIPrefs");
public void loadGUIInstallData() throws Exception { InputStream in = getClass().getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/08ecc635ba8049aeb419722893f373a4a7f99a77/GUIInstaller.java/clean/src/lib/com/izforge/izpack/installer/GUIInstaller.java
if (!line.equals(""))
if (!"".equals(line))
public String getDefaultInstallPath(String appName) { String path = null; InputStream input; String keyFragment = "/res/" + INSTALL_PATH_RESOURCE_KEY[GENERIC][STANDARD]; // ---------------------------------------------------- // attempt to get an input stream through a resource // based on a key which is specific to the target OS // ---------------------------------------------------- input = getClass().getResourceAsStream("/res/" + INSTALL_PATH_RESOURCE_KEY[os][osFlavor]); // ---------------------------------------------------- // attempt to get an input stream through a resource // based on a key which is made specific to the target // OS by using the string returned by // System.getProperty ("os.name").toLowerCase () // ---------------------------------------------------- if (input == null) { String key = OsVersion.OS_NAME.toLowerCase().replace(' ', '_'); // avoid // spaces // in // file // names key = keyFragment + key.toLowerCase(); // for consistency among // TargetPanel res files input = TargetFactory.class.getResourceAsStream(key); } // ---------------------------------------------------- // attempt to get an input stream through a resource // based on a key which is not specific to any target OS // ---------------------------------------------------- if (input == null) { input = TargetFactory.class.getResourceAsStream(keyFragment); } // ---------------------------------------------------- // If we got an input stream try to read the path // from the file // ---------------------------------------------------- if (input != null) { InputStreamReader streamReader; BufferedReader reader = null; String line; try { streamReader = new InputStreamReader(input); reader = new BufferedReader(streamReader); line = reader.readLine(); while (line != null) { line = line.trim(); if (!line.equals("")) { break; } line = reader.readLine(); } path = line; } catch (Throwable exception) {} finally { try { if (reader != null) reader.close(); } catch (Throwable exception) {} } } // ---------------------------------------------------- // if we were unable to obtain a path from a resource, // use the default for the traget operating system. // ---------------------------------------------------- if (path == null || path.equals("")) { path = ""; // -------------------------------------------------- // if we run on windows, we need a valid drive letter // to put in front of the path. The drive that // contains the user's home directory is usually the // drive that also contains the install directory, // so this seems the best choice here. // -------------------------------------------------- if (os == WINDOWS) { String home = System.getProperty("user.home"); // take everything up to and including the first '\' path = home.substring(0, home.indexOf(File.separatorChar) + 1); } path = path + INSTALL_PATH_FRAGMENT[os] + appName; } return path; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/TargetFactory.java/buggy/src/lib/com/izforge/izpack/util/TargetFactory.java
if (path == null || path.equals(""))
if (path == null || "".equals(path))
public String getDefaultInstallPath(String appName) { String path = null; InputStream input; String keyFragment = "/res/" + INSTALL_PATH_RESOURCE_KEY[GENERIC][STANDARD]; // ---------------------------------------------------- // attempt to get an input stream through a resource // based on a key which is specific to the target OS // ---------------------------------------------------- input = getClass().getResourceAsStream("/res/" + INSTALL_PATH_RESOURCE_KEY[os][osFlavor]); // ---------------------------------------------------- // attempt to get an input stream through a resource // based on a key which is made specific to the target // OS by using the string returned by // System.getProperty ("os.name").toLowerCase () // ---------------------------------------------------- if (input == null) { String key = OsVersion.OS_NAME.toLowerCase().replace(' ', '_'); // avoid // spaces // in // file // names key = keyFragment + key.toLowerCase(); // for consistency among // TargetPanel res files input = TargetFactory.class.getResourceAsStream(key); } // ---------------------------------------------------- // attempt to get an input stream through a resource // based on a key which is not specific to any target OS // ---------------------------------------------------- if (input == null) { input = TargetFactory.class.getResourceAsStream(keyFragment); } // ---------------------------------------------------- // If we got an input stream try to read the path // from the file // ---------------------------------------------------- if (input != null) { InputStreamReader streamReader; BufferedReader reader = null; String line; try { streamReader = new InputStreamReader(input); reader = new BufferedReader(streamReader); line = reader.readLine(); while (line != null) { line = line.trim(); if (!line.equals("")) { break; } line = reader.readLine(); } path = line; } catch (Throwable exception) {} finally { try { if (reader != null) reader.close(); } catch (Throwable exception) {} } } // ---------------------------------------------------- // if we were unable to obtain a path from a resource, // use the default for the traget operating system. // ---------------------------------------------------- if (path == null || path.equals("")) { path = ""; // -------------------------------------------------- // if we run on windows, we need a valid drive letter // to put in front of the path. The drive that // contains the user's home directory is usually the // drive that also contains the install directory, // so this seems the best choice here. // -------------------------------------------------- if (os == WINDOWS) { String home = System.getProperty("user.home"); // take everything up to and including the first '\' path = home.substring(0, home.indexOf(File.separatorChar) + 1); } path = path + INSTALL_PATH_FRAGMENT[os] + appName; } return path; }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/9619b3a25f43787dc92011111668210e06c00c71/TargetFactory.java/buggy/src/lib/com/izforge/izpack/util/TargetFactory.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java
public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout layout = new GridBagLayout(); gbConstraints = new GridBagConstraints(); setLayout(layout); // We load the licence loadLicence(); // We put our components infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 0, 2, 1, 1.0, 0.0); gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(infoLabel, gbConstraints); add(infoLabel); textArea = new JTextArea(licence); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); parent.buildConstraints(gbConstraints, 0, 1, 2, 1, 1.0, 1.0); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.fill = GridBagConstraints.BOTH; layout.addLayoutComponent(scroller, gbConstraints); add(scroller); agreeLabel = new JLabel(parent.langpack.getString("LicencePanel.agree"), parent.icons.getImageIcon("help"), JLabel.TRAILING); parent.buildConstraints(gbConstraints, 0, 2, 2, 1, 1.0, 0.0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.SOUTHWEST; layout.addLayoutComponent(agreeLabel, gbConstraints); add(agreeLabel); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.yes"), false); group.add(yesRadio); parent.buildConstraints(gbConstraints, 0, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHWEST; layout.addLayoutComponent(yesRadio, gbConstraints); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.no"), false); group.add(noRadio); parent.buildConstraints(gbConstraints, 1, 3, 1, 1, 0.5, 0.0); gbConstraints.anchor = GridBagConstraints.NORTHEAST; layout.addLayoutComponent(noRadio, gbConstraints); add(noRadio); noRadio.addActionListener(this); }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/ddfcd50a0f2d10b4142d6e577c9b63ec84068514/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java