From ac5954d7c540f34702033d7d951d1d16cb96730a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Aug 2014 15:58:09 +0200 Subject: java: remove commented out code Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1 --- scripting/examples/java/Newsgroup/OfficeAttachment.java | 16 ---------------- scripting/examples/java/Newsgroup/PostNewsgroup.java | 4 ---- scripting/examples/java/Newsgroup/StatusWindow.java | 3 --- .../examples/java/Newsgroup/SubscribedNewsgroups.java | 1 - 4 files changed, 24 deletions(-) (limited to 'scripting/examples') diff --git a/scripting/examples/java/Newsgroup/OfficeAttachment.java b/scripting/examples/java/Newsgroup/OfficeAttachment.java index c6b6fc9befab..41ccfd3dd591 100644 --- a/scripting/examples/java/Newsgroup/OfficeAttachment.java +++ b/scripting/examples/java/Newsgroup/OfficeAttachment.java @@ -60,7 +60,6 @@ public class OfficeAttachment String firstPart = templocationURL.substring( 0, sepPos ); String lastPart = templocationURL.substring( sepPos + 1, templocationURL.length() ); templocationURL = firstPart + "/" + lastPart; - //JOptionPane.showMessageDialog( null, "Temp Location URL is: " + templocationURL + "\nfirstPart is: " + firstPart + "\nlastPart is: " + lastPart ); } } @@ -86,7 +85,6 @@ public class OfficeAttachment } else { - //int lastSep = attachmentName.lastIndexOf( System.getProperty( "file.separator" ) ); int lastSep = attachmentName.lastIndexOf( "/" ); attachmentName = attachmentName.substring( lastSep + 1, attachmentName.length() ); int dot = attachmentName.indexOf( "." ); @@ -147,18 +145,12 @@ public class OfficeAttachment { if( homefiles[i].getName().equals( attachmentName + ".sxw" ) ) { - //officeFile = new File( homefiles[i].getAbsolutePath() ); - //JOptionPane.showMessageDialog( null, "Found .sxw" ); file = homefiles[i].getAbsolutePath(); } } officeFile = new File( file ); - //officeFile = new File( filename + ".sxw" ); - //officeFile = new File (storedDoc.getLocation() ); } - //status.setStatus( 10, "Attachments successfully created" ); - } catch( SecurityException se ) { @@ -255,14 +247,6 @@ public class OfficeAttachment public File[] getAttachments() { - /* - if( htmlFile == null && officeFile == null ) - { - System.out.println( "Error: Document(s) have not been saved." ); - return null; - } - */ - //(officeDoc) ? (number = 2) : (number = 1); statusLine = "Retrieving temp docs"; status.setStatus( 8, statusLine ); diff --git a/scripting/examples/java/Newsgroup/PostNewsgroup.java b/scripting/examples/java/Newsgroup/PostNewsgroup.java index 5f069b44dd19..83e90ad5aa36 100644 --- a/scripting/examples/java/Newsgroup/PostNewsgroup.java +++ b/scripting/examples/java/Newsgroup/PostNewsgroup.java @@ -381,7 +381,6 @@ public class PostNewsgroup extends JFrame } JPanel optionPanel = new JPanel(); - //optionPanel.setLayout( new GridLayout( 1, 3, 20, 0 ) ); optionPanel.setBorder( new TitledBorder( new EtchedBorder(), "Document Format" ) ); optionPanel.setLayout( new GridBagLayout() ); GridBagConstraints constraints = new GridBagConstraints(); @@ -423,7 +422,6 @@ public class PostNewsgroup extends JFrame StatusWindow statusWindow = new StatusWindow( window, "Posting to Newsgroup", FRAMEX, FRAMEY ); statusWindow.setVisible( true ); - //statusWindow.requestFocusInWindow(); statusLine = "Ready to send..."; statusWindow.setStatus( 0, statusLine ); @@ -456,7 +454,6 @@ public class PostNewsgroup extends JFrame } else { - //int position = newsgroupComboBox.getSelectedIndex(); host = subscribedNewsgroups[ position ].getHostName(); group = subscribedNewsgroups[ position ].getNewsgroupName(); } @@ -585,7 +582,6 @@ public class PostNewsgroup extends JFrame } else { - //int position = newsgroupComboBox.getSelectedIndex(); newsgroupString = subscribedNewsgroups[ position ].getNewsgroupName(); } if( newsgroupString.length() == 0 ) diff --git a/scripting/examples/java/Newsgroup/StatusWindow.java b/scripting/examples/java/Newsgroup/StatusWindow.java index e83b7ef5c98e..b95fb3a91b07 100644 --- a/scripting/examples/java/Newsgroup/StatusWindow.java +++ b/scripting/examples/java/Newsgroup/StatusWindow.java @@ -69,9 +69,7 @@ public class StatusWindow extends JFrame statusLabel.setColumns( 25 ); statusLabel.setEditable( false ); statusLabel.setBorder( null ); - //statusLabel.setBorder( LineBorder.createGrayLineBorder() ); JPanel statusPanel = new JPanel(); - //statusPanel.setBorder( LineBorder.createBlackLineBorder() ); statusPanel.setLayout( new BorderLayout() ); statusPanel.add( statusLabel, "West" ); @@ -120,7 +118,6 @@ public class StatusWindow extends JFrame this.pack(); this.setResizable( false ); - //this.setVisible( true ); } diff --git a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java index e73ea3310eca..a4f230becee7 100644 --- a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java +++ b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java @@ -88,7 +88,6 @@ public class SubscribedNewsgroups { } // Check that at least one News directory exists and remove nulls boolean newsFound = false; - //Vector nonNullNews = new Vector(); for( int i=0; i < allNewsDirs.length; i++ ) { if( allNewsDirs[i] != null ) { newsFound = true; -- cgit