javaone 2014 flexibility breeds complexity: living in a modular world the wildfire management tool...
TRANSCRIPT
JavaOne 2014Flexibility Breeds Complexity: Living in a Modular World
THE WILDFIRE MANAGEMENT TOOL (WMT)BRUCE SCHUBERT – EMXSYS
HTTP://EMXSYS.COM
HTTPS://BITBUCKET.ORG/EMXSYS/WILDFIRE-MANAGEMENT-TOOL
Flexibility Breeds Complexity
Theory is when is when you know something, but it doesn’t work.
Practice is when something works, but you don’t know why.
Programmers combine theory and practice: Nothing works and they don’t know why.
Living in a Modular WorldHow WMT deals with complexity
1. Built on the Terramenta GIS NetBeans framework Provides 3D Virtual Globe, Time Controls, & Drawing Tools
Wraps the NASA World Wind SDK
2. Uses the Flamingo Ribbon Bar Self Documenting UI via Rich Tooltips
@RibbonActionReference annotation
3. Extends the NetBeans Global Context Makes the current project always available in
Utilities.actionsGlobalContext()
See: http://wiki.netbeans.org/DevFaqAddGlobalContext
Terramenta
WMT-Application POM adds Terramenta dependency <!-- Terramenta -->
<dependency>
<artifactId>terramenta-application</artifactId>
<groupId>com.terramenta</groupId>
<version>${terramenta.version}</version>
<type>zip</type>
</dependency>
@RibbonActionReference
Custom Annotation defined in the Terramenta Ribbon Module@ActionReference(path = "Toolbars/Map", position = 4100)
@RibbonActionReference( path = "Menu/Home/Zoom", position = 100,
description = "#CTL_ZoomInAction_Hint",
tooltipTitle = "#CTL_ZoomInAction_TooltipTitle",
tooltipBody = "#CTL_ZoomInAction_TooltipBody",
tooltipIcon = "com/emxsys/wmt/core/images/zoom_in.png",
tooltipFooter = "#CTL_ZoomInAction_TooltipFooter",
tooltipFooterIcon = "com/emxsys/wmt/core/images/keyboard24.png",
autoRepeatAction = true)
Extending NetBeans Global Context
Use Case: Action.actionPerformed(…)
Project currentProject =
Utilities.actionsGlobalContext().lookup(Project.class);
Implementation defined in WMT Core Module:
com.emxsys.wmt.core.project.GlobalActionContextProxy
See Geertjan’s Blog:
blogs.oracle.com/geertjan/entry/org_openide_util_contextglobalprovider