skip to main content
Defense > Developing with design tools > Using the Dashboard Editor > Programming the Dashboard Editor > A basic Dashboard Editor
 
A basic Dashboard Editor
The ilog.views.dashboard package is used to create dashboard diagram applications based on Rogue Wave® JViews symbols and composite graphics. Extended from JViews Diagrammer code, the dashboard diagram package uses standard Swing components to make GUI applications.
The following example shows how to program a basic Dashboard Editor application.
A basic dashboard editor application
 
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.net.URL;
import javax.swing.JFrame;
import javax.swing.ImageIcon;
 
import ilog.views.dashboard.IlvDashboardEditBar;
import ilog.views.dashboard.IlvDashboardEditor;
import ilog.views.dashboard.IlvDashboardSymbolPalette;
import ilog.views.dashboard.IlvDashboardDiagram;
import ilog.views.dashboard.IlvDashboardTabbedPane;
import ilog.views.diagrammer.application.IlvDiagrammerOverview;
 
public class DashEditorExample extends JFrame
{
  private IlvDashboardEditor dashEd;
  private IlvDashboardEditBar editToolBar;
  private IlvDashboardSymbolPalette palettePanel;
  private IlvDashboardDiagram dashDiag;
 
  public DashEditorExample(String[] args)
  {
    // Set up the application frame.
    super("Basic Diagrammer Application");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setLocation(100, 100);
    setSize(700, 700);
 
    // Create the editor with a single diagram.
    dashEd = new IlvDashboardEditor();
    dashEd.init(args);
 
    IlvDashboardTabbedPane tabPane = new IlvDashboardTabbedPane(dashEd);
    dashEd.setDashboardContainer(tabPane);
 
    // Add the Edit toolbar.
    editToolBar = new IlvDashboardEditBar();
    // Add the Symbol palette
    palettePanel = new IlvDashboardSymbolPalette(dashEd);
 
    // Add the Dashboard components into the JFrame
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(tabPane, BorderLayout.CENTER);
    getContentPane().add(editToolBar, BorderLayout.NORTH);
    getContentPane().add(palettePanel, BorderLayout.EAST);
 
    dashEd.loadPalette("ilog/views/palettes/controls/");
    dashEd.loadPalette("ilog/views/palettes/shared/");
    dashEd.run();
  }
 
  public static void main(String[] args) {
    DashEditorExample basicEditor = new DashEditorExample(args);
    basicEditor.setVisible(true);
  }
}

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.