use of maspack.widgets.ScaleField in project artisynth_core by artisynth.
the class FemModel3dAgent method createMeshPropPanel.
private void createMeshPropPanel() {
meshPropPanel = new LabeledComponentPanel();
gridDimField = new VectorField("widths", DEFAULT_GRID_DIM, "%8.3f");
gridDivField = new IntegerMultiField("divisions", DEFAULT_GRID_DIV, "%d");
gridDimField.setStretchable(true);
gridDivField.setStretchable(true);
tubeDimField = new VectorField("widths (L, rin, rout)", DEFAULT_TUBE_DIM, "%8.3f");
tubeDivField = new IntegerMultiField("divisions (nt, nl, nr)", DEFAULT_TUBE_DIV, "%d");
tubeDimField.setStretchable(true);
tubeDivField.setStretchable(true);
torusDimField = new VectorField("widths (R, rin, rout)", DEFAULT_TORUS_DIM, "%8.3f");
torusDivField = new IntegerMultiField("divisions (nt, nl, nr)", DEFAULT_TORUS_DIV, "%d");
torusDimField.setStretchable(true);
torusDivField.setStretchable(true);
sphereNodesField = new IntegerSelector("node count", SPHERE_NODE_OPTIONS);
extrusDepthField = new DoubleField("depth", DEFAULT_EXTRUSION_DEPTH, "%8.3f");
extrusLayersField = new IntegerField("layers", DEFAULT_EXTRUSION_LAYERS, "%d");
extrusFileField = createFileChooser("obj file", null, "obj");
extrusFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
extrusDepthField.setStretchable(true);
extrusLayersField.setStretchable(true);
ansysNodeFileField = createFileChooser("node file", null, "node");
ansysNodeFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
ansysElemFileField = createFileChooser("elem file", null, "elem");
ansysElemFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
tetgenNodeFileField = createFileChooser("node file", null, "node");
tetgenNodeFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
tetgenEleFileField = createFileChooser("ele file", null, "ele");
tetgenEleFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
ucdMeshFileField = createFileChooser("INP file", null, "inp");
ucdMeshFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
surfaceMeshFileField = createFileChooser("OBJ file", null, "obj");
surfaceMeshFileField.setAlignmentX(Component.LEFT_ALIGNMENT);
scaleField = new ScaleField("scale", 1);
scaleField.setStretchable(true);
autoScaleBtn = new JButton("auto scale");
autoScaleBtn.addActionListener(this);
scaleField.addMajorComponent(autoScaleBtn);
restoreDefaultValues();
if (mySettings != null) {
meshSelector.maskValueChangeListeners(true);
meshSelector.setValue(mySettings.meshType);
meshSelector.maskValueChangeListeners(false);
gridDimField.setValue(mySettings.gridWidths);
gridDivField.setValue(mySettings.gridDivisions);
tubeDimField.setValue(mySettings.tubeWidths);
tubeDivField.setValue(mySettings.tubeDivisions);
torusDimField.setValue(mySettings.torusWidths);
torusDivField.setValue(mySettings.torusDivisions);
sphereNodesField.setValue(mySettings.sphereNodes);
extrusDepthField.setValue(mySettings.extrusionDepth);
extrusLayersField.setValue(mySettings.extrusionLayers);
if (new File(mySettings.extrusionFile).isFile()) {
extrusFileField.setValue(mySettings.extrusionFile);
}
if (new File(mySettings.ansysNodeFile).isFile()) {
ansysNodeFileField.setValue(mySettings.ansysNodeFile);
}
if (new File(mySettings.ansysElemFile).isFile()) {
ansysElemFileField.setValue(mySettings.ansysElemFile);
}
if (new File(mySettings.tetgenNodeFile).isFile()) {
tetgenNodeFileField.setValue(mySettings.tetgenNodeFile);
}
if (new File(mySettings.tetgenEleFile).isFile()) {
tetgenEleFileField.setValue(mySettings.tetgenEleFile);
}
if (new File(mySettings.ucdFile).isFile()) {
ucdMeshFileField.setValue(mySettings.ucdFile);
}
if (new File(mySettings.surfaceMeshFile).isFile()) {
surfaceMeshFileField.setValue(mySettings.surfaceMeshFile);
}
}
updateMeshPanel();
}
Aggregations