bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
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(); }
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(); }
3,240,705
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(); }
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(); }
3,240,706
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(); }
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(); }
3,240,707
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(); }
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(); }
3,240,708
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(); }
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(); }
3,240,709
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(); }
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(); }
3,240,710
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(); }
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(); }
3,240,711
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(); }
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(); }
3,240,712
private String fixSeparatorChar (String path) { String newPath = path.replace ('/', File.separatorChar); newPath = newPath.replace ('\\', File.separatorChar); return (newPath); }
private String fixSeparatorChar (String path) { String newPath = path.replace ('/', File.separatorChar); newPath = newPath.replace ('\\', File.separatorChar); return (newPath); }
3,240,713
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); }
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); }
3,240,714
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); }
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); }
3,240,715
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); }
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); }
3,240,716
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); }
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); }
3,240,717
public boolean isValidated () { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); return (true); }
public boolean isValidated () { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); return (true); }
3,240,718
public boolean isValidated () { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); return (true); }
public boolean isValidated () { try { groupName = programGroup.getText (); } catch (Throwable exception) { groupName = ""; } createShortcuts (); // add files and directories to the uninstaller addToUninstaller (); return (true); }
3,240,719
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); } } }
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); } } }
3,240,720
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); } } }
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); } } }
3,240,721
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 (); } }
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 (); } }
3,240,722
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; }
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; }
3,240,723
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; }
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; }
3,240,724
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; }
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; }
3,240,725
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; }
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; }
3,240,726
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; }
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; }
3,240,727
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; }
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; }
3,240,728
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; }
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; }
3,240,729
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; }
private void readShortcutSpec () throws Exception {// open an input streamInputStream 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 parserStdXMLParser parser = new StdXMLParser ();parser.setBuilder (new StdXMLBuilder ());parser.setValidator (new NonValidator ());parser.setReader(new StdXMLReader (input));// get the dataspec = (XMLElement) parser.parse ();// close the streaminput.close ();haveShortcutSpec = true;}
3,240,730
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; }
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; }
3,240,731
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; }
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; }
3,240,732
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; }
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; }
3,240,733
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 (); }
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 (); }
3,240,734
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 (); }
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 (); }
3,240,735
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 (); }
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 (); }
3,240,736
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 (); }
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 (); }
3,240,737
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 (); }
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 (); }
3,240,738
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!? } } }
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!? } } }
3,240,739
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!? } } }
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!? } } }
3,240,740
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!? } } }
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!? } } }
3,240,741
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!? } } }
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!? } } }
3,240,742
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!? } } }
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!? } } }
3,240,743
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!? } } }
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!? } } }
3,240,744
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!? } } }
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!? } } }
3,240,745
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); }
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); }
3,240,746
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); }
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); }
3,240,747
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); }
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); }
3,240,748
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); }
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); }
3,240,749
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 ); }
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 ); }
3,240,750
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 ); }
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 ); }
3,240,751
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 ); }
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 ); }
3,240,752
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 );}
public Vector getProgramGroups( int userType ){ //if( userType > CURRENT_USER ) //if( System.getProperty( "user.name" ).equals( "root" ) ) String FS = File.separator; //System.out.println( "userType" + userType ); Vector groups = new Vector(); File homedir = new File( System.getProperty( "user.home" ) ); File kdeHomeShareApplnk; try { File kdeHome = new File( homedir.toString() + FS + ".kde" ); if( ! kdeHome.exists() ) return( groups ); File kdeHomeShare = new File( kdeHome.toString()+ FS + "share" ); if( ! kdeHomeShare.exists() ) return( groups ); kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + "applnk"); String[] applnkFolders={"applnk-mdk","applnk-redhat","applnk"}; for (int i=0;i<applnkFolders.length;i++) { kdeHomeShareApplnk = new File(kdeHomeShare.toString() + FS + applnkFolders[i]); if (kdeHomeShareApplnk.exists()) { itsApplnkFolder=applnkFolders[i]; break; } } if( ! kdeHomeShareApplnk.exists() ) return( groups ); } catch( Exception e1 ) { // e1.printStackTrace(); return( groups ); } try { File [] listing = kdeHomeShareApplnk.listFiles(); for( int i = 0; i < listing.length; i++ ) { if( listing[ i ].isDirectory() ) { groups.add( listing[ i ].getName() ); } } } catch( Exception e ) { // ignore and return an empty vector. } return( groups );}
3,240,753
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(); }}
public void save() throws Exception{ String FS = File.separator; String target = null; String shortCutDef = this.replace(); if( ( this.itsGroupName == null ) || ( "".equals( this.itsGroupName ) ) ) { target = System.getProperty( "user.home" ) + FS + "Desktop" + FS + this.itsName + DESKTOP_EXT; } else { File homedir = new File( System.getProperty( "user.home" ) ); File kdeHome = new File( homedir.toString() + FS + ".kde" ); File kdeHomeShare = new File( kdeHome.toString()+ FS + "share" ); File kdeHomeShareApplnk = new File( kdeHomeShare.toString()+ FS + itsApplnkFolder); target = kdeHomeShareApplnk.toString() + FS + this.itsGroupName + FS + this.itsName + DESKTOP_EXT; } File targetPath = new File( target.toString().substring( 0, target.toString().lastIndexOf( File.separatorChar ) ) ); if( ! targetPath.exists() ) { targetPath.mkdirs(); this.createdDirectory = targetPath.toString(); } this.itsFileName = new String( target ); File targetFileName = new File( target ); FileWriter fileWriter = null; try { fileWriter = new FileWriter( targetFileName ); } catch (IOException e1) { e1.printStackTrace(); } try { fileWriter.write( shortCutDef ); } catch (IOException e) { e.printStackTrace(); } try { fileWriter.close(); } catch (IOException e2) { e2.printStackTrace(); }}
3,240,754
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)); }
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)); }
3,240,755
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)); }
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)); }
3,240,756
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)); }
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)); }
3,240,757
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)); }
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)); }
3,240,758
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)); }
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)); }
3,240,759
public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; }
public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowDelete(obj)); return null; }
3,240,760
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)); }
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)); }
3,240,761
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)); }
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)); }
3,240,762
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)); }
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)); }
3,240,763
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)); }
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)); }
3,240,764
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)); }
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)); }
3,240,765
public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; }
public <T extends IObject> T updateObject(T obj) { assertTrue(sec.allowUpdate(obj)); return null; }
3,240,766
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) {}; }
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) {}; }
3,240,767
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) {}; }
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) {}; }
3,240,768
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); }
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() instanceof Example) { 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); }
3,240,769
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()); } } } }
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() instanceof Example) { 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()); } } } }
3,240,770
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"); } } }
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.getClass())) { 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"); } } }
3,240,771
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(); }
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(); }
3,240,772
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) {} // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
public LanguageDialog(Object[] items) { super(); try { loadLookAndFeel(); } catch (Exception err) { err.printStackTrace(); } // We build the GUI addWindowListener(new WindowHandler()); JPanel contentPane = (JPanel) getContentPane(); setTitle("Language selection"); GridBagLayout layout = new GridBagLayout(); contentPane.setLayout(layout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.anchor = GridBagConstraints.CENTER; gbConstraints.insets = new Insets(5, 5, 5, 5); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridx = 0; gbConstraints.weightx = 1.0; gbConstraints.weighty = 1.0; ImageIcon img = getImage(); JLabel imgLabel = new JLabel(img); gbConstraints.gridy = 0; contentPane.add(imgLabel); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel label1 = new JLabel("Please select your language (ISO3 code)", SwingConstants.CENTER); gbConstraints.gridy = 1; gbConstraints.insets = new Insets(5, 5, 0, 5); layout.addLayoutComponent(label1, gbConstraints); contentPane.add(label1); JLabel label2 = new JLabel("for install instructions:", SwingConstants.CENTER); gbConstraints.gridy = 2; gbConstraints.insets = new Insets(0, 5, 5, 5); layout.addLayoutComponent(label2, gbConstraints); contentPane.add(label2); gbConstraints.insets = new Insets(5, 5, 5, 5); comboBox = new JComboBox(items); comboBox.setRenderer(new FlagRenderer()); gbConstraints.fill = GridBagConstraints.HORIZONTAL; gbConstraints.gridy = 3; layout.addLayoutComponent(comboBox, gbConstraints); contentPane.add(comboBox); okButton = new JButton("Ok"); okButton.addActionListener(this); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.gridy = 4; gbConstraints.anchor = GridBagConstraints.CENTER; layout.addLayoutComponent(okButton, gbConstraints); contentPane.add(okButton); getRootPane().setDefaultButton(okButton); // Packs and centers // Fix for bug "Installer won't show anything on OSX" if (System.getProperty("mrj.version") == null) pack(); else setSize(getPreferredSize()); Dimension frameSize = getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); setResizable(true); }
3,240,773
public ImageIcon getImage() { ImageIcon img; try { img = new ImageIcon(this.getClass().getResource( "/res/installer.langsel.img")); } catch (NullPointerException err) { img = null; } return img; }
public ImageIcon getImage() { ImageIcon img; try { img = new ImageIcon(LanguageDialog.class.getResource( "/res/installer.langsel.img")); } catch (NullPointerException err) { img = null; } return img; }
3,240,774
public void loadGUIInstallData() throws Exception { InputStream in = getClass().getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
public void loadGUIInstallData() throws Exception { InputStream in = GUIInstaller.class.getResourceAsStream("/GUIPrefs"); ObjectInputStream objIn = new ObjectInputStream(in); this.installdata.guiPrefs = (GUIPrefs) objIn.readObject(); objIn.close(); }
3,240,775
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; }
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 (!"".equals(line)) { 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; }
3,240,776
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; }
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 || "".equals(path)) { 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; }
3,240,777
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,778
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,779
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); }
public LicencePanel(InstallerFrame parent, InstallData idata){super(parent, idata);// We initialize our layoutlayout = new GridBagLayout();gbConstraints = new GridBagConstraints();setLayout(layout);// We load the licenceloadLicence();// We put our componentsinfoLabel = 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);}
3,240,780
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,781
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,782
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,783
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); }
public LicencePanel(InstallerFrame parent, InstallData idata){super(parent, idata);// We initialize our layoutlayout = new GridBagLayout();gbConstraints = new GridBagConstraints();setLayout(layout);// We load the licenceloadLicence();// We put our componentsinfoLabel = 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);}
3,240,784
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,785
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); }
public LicencePanel(InstallerFrame parent, InstallData idata){super(parent, idata);// We initialize our layoutlayout = new GridBagLayout();gbConstraints = new GridBagConstraints();setLayout(layout);// We load the licenceloadLicence();// We put our componentsinfoLabel = 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);}
3,240,786
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); }
public LicencePanel(InstallerFrame parent, InstallData idata){super(parent, idata);// We initialize our layoutlayout = new GridBagLayout();gbConstraints = new GridBagConstraints();setLayout(layout);// We load the licenceloadLicence();// We put our componentsinfoLabel = 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);}
3,240,787
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,788
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,789
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,790
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,791
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,792
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,793
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,794
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); }
public LicencePanel(InstallerFrame parent, InstallData idata){super(parent, idata);// We initialize our layoutlayout = new GridBagLayout();gbConstraints = new GridBagConstraints();setLayout(layout);// We load the licenceloadLicence();// We put our componentsinfoLabel = 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);}
3,240,795
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,796
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,797
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,798
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,799
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,800
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,801
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,802
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,803
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); }
publicLicencePanel(InstallerFrameparent,InstallDataidata){super(parent,idata);//Weinitializeourlayoutlayout=newGridBagLayout();gbConstraints=newGridBagConstraints();setLayout(layout);//WeloadthelicenceloadLicence();//WeputourcomponentsinfoLabel=newJLabel(parent.langpack.getString("LicencePanel.info"),parent.icons.getImageIcon("history"),JLabel.TRAILING);parent.buildConstraints(gbConstraints,0,0,2,1,1.0,0.0);gbConstraints.insets=newInsets(5,5,5,5);gbConstraints.fill=GridBagConstraints.NONE;gbConstraints.anchor=GridBagConstraints.SOUTHWEST;layout.addLayoutComponent(infoLabel,gbConstraints);add(infoLabel);textArea=newJTextArea(licence);textArea.setCaretPosition(0);textArea.setEditable(false);textArea.setLineWrap(true);textArea.setWrapStyleWord(true);scroller=newJScrollPane(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=newJLabel(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);ButtonGroupgroup=newButtonGroup();yesRadio=newJRadioButton(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=newJRadioButton(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);}
3,240,804