de.fhg.igd.earth.model.input
Class RawObjectLoader

java.lang.Object
  extended byde.fhg.igd.earth.model.input.ModelLoader
      extended byde.fhg.igd.earth.model.input.RawObjectLoader

public class RawObjectLoader
extends ModelLoader

This "ModelLoader" loads parts of a model witch was saved with the RawObjectSaver. The load method shows a dialog box where you can select the ".par" file. A part file can have several records. Each record will become a BranchGroup after loading. 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_
          model to insert into
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.input.ModelLoader
datapath_
 
Constructor Summary
RawObjectLoader()
          Creates an instance of this class
 
Method Summary
private  boolean chooseFile()
          Shows a dialog to select a filename (.par).
private  boolean createRecordNames()
          Creates the record names.
 String getIdentName()
          Returns the identName for this class (RawObjectLoader).
 boolean load(ModelGraph model, Frame parent)
          Loads a part into the model.
private  boolean loadObjects()
          Loads the graphic objects (records) into the model.
private  void reset()
          Resets all variables of this class
private  boolean showDialog()
          Shows the dialog to choose the records.
 
Methods inherited from class de.fhg.igd.earth.model.input.ModelLoader
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_
model to insert into


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

RawObjectLoader

public RawObjectLoader()
Creates an instance of this class

Method Detail

getIdentName

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

Specified by:
getIdentName in class ModelLoader
Returns:
"RawObjectLoader"

load

public boolean load(ModelGraph model,
                    Frame parent)
Loads a part into the model.

Specified by:
load in class ModelLoader
Parameters:
model - Model to insert into
parent - Parent frame
Returns:
true on success.

reset

private void reset()
Resets all variables of this class


chooseFile

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

Returns:
true on OK, false on CANCEL

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

loadObjects

private boolean loadObjects()
Loads the graphic objects (records) into the model.

Returns:
true on success.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.