Permalink
Browse files

code for lesson 10 on customizing gvSIG appearance

  • Loading branch information...
1 parent 5a3dbc3 commit 9972d1aa1277ce33bcc44fb107fbbe316aa9c9f5 @jsanz committed Aug 19, 2012
View
@@ -175,11 +175,24 @@ Have a nice day!
## Day 9
-## Lesson 9
+At the end of the course I've started to use branches per lesson. I should have
+to use this for the whole course but well, at that time I didn't had enough git
+confidence por branching, rebasing, etc.
+
+### Lesson 9
- Reading the lesson material, it's short but not trivial
- Coded the new extension, that disables some extension for our spcial views but
taking care of a previous ExclusiveUIExtension if it exists, and caching results
for ``isEnabled`` and ``isVisible`` methods.
- Everything was right except for the ``hideExtension`` method where I coded an ``and``
instead of an ``or``. Easy to track with some small debugging.
+
+### Lesson 10
+
+- Reading the lesson material, quite straight forward and trivial
+- Added the resources and the about information following the new API, really easy
+- Struggled a little bit with Java dates, in order to note use deprecated ``Date``
+ methods. At the end was quite easy using the ``SimpleDateFormat``.
+
+
@@ -1,5 +1,5 @@
#
-#Sun Aug 19 21:49:54 CEST 2012
+#Sun Aug 19 22:49:12 CEST 2012
owner=gvSIG Association
code=org.gvsig.visor.app.mainplugin
java-version=j1_5
@@ -80,6 +80,11 @@
<artifactId>org.gvsig.fmap.geometry</artifactId>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.gvsig</groupId>
+ <artifactId>org.gvsig.about.api</artifactId>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<properties>
<package.info.state>devel</package.info.state>
@@ -25,9 +25,14 @@
import java.io.File;
import java.net.URL;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import javax.swing.SwingUtilities;
+import org.gvsig.about.AboutManager;
+import org.gvsig.about.AboutParticipant;
import org.gvsig.andami.messages.NotificationManager;
import org.gvsig.andami.plugins.Extension;
import org.gvsig.app.ApplicationLocator;
@@ -108,6 +113,8 @@ public void run() {
}
});
+ initializeAbout();
+
}
private void createAndShowView() throws LoadLayerException {
@@ -181,4 +188,21 @@ private File getResource(String pathname) {
return new File(res.getPath());
}
+ private void initializeAbout(){
+ AboutManager aboutManager = applicationManager.getAbout();
+ AboutParticipant dev = aboutManager.addDeveloper("Curso de desarrollo",
+ this.getClass().getClassLoader().getResource("about/curso-dev.html"), 1);
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+ Date begin, end;
+ try {
+ begin = sdf.parse("24/04/2012");
+ end = sdf.parse("27/04/2012");
+ dev.addContribution("Visor", "Visor personalizado de cartografía",
+ begin, end);
+ } catch (ParseException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
}
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h2>Curso de desarrollo de gvSIG 2.0</h2>
+<p>Desarrollos realizados <em>durante</em> el curso</p>
+</body>
+</html>
@@ -0,0 +1,14 @@
+<AndamiProperties>
+ <ApplicationImages>
+ <SplashImages>
+ <Splash path="splash-curso.png" timer="200" x="270" y="240"
+ fontsize="18" color="80,170,240" version="2.0" />
+ <Splash path="splash-curso2.png" timer="200" x="270" y="240"
+ fontsize="18" color="80,170,240" version="2.0" />
+ </SplashImages>
+ <BackgroundImage path="theme/splash-curso.png" />
+ <WallpaperType value="CENTERED" />
+ <Icon path="$GVSIG_INSTALL/theme/icon.png" />
+ </ApplicationImages>
+ <ApplicationName value="Curso gvSIG 2.0.0" />
+</AndamiProperties>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9972d1a

Please sign in to comment.