mdi
The core MDI framework: application and desktop management, views, drawable items, toolbars, plotting, mapping, simulation, and optimization.
What It Covers
| Chapter | Topic | Key classes |
|---|---|---|
| 1 | Architecture overview | Application → Desktop → View → Container → Layer → Item |
| 2 | Creating the application | BaseMDIApplication |
| 3 | Creating views | BaseView |
| 4 | Drawable items | AItem, PointItem, LineItem, PolygonItem, PolylineItem, RectangleItem, EllipseItem, RadArcItem, TextItem, ImageItem, ConnectorItem |
| 5 | Toolbars and rubberbanding | AToolBar, BaseToolBar, ToolBits, IToolHandler, GestureContext |
| 6 | Plotting (sPlot) | PlotView, PlotPanel, PlotCanvas, PlotToolHandler, ACurve, XYPlotBuilder, PlotDeck |
| 7 | Mapping | MapView2D, MapContainer, IMapProjection, ShapefileLayer, MapLayerStyle |
| 8 | Simulation | Simulation, SimulationEngine, SimulationContext |
| 9 | Optimization | simulated annealing and genetic-algorithm demos, built as specialized simulations |
Gallery
Figures from the Optimization chapter (9), showing the simulated-annealing and genetic-algorithm demos in action.
TspDemoView before and after simulated annealing — a tangled initial tour converges to a near-optimal one as temperature cools.
Simulation.step() as a GA generation: selection → crossover → mutation → evaluation → replacement.
ImageEvolutionDemoView evolving a population of triangle-based images toward a target, with best/mean error tracked per generation.Try It
git clone https://github.com/heddle/mdi.git
cd mdi
mvn install
mvn exec:java -Dexec.mainClass=edu.cnu.mdi.app.DemoApp
DemoApp opens a virtual desktop preloaded with a drawing view, a map view, a
plot view, and several simulation/optimization demos (network decluttering, traveling-salesperson
simulated annealing, image evolution via a genetic algorithm, and a geometry-slice view) — a
useful first stop before reading the chapters in detail.
Maven Coordinates
Released versions are published on Maven Central under io.github.heddle.
<dependency>
<groupId>io.github.heddle</groupId>
<artifactId>mdi</artifactId>
<version>1.2.3</version>
</dependency>
Check Maven Central for the artifact listing. The book release is v1.2.3.
API Documentation
Full Javadoc is available here.
MDI Companion