EMFExportDemo.java |
1 /**************************************************************************** 2 ** 3 ** This file is part of the yFiles extension package yExport-1.3. 4 ** 5 ** yWorks proprietary/confidential. Use is subject to license terms. 6 ** 7 ** Redistribution of this file or of an unauthorized byte-code version 8 ** of this file is strictly forbidden. 9 ** 10 ** Copyright (c) 2007-2012 by yWorks GmbH, Vor dem Kreuzberg 28, 11 ** 72070 Tuebingen, Germany. All rights reserved. 12 ** 13 ***************************************************************************/ 14 15 package demo.yext.export; 16 17 18 import yext.export.io.EMFOutputHandler; 19 20 import javax.swing.JButton; 21 import javax.swing.JToolBar; 22 23 24 /** 25 * Demonstrates how to export a graph to EMF format. 26 * 27 */ 28 public class EMFExportDemo extends AbstractExportDemo 29 { 30 /** 31 * Creates a toolbar for this demo. 32 */ 33 protected JToolBar createToolBar() { 34 JToolBar jtb = super.createToolBar(); 35 jtb.addSeparator(); 36 jtb.add(new JButton(new ExportAction("EMF Export", new EMFOutputHandler()))); 37 return jtb; 38 } 39 40 41 /** 42 * Launches this demo. 43 */ 44 public static void main(String[] args) { 45 initLnF(); 46 (new EMFExportDemo()).start(); 47 } 48 }