|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.earth.model.input.ModelLoader de.fhg.igd.earth.model.input.ShapeFileLoader
This "ModelLoader" loads shapefiles into the model. The load method shows a dialog box where you can select the ".shp" file. If a ".dbf" (DBase) file also exists this loader converts its data into the infotable. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG
Field Summary | |
private Color |
color_
color |
private int |
detailLevel_
detail level (0=high detail, 1=low detail) |
private String |
directory_
directory |
private float |
distance_
distance value |
private String |
filename_
filename |
private String |
filenameDBF_
absolute .dbf filename |
private String |
filenameSHP_
absolute .shp filename |
private boolean |
lod_
create a LOD Group ? |
private ModelGraph |
model_
model to include into |
private double |
offsetX_
x-offset |
private double |
offsetY_
y-offset |
private double |
offsetZ_
z-offset |
private Frame |
parent_
parent frame |
private String |
plainName_
plain filename wiithout extension |
private StatusDialog |
pleaseWait_
the please wait dialog |
private int |
recordCounter_
number of records |
private Vector |
recordNames_
record names |
private Vector |
selected_
selection list |
private int |
shapeFileType_
type of the shapefile |
private String |
shapeFileTypeName_
type name of the shapefile |
static String |
shapePath_
default shapefile path |
private int |
style_
style (wire frame, solid, texture) |
private float |
transparency_
transparency (0.0-1.0) |
Fields inherited from class de.fhg.igd.earth.model.input.ModelLoader |
datapath_ |
Constructor Summary | |
ShapeFileLoader()
Creates an instance of this class. |
Method Summary | |
private boolean |
chooseFile()
Shows a dialog where you can choose a shapefile. |
private boolean |
createRecordNames()
Creates the record names |
String |
getIdentName()
Returns the identName for this class (ShapeFileLoader). |
boolean |
load(ModelGraph model,
Frame parent)
Loads a shapefile into the model. |
boolean |
load(ModelGraph model,
String name)
Loads a shapefile directly without a dialog box (simple version) |
boolean |
load(ModelGraph model,
String name,
Color color,
int style,
float transparency,
double offsetX,
double offsetY,
double offsetZ,
int detailLevel,
float distance,
boolean lod)
Load directly without a dialog window (DEBUG). |
boolean |
loadFile()
Opens the shapefile and loads the data into the model. |
private void |
reset()
Initializes all variables. |
private boolean |
showDialog()
Shows the dialog box to select the records of the shapefile. |
private void |
showPleaseWait(boolean on)
Shows the "please wait" window. |
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 |
public static final String shapePath_
private ModelGraph model_
private String filename_
private String filenameSHP_
private String filenameDBF_
private String plainName_
private String directory_
private Frame parent_
private Vector recordNames_
private Vector selected_
private Color color_
private int style_
private float transparency_
private double offsetX_
private double offsetY_
private double offsetZ_
private int detailLevel_
private float distance_
private boolean lod_
private int shapeFileType_
private String shapeFileTypeName_
private int recordCounter_
private StatusDialog pleaseWait_
Constructor Detail |
public ShapeFileLoader()
Method Detail |
public String getIdentName()
getIdentName
in class ModelLoader
private void reset()
public boolean load(ModelGraph model, Frame parent)
load
in class ModelLoader
model
- Model to load intoparent
- Parent frame
true
on success.public boolean load(ModelGraph model, String name, Color color, int style, float transparency, double offsetX, double offsetY, double offsetZ, int detailLevel, float distance, boolean lod)
model
- Model to load intoname
- Name of the shapefile (plain)color
- Colorstyle
- Styletransparency
- TransparencydetailLevel
- (0=high detail, 1=low detail)distance
- Distance (threshold between high and low detail)lod
- Create a LODGroup ?
true
on success.private boolean chooseFile()
private boolean showDialog()
public boolean load(ModelGraph model, String name)
model
- Model to load intoname
- Name of the shapefile (plain)
true
on success.private boolean createRecordNames()
true
on success.public boolean loadFile()
private void showPleaseWait(boolean on)
on
- true=Show false=hide
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |