public SwingDataEditor( File definition, File data, boolean doSystemExit  ) { super("BinaryEditor", doSystemExit); setJMenuBar( createMenuBar() ); this.dataManager = new DataManager(); DataEntry entry = new DataEntry( "noname", DataType.BYTE ); this.dataManager.addDataEntry( entry ); setSize( 900, 600 );  this.descriptionField = new JTextField(); this.descriptionField.addActionListener( this ); this.extensionField = new JTextField(); this.extensionField.addActionListener( this );   this.dataTableModel = new DataTableModel( this.dataManager, this ); this.dataView = new DataView( this, this.dataTableModel, this.dataManager ); this.dataView.setPreferredScrollableViewportSize(new Dimension(900, 550)); registerDropTarget( this.dataView ); JScrollPane scrollPane = createScrollPane(this.dataView); Container contentPane = getContentPane(); contentPane.setLayout( new BorderLayout() ); JPanel descriptionPanel = new JPanel( new BorderLayout() ); descriptionPanel.add( new JLabel("description: "), BorderLayout.WEST ); descriptionPanel.add( this.descriptionField, BorderLayout.CENTER ); JPanel extensionPanel = new JPanel( new BorderLayout() ); extensionPanel.add(   new JLabel("extension:   "), BorderLayout.WEST ); extensionPanel.add( this.extensionField, BorderLayout.CENTER ); JPanel definitionPanel = new JPanel( new GridLayout( 2, 1)); definitionPanel.add( descriptionPanel ); definitionPanel.add( extensionPanel ); contentPane.add( definitionPanel, BorderLayout.NORTH ); contentPane.add( scrollPane, BorderLayout.CENTER ); this.statusBar = new StatusBar(); contentPane.add( this.statusBar, BorderLayout.SOUTH ); updateTitle();  setIcon( "icons/binaryeditor.png" );  if ( definition == null ) { loadSettings(); } else { openDefinition( definition ); if (data != null) { openData( data ); } } this.dataManager.registerUI( this );
public SwingDataEditor( ) { this( null, null, true );
	public SwingDataEditor( File definition, File data, boolean doSystemExit  ) {		super("BinaryEditor", doSystemExit);		setJMenuBar( createMenuBar() );		this.dataManager = new DataManager();		DataEntry entry = new DataEntry( "noname", DataType.BYTE );		this.dataManager.addDataEntry( entry );		setSize( 900, 600 );		//pack();		this.descriptionField = new JTextField();		this.descriptionField.addActionListener( this );		this.extensionField = new JTextField();		this.extensionField.addActionListener( this );				// add data-view:		this.dataTableModel = new DataTableModel( this.dataManager, this );		this.dataView = new DataView( this, this.dataTableModel, this.dataManager );		this.dataView.setPreferredScrollableViewportSize(new Dimension(900, 550));		registerDropTarget( this.dataView );		JScrollPane scrollPane = createScrollPane(this.dataView);		Container contentPane = getContentPane();		contentPane.setLayout( new BorderLayout() );		JPanel descriptionPanel = new JPanel( new BorderLayout() );		descriptionPanel.add( new JLabel("description: "), BorderLayout.WEST );		descriptionPanel.add( this.descriptionField, BorderLayout.CENTER );		JPanel extensionPanel = new JPanel( new BorderLayout() );		extensionPanel.add(   new JLabel("extension:   "), BorderLayout.WEST );		extensionPanel.add( this.extensionField, BorderLayout.CENTER );		JPanel definitionPanel = new JPanel( new GridLayout( 2, 1));		definitionPanel.add( descriptionPanel );		definitionPanel.add( extensionPanel );		contentPane.add( definitionPanel, BorderLayout.NORTH );		contentPane.add( scrollPane, BorderLayout.CENTER );		this.statusBar = new StatusBar();		contentPane.add( this.statusBar, BorderLayout.SOUTH );		updateTitle();				setIcon( "icons/binaryeditor.png" );				if ( definition == null ) {			loadSettings();					} else {			openDefinition( definition );			if (data != null) {				openData( data );			}		}		this.dataManager.registerUI( this );	}