de.fhg.igd.earth.model.output
Class RawObjectSaver

java.lang.Object
  extended byde.fhg.igd.earth.model.output.ModelSaver
      extended byde.fhg.igd.earth.model.output.RawObjectSaver

public class RawObjectSaver
extends ModelSaver

This "ModelSaver" saves parts (BranchGroups) of a model. The save method shows a dialog box where you can choose the ".par" file. A part file can have several records. Each record represents a BranchGroup. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel

Field Summary
private  Vector branchGroups_
          loaded branchGroups
private  String directory_
          directory
private  String filename_
          filename
private  ModelGraph model_
          source model
private  Frame parent_
          parent frame
private  Vector recordNames_
          the names of the single BranchGroups
private  Vector selected_
          selected records
 
Fields inherited from class de.fhg.igd.earth.model.output.ModelSaver
datapath_
 
Constructor Summary
RawObjectSaver()
          Creates an instance of this class
 
Method Summary
private  boolean chooseFile()
          Shows a dialog to choose a filename (.par).
private  boolean createRecordNames()
          Creates the record names.
 String getIdentName()
          Returns the identName for this class (RawObjectSaver).
private  void reset()
          Resets all variables of this class
 boolean save(ModelGraph model, Frame parent)
          Saves BranchGroups into a part file.
private  boolean saveObjects()
          Saves the graphic objects (BranchGroups) into the selected file.
private  boolean showDialog()
          Shows the dialog to choose the records.
 
Methods inherited from class de.fhg.igd.earth.model.output.ModelSaver
setDatapath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model_

private ModelGraph model_
source model


recordNames_

private Vector recordNames_
the names of the single BranchGroups


selected_

private Vector selected_
selected records


branchGroups_

private Vector branchGroups_
loaded branchGroups


filename_

private String filename_
filename


directory_

private String directory_
directory


parent_

private Frame parent_
parent frame

Constructor Detail

RawObjectSaver

public RawObjectSaver()
Creates an instance of this class

Method Detail

getIdentName

public String getIdentName()
Returns the identName for this class (RawObjectSaver).

Specified by:
getIdentName in class ModelSaver
Returns:
"RawObjectSaver"

save

public boolean save(ModelGraph model,
                    Frame parent)
Saves BranchGroups into a part file.

Specified by:
save in class ModelSaver
Parameters:
model - source model
parent - Parent frame
Returns:
true on success.

reset

private void reset()
Resets all variables of this class


createRecordNames

private boolean createRecordNames()
Creates the record names.

Returns:
true on success.

showDialog

private boolean showDialog()
Shows the dialog to choose the records.

Returns:
true on OK, false on CANCEL

chooseFile

private boolean chooseFile()
Shows a dialog to choose a filename (.par).

Returns:
true on OK, false on CANCEL

saveObjects

private boolean saveObjects()
Saves the graphic objects (BranchGroups) into the selected file.

Returns:
true on success.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.