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

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

public class AgentLoader
extends ModelLoader

This class is for loading an agent into the model. You have to set a name, a position, a color and a transparency. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel

Field Summary
static String ICON_AGENTS
          default agent icon
private  String implicitName_
          implicit name of this agent
private  String nickname_
          nickname of this agent
private  Frame parent_
          parent frame
 
Fields inherited from class de.fhg.igd.earth.model.input.ModelLoader
datapath_
 
Constructor Summary
AgentLoader()
          Creates an instance of this class.
 
Method Summary
 String getIdentName()
          Returns the identName for this class (AgentLoader).
 boolean load(ModelGraph model, Frame parent)
          Shows the special load dialog and inserts the selected parts.
 HistoryGroup load(ModelGraph model, String name, String implicitName, Color color, float transparency, double translationX, double translationY, double translationZ, Frame parent)
          Loads an agent into the given model.
 HistoryGroup load(ModelGraph model, String name, String implicitName, Frame parent)
          Loads an agent into the given model (default pos, color, transparency).
private  boolean showDialog()
          Shows the dialog box to input the "Nickname" and "Implicit Name" of the agent.
 
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

parent_

private Frame parent_
parent frame


implicitName_

private String implicitName_
implicit name of this agent


nickname_

private String nickname_
nickname of this agent


ICON_AGENTS

public static final String ICON_AGENTS
default agent icon

See Also:
Constant Field Values
Constructor Detail

AgentLoader

public AgentLoader()
Creates an instance of this class.

Method Detail

getIdentName

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

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

load

public HistoryGroup load(ModelGraph model,
                         String name,
                         String implicitName,
                         Frame parent)
Loads an agent into the given model (default pos, color, transparency).

Parameters:
model - Model
name - Name of the agent
Returns:
true on success

load

public boolean load(ModelGraph model,
                    Frame parent)
Description copied from class: ModelLoader
Shows the special load dialog and inserts the selected parts.

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

load

public HistoryGroup load(ModelGraph model,
                         String name,
                         String implicitName,
                         Color color,
                         float transparency,
                         double translationX,
                         double translationY,
                         double translationZ,
                         Frame parent)
Loads an agent into the given model. If the given name is null, a GUI is opened to request the name.

Parameters:
model - Model
name - Name of the agent
color - Color
transparency - Transparency
Returns:
true on success

showDialog

private boolean showDialog()
Shows the dialog box to input the "Nickname" and "Implicit Name" of the agent.

Returns:
true on OK, false on CANCEL


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.