• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 5686

Show
Ignore:
Timestamp:
10/14/08 10:26:04 (7 weeks ago)
Author:
jburel
Message:

cleaning

Location:
trunk/SRC/org/openmicroscopy/shoola
Files:
1 removed
6 modified

  • agents/dataBrowser/DataBrowserTranslator.java (modified) (1 diff)
  • util/ui/NotificationDialog.java (modified) (3 diffs)
  • util/ui/ReferenceFramePanel.java (deleted)
  • util/ui/border/ImageBorder.java (modified) (10 diffs)
  • util/ui/lens/LensComponent.java (modified) (1 diff)
  • util/ui/lens/LensController.java (modified) (1 diff)
  • util/ui/lens/ZoomWindow.java (modified) (3 diffs)

Legend:

Unmodified
Added
Removed
  • trunk/SRC/org/openmicroscopy/shoola/agents/dataBrowser/DataBrowserTranslator.java

    r5662 r5686  
    193193        return node; 
    194194    } 
    195  
    196     /** 
    197      * Transforms the images contained in the passed container. 
    198      *  
    199      * @param uo                The data object to handle. Mustn't be <code>null</code>. 
    200      * @param userID    The id of the current user. 
    201      * @param groupID   The id of the group the current user selects when  
    202      *                      retrieving the data. 
    203      * @return Collection of {@link ImageNode} or <code>null</code>. 
    204      */ 
    205     private static Set transformImagesFrom(DataObject uo, long userID, 
    206                                         long groupID) 
    207     { 
    208         if (uo == null)  
    209             throw new IllegalArgumentException("No Object."); 
    210         Set images = null; 
    211         Set children; 
    212         Iterator i, j; 
    213         DatasetData d; 
    214         if (uo instanceof DatasetData) { 
    215                 d = (DatasetData) uo; 
    216                 images = transformImages(d.getImages(), userID, groupID); 
    217         } else if (uo instanceof ProjectData) { 
    218                 ProjectData pj = (ProjectData) uo; 
    219                 children = pj.getDatasets(); 
    220                 if (children != null) { 
    221                         i = children.iterator(); 
    222                         images = new HashSet(); 
    223                         while (i.hasNext()) { 
    224                                         d = (DatasetData) i.next(); 
    225                                         images.addAll(transformImages(d.getImages(),  
    226                                                                 userID, groupID)); 
    227                                 } 
    228                 } 
    229         } else if (uo instanceof ImageData) { 
    230                 images = new HashSet(1);  
    231                 if (isReadable(uo, userID, groupID)) 
    232                 images.add(linkImageTo((ImageData) uo, null)); 
    233         }  
    234         return images; 
    235     } 
    236195     
    237196    /** 
  • trunk/SRC/org/openmicroscopy/shoola/util/ui/NotificationDialog.java

    r5429 r5686  
    4141import javax.swing.JPanel; 
    4242 
     43 
     44//Third-party libraries 
    4345import layout.TableLayout; 
    44  
    45 //Third-party libraries 
    4646 
    4747//Application-internal dependencies 
    … …  
    214214        } 
    215215         
     216        /** 
     217         * Initialises the UI. 
     218         *  
     219         * @param message               The message to display. 
     220         * @param messageIcon   The icon laid out next to the message. 
     221         */ 
    216222        private void initiliaze(String message, Icon messageIcon) 
    217223        { 
    … …  
    222228                buildGUI(message, messageIcon); 
    223229        } 
     230         
    224231        /** 
    225232         * Creates a new dialog. 
  • trunk/SRC/org/openmicroscopy/shoola/util/ui/border/ImageBorder.java

    r5583 r5686  
    2424 
    2525// Java Imports 
    26  
    2726import java.awt.Component; 
    2827import java.awt.Graphics; 
    … …  
    3938 
    4039//Application-internal dependencies 
    41  
    4240import org.openmicroscopy.shoola.util.image.geom.Factory; 
    4341 
    … …  
    6563{ 
    6664     
    67         /** 
    68          * The Images for the top of the border. 
    69          */ 
    70     private Image               top_center, top_left, top_right; 
    71      
    72     /** 
    73      * The Images for the left and right sides of the border. 
    74      */ 
    75     private Image               left_center, right_center; 
    76      
    77     /** 
    78      * The Images for the bottom of the border. 
    79      */ 
    80     private Image               bottom_center, bottom_left, bottom_right; 
     65        /** The Image displayed in the centre of the top border. */ 
     66    private Image       top_center; 
     67     
     68    /** The Image displayed on the left of the top border. */ 
     69    private Image       top_left; 
     70     
     71    /** The Image displayed on the left of the top border. */ 
     72    private Image       top_right; 
     73     
     74    /** The image used for the left side of the border. */ 
     75    private Image       left_center; 
     76     
     77    /** The image used for the rigth side of the border. */ 
     78    private Image       right_center; 
     79     
     80        /** The Image displayed in the centre of the bottom border. */ 
     81    private Image       bottom_center; 
     82     
     83    /** The Image displayed on the left of the bottom border. */ 
     84    private Image       bottom_left; 
     85     
     86    /** The Image displayed on the right of the bottom border. */ 
     87    private Image       bottom_right; 
    8188     
    8289    /** 
    … …  
    8592     * Insets calculated from the size of the side Images.  
    8693     */ 
    87     private Insets              insets; 
     94    private Insets      insets; 
    8895     
    8996    /** 
    … …  
    103110        Image bottom_left, Image bottom_center, Image bottom_right)  
    104111    { 
     112        if (top_left == null) 
     113                throw new IllegalArgumentException("The top left image " + 
     114                                "cannot be null."); 
     115        if (top_center == null) 
     116                throw new IllegalArgumentException("The top center image " + 
     117                                "cannot be null."); 
     118        if (top_right == null) 
     119                throw new IllegalArgumentException("The top right image " + 
     120                                "cannot be null."); 
     121        if (left_center == null) 
     122                throw new IllegalArgumentException("The left  center image " + 
     123                                "cannot be null."); 
     124        if (right_center == null) 
     125                throw new IllegalArgumentException("The right  center image " + 
     126                                "cannot be null."); 
     127        if (bottom_left == null) 
     128                throw new IllegalArgumentException("The bottom left image " + 
     129                                "cannot be null."); 
     130        if (bottom_center == null) 
     131                throw new IllegalArgumentException("The bottom center image " + 
     132                                "cannot be null."); 
     133        if (bottom_right == null) 
     134                throw new IllegalArgumentException("The bottom right image " + 
     135                                "cannot be null."); 
    105136        this.top_left = top_left; 
    106137        this.top_center = top_center; 
    … …  
    117148     * Otherwise, {@link Border#getBorderInsets(Component)} will return  
    118149     * Insets calculated from the size of the side Images.  
     150     *  
     151     * @param insets The value to set. 
    119152     */ 
    120153    public void setInsets(Insets insets)  
    … …  
    127160     * Unless the insets have been manually set using {@link #setInsets(Insets)} 
    128161     *  
     162     * @see See above. 
    129163     * @see Border#getBorderInsets(Component) 
    130164     */ 
    131165    public Insets getBorderInsets(Component c)  
    132166    { 
    133         if(insets != null) { 
    134             return insets; 
    135         } else { 
    136             return new Insets(top_center.getHeight(null),left_center.getWidth(null), 
     167        if (insets != null) return insets; 
     168        return  
     169        new Insets(top_center.getHeight(null), left_center.getWidth(null), 
    137170                bottom_center.getHeight(null), right_center.getWidth(null)); 
    138         } 
    139171    } 
    140172     
    … …  
    144176     * @see AbstractBorder#paintBorder(Component, Graphics, int, int, int, int) 
    145177     */ 
    146     public void paintBorder(Component c, Graphics g, int x,  
    147                 int y, int width, int height)  
    148     { 
    149         Graphics2D g2 = (Graphics2D)g; 
     178    public void paintBorder(Component c, Graphics g, int x, int y, int width,  
     179                int height)  
     180    { 
     181        Graphics2D g2 = (Graphics2D) g; 
    150182         
    151183        int tlw = top_left.getWidth(null); 
    … …  
    168200        int brh = bottom_right.getHeight(null); 
    169201         
    170         fillTexture(g2,top_left,        x,              y,              tlw,            tlh); 
    171         fillTexture(g2,top_center,      x+tlw,  y,              width-tlw-trw, tch); 
    172         fillTexture(g2,top_right,       x+width-trw,  y,        trw,    trh); 
    173          
    174         fillTexture(g2,left_center,   x,        y+tlh,  lcw,    height-tlh-blh); 
    175         fillTexture(g2,right_center, x+width-rcw, y+trh, rcw, height-trh-brh); 
    176          
    177         fillTexture(g2,bottom_left,   x,        y+height-blh,   blw,    blh); 
    178         fillTexture(g2,bottom_center, x+blw, y+height-bch,      width-blw-brw, bch); 
    179         fillTexture(g2,bottom_right,  x+width-brw,  y+height-brh, brw,  brh); 
     202        fillTexture(g2, top_left, x, y, tlw, tlh); 
     203        fillTexture(g2, top_center, x+tlw, y, width-tlw-trw, tch); 
     204        fillTexture(g2, top_right, x+width-trw, y, trw, trh); 
     205         
     206        fillTexture(g2, left_center, x, y+tlh, lcw, height-tlh-blh); 
     207        fillTexture(g2, right_center, x+width-rcw, y+trh, rcw, height-trh-brh); 
     208         
     209        fillTexture(g2, bottom_left, x, y+height-blh, blw, blh); 
     210        fillTexture(g2, bottom_center, x+blw, y+height-bch, width-blw-brw, bch); 
     211        fillTexture(g2, bottom_right, x+width-brw, y+height-brh, brw, brh); 
    180212    } 
    181213     
    … …  
    184216     * a specified Image. 
    185217     *  
    186      * @param g2                The Graphics2D object to fill 
    187      * @param img               The image to paint into the Graphics2D object 
    188      * @param x                 The x coordinate of the area to paint 
    189      * @param y                 The y coordinate of the area to paint 
    190      * @param w                 The width of the area to paint 
    191      * @param h                 The height of the area to paint 
    192      */ 
    193     public static void fillTexture(Graphics2D g2, Image img,  
    194                 int x, int y, int w, int h)  
     218     * @param g2  The Graphics2D object to fill 
     219     * @param img The image to paint into the Graphics2D object 
     220     * @param x   The x coordinate of the area to paint 
     221     * @param y   The y coordinate of the area to paint 
     222     * @param w   The width of the area to paint 
     223     * @param h The height of the area to paint 
     224     */ 
     225    public static void fillTexture(Graphics2D g2, Image img, int x, int y,  
     226                                                        int w, int h)  
    195227    { 
    196228        BufferedImage buff = Factory.createImage(img); 
    197         Rectangle anchor = new Rectangle(x,y, 
    198             img.getWidth(null),img.getHeight(null)); 
     229        Rectangle anchor = new Rectangle(x, y, img.getWidth(null), 
     230                                                img.getHeight(null)); 
    199231        TexturePaint paint = new TexturePaint(buff,anchor); 
    200232        g2.setPaint(paint); 
  • trunk/SRC/org/openmicroscopy/shoola/util/ui/lens/LensComponent.java

    r5159 r5686  
    180180                lens.addController(lensController); 
    181181                lens.setLensColour(lensModel.getLensPreferredColour()); 
    182                 zoomWindow.addController(lensController); 
    183182                menu = new LensMenu(this); 
    184183                lens.setPopupMenu(menu.getPopupMenu()); 
  • trunk/SRC/org/openmicroscopy/shoola/util/ui/lens/LensController.java

    r5014 r5686  
    2222 */ 
    2323package org.openmicroscopy.shoola.util.ui.lens; 
     24 
    2425//Java imports 
    2526import java.awt.Cursor; 
  • trunk/SRC/org/openmicroscopy/shoola/util/ui/lens/ZoomWindow.java

    r5014 r5686  
    5252        private ZoomWindowUI    zoomWindowUI; 
    5353         
    54         /** Controller which manipulates the lens and zoomWindow images. */ 
    55         private LensController  lensController; 
    56          
    57         /** Parent component of the lens and ZoomWindow. */ 
    58         private LensComponent   lensComponent; 
    59          
    6054        /** 
    6155         * Constructor of the zoomWindow. This creates an instance of the  
    … …  
    6862        ZoomWindow(JFrame parent, LensComponent lensComponent) 
    6963        { 
    70                 this.lensComponent = lensComponent; 
    7164                zoomWindowUI = new ZoomWindowUI(parent, lensComponent); 
    7265        } 
    … …  
    8275                if (lensComponent == null) 
    8376                        throw new IllegalArgumentException("No parent."); 
    84                 this.lensComponent = lensComponent; 
    8577                zoomWindowUI = new ZoomWindowUI(null, lensComponent); 
    86         } 
    87          
    88         /** 
    89          * Adds controller to the zoomWindow. 
    90          *  
    91          * @param lensController        Reference to the control.  
    92          *                                                      Mustn't be <code>null</code>. 
    93          */ 
    94         void addController(LensController lensController) 
    95         { 
    96                 if (lensController == null) 
    97                         throw new IllegalArgumentException("No control."); 
    98                 this.lensController = lensController; 
    9978        } 
    10079 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/