use of artisynth.core.gui.ControlPanel in project artisynth_core by artisynth.
the class DicomLoader method createControlPanel.
void createControlPanel() {
panel = new ControlPanel("DICOM controls");
fnf = new FileNameField("File or folder:", 30);
fnf.getFileChooser().setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
fnf.getFileChooser().setCurrentDirectory(ArtisynthPath.getSrcRelativeFile(this, "data/"));
fnf.setName("dicom_path");
panel.addWidget(fnf);
fnp = new StringField("File regex:", 30);
fnp.setValue(".*");
panel.addWidget(fnp);
fns = new BooleanSelector("Subdirectories", true);
panel.addWidget(fns);
// panel for full-width button
JPanel jpanel = new JPanel();
jpanel.setLayout(new GridLayout());
panel.addWidget(jpanel);
JButton button = new JButton("Load");
button.setActionCommand("load");
button.addActionListener(this);
jpanel.add(button);
button = new JButton("Add Plane");
button.setActionCommand("plane");
button.addActionListener(this);
jpanel.add(button);
addControlPanel(panel);
}
use of artisynth.core.gui.ControlPanel in project artisynth_core by artisynth.
the class ArticulatedFem method addControlPanel.
protected void addControlPanel(MechModel mech) {
myControlPanel = new ControlPanel("options", "");
myControlPanel.addWidget(mech, "integrator");
myControlPanel.addWidget(mech, "matrixSolver");
myControlPanel.addWidget(mech, "maxStepSize");
addControlPanel(myControlPanel);
}
use of artisynth.core.gui.ControlPanel in project artisynth_core by artisynth.
the class RootModel method postscan.
/**
* {@inheritDoc}
*/
public void postscan(Deque<ScanToken> tokens, CompositeComponent ancestor) throws IOException {
super.postscan(tokens, ancestor);
for (ControlPanel cp : myControlPanels) {
cp.pack();
cp.setVisible(true);
}
}
use of artisynth.core.gui.ControlPanel in project artisynth_core by artisynth.
the class FemBeamTest method attach.
@Override
public void attach(DriverInterface driver) {
super.attach(driver);
ControlPanel panel = new ControlPanel("material controls");
panel.addWidget(this, "material");
panel.pack();
addControlPanel(panel);
}
use of artisynth.core.gui.ControlPanel in project artisynth_core by artisynth.
the class SingleQuadhex method createControlPanel.
private void createControlPanel(FemModel3d mod) {
ControlPanel panel = new ControlPanel("options");
FemControlPanel.addFem3dControls(panel, mod, mod);
panel.pack();
addControlPanel(panel);
panel.setVisible(true);
Main.getMain().arrangeControlPanels(this);
}
Aggregations