Changeset 5635
- Timestamp:
- 09/30/08 10:37:20 (8 weeks ago)
- Location:
- trunk
- Files:
-
- 9 modified
-
SRC/org/openmicroscopy/shoola/env/Container.java (modified) (1 diff)
-
SRC/org/openmicroscopy/shoola/env/LookupNames.java (modified) (1 diff)
-
SRC/org/openmicroscopy/shoola/env/ui/SplashScreenManager.java (modified) (6 diffs)
-
SRC/org/openmicroscopy/shoola/util/ui/IconFactory.java (modified) (2 diffs)
-
SRC/org/openmicroscopy/shoola/util/ui/login/ScreenLogin.java (modified) (1 diff)
-
SRC/org/openmicroscopy/shoola/util/ui/login/ServerTable.java (modified) (5 diffs)
-
build/app.xml (modified) (2 diffs)
-
build/build.xml (modified) (1 diff)
-
build/dist.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/org/openmicroscopy/shoola/env/Container.java
r4856 r5635 224 224 public String resolveConfigFile(String fileName) 225 225 { 226 if (fileName == null) throw new NullPointerException();226 //if (fileName == null) throw new NullPointerException(); 227 227 StringBuffer relPath = new StringBuffer(CONFIG_DIR); 228 228 relPath.append(File.separatorChar); -
trunk/SRC/org/openmicroscopy/shoola/env/LookupNames.java
r5632 r5635 60 60 public static final String SPLASH_SCREEN_LOGO = "SplashScreenLogo"; 61 61 62 /** Field to access the <code>Splash screen</code> information. */ 63 public static final String SPLASH_SCREEN_LOGIN = "SplashScreenLogin"; 64 62 65 /** Field to access the <code>Help on line</code> information. */ 63 66 public static final String HELP_ON_LINE = "HelpOnLine"; -
trunk/SRC/org/openmicroscopy/shoola/env/ui/SplashScreenManager.java
r5632 r5635 34 34 import java.beans.PropertyChangeEvent; 35 35 import java.beans.PropertyChangeListener; 36 import java.io.File; 36 37 import javax.swing.Icon; 38 import javax.swing.ImageIcon; 37 39 import javax.swing.JFrame; 38 40 … … 42 44 import org.openmicroscopy.shoola.env.Container; 43 45 import org.openmicroscopy.shoola.env.LookupNames; 46 import org.openmicroscopy.shoola.env.config.Registry; 44 47 import org.openmicroscopy.shoola.env.data.login.UserCredentials; 45 48 import org.openmicroscopy.shoola.util.ui.NotificationDialog; … … 106 109 private SplashScreen component; 107 110 111 /** The splash login. */ 112 private Icon splashLogin; 113 108 114 /** 109 115 * Attempts to log onto <code>OMERO</code>. … … 156 162 Image img = IconManager.getOMEImageIcon(); 157 163 Object version = container.getRegistry().lookup(LookupNames.VERSION); 158 view = new ScreenLogin(TITLE, IconManager.getLoginBackground(), img, 159 (String) version); 164 String v = ""; 165 if (version != null && version instanceof String) 166 v = (String) version; 167 view = new ScreenLogin(TITLE, splashLogin, img, v); 160 168 view.showConnectionSpeed(true); 161 169 Dimension d = viewTop.getExtendedSize(); … … 168 176 } 169 177 178 /** 179 * Creates the splash screen logo and login 180 * 181 * @param name The name of the image. 182 * @param path The path to the config file. 183 * @return See above. 184 */ 185 private Icon createIcon(String name, String path) 186 { 187 StringBuffer buf; 188 if (name == null) return null; 189 buf = new StringBuffer(path); 190 buf.append(File.separatorChar); 191 buf.append(name); 192 try { 193 Image img = Toolkit.getDefaultToolkit().getImage(buf.toString()); 194 if (img == null) return null; 195 Icon icon = new ImageIcon(img); 196 if (icon.getIconHeight() <= 0 || icon.getIconWidth() <= 0) 197 return null; 198 return icon; 199 } catch (Exception e) { 200 //log the exception 201 container.getRegistry().getLogger().error(this, "Cannot create " + 202 "the icon."); 203 } 204 return null; 205 } 206 170 207 /** 171 208 * Creates the splash screen component. … … 180 217 this.component = component; 181 218 Image img = IconManager.getOMEImageIcon(); 182 String n = (String) c.getRegistry().lookup(LookupNames.SPLASH_SCREEN_LOGO); 183 IconManager im = IconManager.getInstance(c.getRegistry()); 184 Icon splashScreen = im.getIcon(n); 219 Registry reg = c.getRegistry(); 220 String n = (String) reg.lookup(LookupNames.SPLASH_SCREEN_LOGO); 221 222 String f = container.resolveConfigFile(null); 223 Icon splashScreen = createIcon(n, f); 185 224 if (splashScreen == null) 186 225 splashScreen = IconManager.getSplashScreen(); 187 view = new ScreenLogin(TITLE, IconManager.getLoginBackground(), img); 226 n = (String) reg.lookup(LookupNames.SPLASH_SCREEN_LOGIN); 227 228 splashLogin = createIcon(n, f); 229 if (splashLogin == null) 230 splashLogin = IconManager.getLoginBackground(); 231 232 view = new ScreenLogin(TITLE, splashLogin, img); 188 233 viewTop = new ScreenLogo(TITLE, splashScreen, img); 189 234 Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); -
trunk/SRC/org/openmicroscopy/shoola/util/ui/IconFactory.java
r4695 r5635 56 56 * The path is relative to the application classpath. 57 57 */ 58 private String location = " graphx";58 private String location = "/org/openmicroscopy/shoola/util/ui/graphx/"; 59 59 60 60 /** … … 67 67 String getResourcePathname(String iconFileName) 68 68 { 69 return location+ "/"+iconFileName;69 return location+iconFileName; 70 70 } 71 71 -
trunk/SRC/org/openmicroscopy/shoola/util/ui/login/ScreenLogin.java
r5628 r5635 322 322 connectionSpeedText = new JLabel(getConnectionSpeed()); 323 323 connectionSpeedText.setForeground(TEXT_COLOR); 324 325 324 serverText = UIUtilities.buildTextPane(serverName, TEXT_COLOR); 326 325 serverTextPane = UIUtilities.buildComponentPanelRight(serverText, -
trunk/SRC/org/openmicroscopy/shoola/util/ui/login/ServerTable.java
r5519 r5635 67 67 private static final int INDENT = 4; 68 68 69 /** The default size of an icon. */ 70 private static final int DEFAULT_ICON_SIZE = 22; 71 69 72 /** Index of the previously selected row. */ 70 73 private int previousRow; … … 95 98 * @param parent Reference to the model. Mustn't be <code>null</code>. 96 99 * @param servers Collection of servers. 97 * @param icon The icon to display ne txto the server's name.100 * @param icon The icon to display next to the server's name. 98 101 */ 99 102 ServerTable(ServerEditor parent, List servers, Icon icon) … … 122 125 } 123 126 } 127 int w = DEFAULT_ICON_SIZE; 128 int h = DEFAULT_ICON_SIZE; 129 if (icon != null) { 130 w = icon.getIconWidth(); 131 h = icon.getIconHeight(); 132 } 124 133 focus = Boolean.FALSE; 125 134 putClientProperty("terminateEditOnFocusLost", focus); … … 127 136 setModel(new ServerTableModel(objects, columnNames)); 128 137 setDefaultRenderer(Object.class, new ServerListRenderer()); 129 setRowHeight( icon.getIconHeight()+INDENT);138 setRowHeight(h+INDENT); 130 139 setShowHorizontalLines(true); 131 140 setShowVerticalLines(false); … … 135 144 setIntercellSpacing(new Dimension(0, d.height)); 136 145 TableColumn column = getColumnModel().getColumn(0); 137 int n = icon.getIconWidth()+INDENT;146 int n = w+INDENT; 138 147 column.setMaxWidth(n); 139 148 column.setMinWidth(n); -
trunk/build/app.xml
r5604 r5635 66 66 67 67 <property name="app.compiled.util.dir" location="${app.dir}/compiled/util"/> 68 <fileset id="app.resources.util" dir="${base.src.util.dir}" excludes="**/*.java"/> 68 <fileset id="app.resources.util" dir="${base.src.dir}"> 69 <include name="org/openmicroscopy/shoola/util/**" /> 70 <exclude name="**/*.java" /> 71 </fileset> 72 <fileset id="app.resources.svc" dir="${base.src.dir}"> 73 <include name="org/openmicroscopy/shoola/svc/**" /> 74 <exclude name="**/*.java" /> 75 </fileset> 69 76 70 77 … … 91 98 <fileset refid="app.resources.util"/> 92 99 </copy> 100 <copy todir="${app.compiled.svc.dir}"> 101 <fileset refid="app.resources.svc"/> 102 </copy> 93 103 </target> 94 104 -
trunk/build/build.xml
r5604 r5635 92 92 93 93 <property name="base.src.util.dir" location="SRC/org/openmicroscopy/shoola/util"/> 94 <property name="base.src.svc.dir" location="SRC/org/openmicroscopy/shoola/svc"/> 95 94 <property name="base.src.svc.dir" location="SRC/org/openmicroscopy/shoola/svc"/> 95 96 96 97 <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 97 98 * Include the tasks lib and all children. -
trunk/build/dist.xml
r5628 r5635 121 121 <jar destfile="${dist.dir}/${dist.util.name}.jar"> 122 122 <fileset dir="${app.compiled.util.dir}"/> 123 <manifest> 124 <attribute name="Created-By" value="OMERO Development Team"/> 125 </manifest> 123 126 </jar> 124 127 </target>
