}
private void workaroundJava7FocusProblem(Frame frame) {
- String ver = System.getProperty("java.version");
- if (ver.startsWith("1.7") || ver.startsWith("1.8")) {
+ String ver = System.getProperty("java.version"); //$NON-NLS-1$
+ if (ver.startsWith("1.7") || ver.startsWith("1.8")) { //$NON-NLS-1$ //$NON-NLS-2$
try {
frame.addWindowListener(new Java7FocusFixListener(this, frame));
} catch (SecurityException e) {
Frame frame;
public Java7FocusFixListener(Control control, Frame frame) throws NoSuchMethodException, SecurityException {
- this.shellSetActiveControl = Shell.class.getDeclaredMethod("setActiveControl", Control.class);
+ this.shellSetActiveControl = Shell.class.getDeclaredMethod("setActiveControl", Control.class); //$NON-NLS-1$
this.frame = frame;
this.control = control;
}
initialized.wait();
}
} catch (InterruptedException e) {
- throw new Error("GraphvizComponent AWT population interrupted for class " + this, e);
+ throw new Error("GraphvizComponent AWT population interrupted for class " + this, e); //$NON-NLS-1$
}
}
* @param graph
*/
public void setGraph(Graph graph) {
- setGraph(graph, "dot");
+ setGraph(graph, "dot"); //$NON-NLS-1$
}
/**
public void save(File file) throws IOException {
if (drawable == null) {
- throw new IOException("Nothing to save");
+ throw new IOException("Nothing to save"); //$NON-NLS-1$
}
Graph graph = drawable.getGraph();
String algo = drawable.getAlgorithm();
}
public String[] getFileExtensions() {
- return new String[]{"*.svg","*.dot","*.eps", "*.jpg", "*.jpeg","*.pdf","*.png","*.ps"};
+ return new String[]{"*.svg","*.dot","*.eps", "*.jpg", "*.jpeg","*.pdf","*.png","*.ps"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
}
public String[] getFileNames() {
- return new String[]{"Scalable Vector Graphics Image", "DOT Image", "Encapsulated PostScript Image","JPG Image","JPG Image","Portable Document Format Image","Portable Network Graphics Image","PostScript Image"};
+ return new String[]{"Scalable Vector Graphics Image", "DOT Image", "Encapsulated PostScript Image","JPG Image","JPG Image","Portable Document Format Image","Portable Network Graphics Image","PostScript Image"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
}
public static String getExtension(File file) {
String filename = file.getName();
- int index = filename.lastIndexOf(".");
+ int index = filename.lastIndexOf("."); //$NON-NLS-1$
if (index < 0)
return null;
return filename.substring(index+1).toLowerCase();