Changeset 1471 for branches/3.0-Beta1
- Timestamp:
- 04/25/07 16:06:59 (19 months ago)
- Location:
- branches/3.0-Beta1/components/bioformats-omero/src/ome/formats
- Files:
-
- 1 added
- 9 modified
-
OMEROMetadataStore.java (modified) (25 diffs)
-
importer/CommentMessenger.java (modified) (2 diffs)
-
importer/FileQueueHandler.java (modified) (1 diff)
-
importer/ImportDialog.java (modified) (1 diff)
-
importer/ImportHandler.java (modified) (7 diffs)
-
importer/LoginFrame.java (added)
-
importer/Main.java (modified) (2 diffs)
-
importer/SplashWindow.java (modified) (4 diffs)
-
importer/Splasher.java (modified) (1 diff)
-
importer/StatusBar.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/OMEROMetadataStore.java
r1276 r1471 83 83 { 84 84 85 private boolean DEBUG = false; 86 85 87 /** Logger for this class. */ 86 88 private static Log log = LogFactory.getLog(OMEROMetadataStore.class); … … 119 121 String port) throws MetadataStoreException 120 122 { 123 if (DEBUG) {log.debug("Starting OMEROMetadataStore.");} 124 121 125 // Mask the password information for display in the debug window 122 126 String maskedPswd = ""; … … 185 189 public Object getRoot() 186 190 { 191 if (DEBUG) {log.debug("Calling getRoot().");} 187 192 return pixels; 188 193 } … … 195 200 public void setRoot(Object root) throws IllegalArgumentException 196 201 { 202 if (DEBUG) {log.debug("Calling setRoot().");} 197 203 if (!(root instanceof Pixels)) 198 204 throw new IllegalArgumentException("'root' object of type '" … … 209 215 public void createRoot() 210 216 { 217 if (DEBUG) {log.debug("Calling createRoot().");} 211 218 pixels = new Pixels(); 212 219 } … … 221 228 private IObject getEnumeration(Class<? extends IObject> klass, String value) 222 229 { 230 if (DEBUG) {log.debug("Calling getEnumeration().");} 223 231 if (klass == null) 224 232 throw new NullPointerException("Expecting not-null klass."); … … 242 250 Integer i) 243 251 { 252 if (DEBUG) {log.debug("Calling setImage().");} 244 253 log.debug(String.format("Setting Image: name (%s), creationDate (%s), " 245 254 + "description (%s)", name, creationDate, description)); … … 263 272 Object group, Integer i) 264 273 { 274 if (DEBUG) {log.debug("Calling setExperimenter().");} 265 275 // FIXME: To implement. 266 276 } … … 274 284 public void setGroup(String name, Object leader, Object contact, Integer i) 275 285 { 286 if (DEBUG) {log.debug("Calling setGroup().");} 276 287 // FIXME: To implement. 277 288 } … … 280 291 String serialNumber, String type, Integer i) 281 292 { 293 if (DEBUG) {log.debug("Calling setInstrument().");} 282 294 // FIXME: To implement. 283 295 } … … 293 305 Float pixelSizeZ, Float pixelSizeC, Float pixelSizeT, Integer i) 294 306 { 307 if (DEBUG) {log.debug("Calling setDimensions().");} 295 308 log.debug(String.format( 296 309 "Setting Dimensions: pixelSizeX (%f), pixelSizeY (%f), " … … 336 349 Object displayOptions, Integer i) 337 350 { 351 if (DEBUG) {log.debug("Calling setDisplayRIO().");} 338 352 // FIXME: We have no real type for this. 339 353 } … … 351 365 String dimensionOrder, Integer i) 352 366 { 367 if (DEBUG) {log.debug("Calling setPixels().");} 353 368 log 354 369 .debug(String … … 413 428 public void setStageLabel(String name, Float x, Float y, Float z, Integer i) 414 429 { 430 if (DEBUG) {log.debug("Calling setStageLabel().");} 415 431 log.debug(String.format( 416 432 "Setting StageLabel: name (%s), x (%f), y (%f), z (%f)", name, … … 449 465 String mode, Integer i) 450 466 { 467 if (DEBUG) {log.debug("Calling setLogicalChannel().");} 451 468 log 452 469 .debug(String … … 496 513 Double globalMax, Integer i) 497 514 { 515 if (DEBUG) {log.debug("Calling setChannelGlobalMinMax().");} 498 516 log.debug(String.format( 499 517 "Setting GlobalMin: '%f' GlobalMax: '%f' for channel: '%d'", … … 528 546 Float exposureTime, Integer i) 529 547 { 548 if (DEBUG) {log.debug("Calling setPlaneInfo().");} 530 549 PlaneInfo pi = new PlaneInfo(); 531 550 pi.setTheZ(z); … … 555 574 public void setPlane(Long id, byte[] pixels, int theZ, int theC, int theT) 556 575 { 576 if (DEBUG) {log.debug("Calling setPlane().");} 557 577 if (pservice == null) pservice = sf.createRawPixelsStore(); 558 578 559 579 pservice.setPixelsId(id); 560 pservice.setPlane(pixels, theZ, theC, theT); 580 try { 581 pservice.setPlane(pixels, theZ, theC, theT); 582 } catch (Throwable t) 583 { 584 log.debug("Got an error"); 585 t.printStackTrace(); 586 } 561 587 } 562 588 … … 571 597 public void setStack(Long id, byte[] pixels, int theC, int theT) 572 598 { 599 if (DEBUG) {log.debug("Calling setStack().");} 573 600 if (pservice == null) pservice = sf.createRawPixelsStore(); 574 601 … … 585 612 public void addPixelsToDataset(Long pixId, Dataset dataset) 586 613 { 614 if (DEBUG) {log.debug("Calling addPixelsToDatabase().");} 587 615 Pixels pixels = iQuery.get(Pixels.class, pixId); 588 616 … … 609 637 public List<Dataset> getDatasets(Project project) 610 638 { 639 if (DEBUG) {log.debug("Calling getDatasets().");} 611 640 List l = iQuery.findAllByQuery( 612 641 "from Dataset where id in " + … … 627 656 public List<Project> getProjects() 628 657 { 658 if (DEBUG) {log.debug("Calling Projects().");} 629 659 List l = iQuery.findAllByQuery( 630 660 "from Project as p where p.details.owner.id = :id", … … 641 671 public Long saveToDB() 642 672 { 673 if (DEBUG) {log.debug("Calling saveToDB().");} 643 674 IUpdate update = sf.getUpdateService(); 644 675 pixels = update.saveAndReturnObject(pixels); … … 650 681 public void setOriginalFiles(File[] files) 651 682 { 683 if (DEBUG) {log.debug("Calling setOriginalFiles().");} 652 684 for (File file: files) 653 685 { … … 665 697 public void writeFilesToFileStore(File[] files, long pixelsId) 666 698 { 699 if (DEBUG) {log.debug("Calling writeFilesToStore().");} 667 700 try 668 701 { -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/CommentMessenger.java
r1196 r1471 29 29 import javax.swing.JOptionPane; 30 30 import javax.swing.JPanel; 31 import javax.swing.JTabbedPane;32 31 import javax.swing.JTextArea; 33 32 import javax.swing.JTextField; 34 33 import javax.swing.JTextPane; 35 34 import javax.swing.UIManager; 36 import javax.swing.text.BadLocationException;37 import javax.swing.text.Style;38 import javax.swing.text.StyledDocument;39 35 40 36 import ome.formats.importer.util.GuiCommonElements; 41 37 import ome.formats.importer.util.HtmlMessenger; 42 43 import org.apache.commons.httpclient.HttpClient;44 import org.apache.commons.httpclient.methods.PostMethod;45 38 46 39 import layout.TableLayout; … … 54 47 private static final long serialVersionUID = -894653530593047377L; 55 48 56 boolean debug = true;49 boolean debug = false; 57 50 58 51 String url = "http://users.openmicroscopy.org.uk/~brain/omero/commentcollector.php"; -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/FileQueueHandler.java
r1196 r1471 23 23 import java.util.prefs.Preferences; 24 24 25 import javax.swing.JCheckBox;26 25 import javax.swing.JFileChooser; 27 26 import javax.swing.JFrame; -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/ImportDialog.java
r1295 r1471 104 104 ImportDialog(JFrame owner, String title, boolean modal, OMEROMetadataStore store) 105 105 { 106 super( );106 super(owner); 107 107 this.store = store; 108 108 -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/ImportHandler.java
r1295 r1471 41 41 { 42 42 43 private boolean DEBUG; 44 43 45 private ImportLibrary library; 44 46 … … 60 62 IFormatReader reader, ImportContainer[] fads) 61 63 { 64 this.DEBUG = viewer.DEBUG; 65 if (DEBUG) {log.debug("Starting ImportHandler.");} 66 62 67 this.viewer = viewer; 63 68 this.library = new ImportLibrary(store, reader, fads); … … 67 72 68 73 this.iReader = new ImageReader(); 69 74 70 75 new Thread() 71 76 { … … 84 89 private void importImages() 85 90 { 91 if (DEBUG) {log.debug("Calling importImages.");} 92 86 93 long timestampIn; 87 94 long timestampOut; … … 89 96 long timeInSeconds; 90 97 long hours, minutes, seconds; 98 91 99 Date date = null; 92 100 … … 178 186 boolean archive) 179 187 { 188 if (DEBUG) {log.debug("Calling importImage().");} 189 180 190 String fileName = file.getAbsolutePath(); 181 191 String shortName = file.getName(); … … 268 278 public void open(String fileName) 269 279 { 280 if (DEBUG) {log.debug("Calling open().");} 270 281 viewer.waitCursor(true); 271 282 try -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/Main.java
r1299 r1471 53 53 private static final long serialVersionUID = 1228000122345370913L; 54 54 55 public static String versionText = "Beta 1.2"; 56 55 57 /** The data of the last release date. */ 56 58 public static String releaseDate 57 = "2007-02-28 11:02:43 +0000 (Wed, 2 8 Feb2007";59 = "2007-02-28 11:02:43 +0000 (Wed, 25 Apr 2007"; 58 60 59 61 /** The repository revision. */ … … 80 82 81 83 public static final String ICON = "gfx/icon.png"; 84 85 public static final boolean DEBUG = false; 82 86 83 87 public LoginHandler loginHandler; -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/SplashWindow.java
r1295 r1471 17 17 import javax.swing.ImageIcon; 18 18 import javax.swing.JFrame; 19 import javax.swing.JOptionPane;20 19 /** 21 20 * A Splash window. … … 42 41 public class SplashWindow extends JFrame { 43 42 /** 43 * 44 */ 45 private static final long serialVersionUID = 1L; 46 47 /** 44 48 * The current instance of the splash window. 45 49 * (Singleton design pattern). 46 50 */ 47 51 private static SplashWindow instance; 48 49 private static Main mainInstance;50 52 51 53 /** … … 124 126 // occur before the contents of the window 125 127 // has been painted. 126 synchronized( SplashWindow.this) {127 SplashWindow.this.paintCalled = true;128 SplashWindow.this.notifyAll();128 synchronized(this) { 129 paintCalled = true; 130 notifyAll(); 129 131 } 130 132 dispose(); … … 217 219 public static void invokeMain(String className, String[] args) { 218 220 try { 219 mainInstance = (Main)Class.forName(className)221 Class.forName(className) 220 222 .getMethod("main", new Class[] {String[].class}) 221 223 .invoke(null, new Object[] {args}); -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/Splasher.java
r1295 r1471 26 26 try 27 27 { 28 Thread.sleep( 1000);28 Thread.sleep(200); 29 29 } catch (InterruptedException e) {} 30 30 SplashWindow.invokeMain("ome.formats.importer.Main", args); -
branches/3.0-Beta1/components/bioformats-omero/src/ome/formats/importer/StatusBar.java
r1299 r1471 107 107 { 108 108 progressBar.setVisible(visible); 109 progressBar.setFont(getFont().deriveFont(11.0f)); 110 progressBar.setPreferredSize(new Dimension(220, 20)); 109 111 if (perc < 0) progressBar.setIndeterminate(true); 110 112 else 111 113 { 112 114 progressBar.setIndeterminate(false); 113 progressBar.setFont(getFont().deriveFont(11.0f)); 114 progressBar.setPreferredSize(new Dimension(220, 20)); 115 progressBar.setValue(perc); 116 } 117 if (string.length() > 0) 118 { 115 119 progressBar.setStringPainted(true); 116 progressBar.setValue(perc); 117 if (string.length() > 0) 118 { 119 progressBar.setStringPainted(true); 120 progressBar.setString(" " + string + " "); 121 } 120 progressBar.setString(" " + string + " "); 122 121 } 123 122 }
