use of maspack.widgets.OptionPanel in project artisynth_core by artisynth.
the class SetCollisionsDialog method createDisplay.
protected void createDisplay() {
myEnabledField = new BooleanSelector("enabled", false);
myEnabledField.setVoidValueEnabled(true);
myEnabledField.addValueChangeListener(this);
addWidget(myEnabledField);
myFrictionField = new DoubleField("friction", 0);
myFrictionField.setVoidValueEnabled(true);
myFrictionField.setRange(0, Double.POSITIVE_INFINITY);
myFrictionField.addValueChangeListener(this);
addWidget(myFrictionField);
addWidget(new JSeparator());
OptionPanel panel = new OptionPanel("Set Cancel", this);
addWidget(panel);
mySetButton = panel.getButton("Set");
pack();
}
use of maspack.widgets.OptionPanel in project artisynth_core by artisynth.
the class DefaultCollisionsDialog method createDisplay.
protected void createDisplay() {
myRREnabled = new BooleanSelector("rigid-rigid", false);
myRDEnabled = new BooleanSelector("rigid-deformable", false);
myDDEnabled = new BooleanSelector("deformable-deformable", false);
myDSEnabled = new BooleanSelector("deformable-self", false);
myRRFriction = new DoubleField("", 0);
myRDFriction = new DoubleField("", 0);
myDDFriction = new DoubleField("", 0);
myDSFriction = new DoubleField("", 0);
myRREnabled.addMajorComponent(myRRFriction);
myRDEnabled.addMajorComponent(myRDFriction);
myDDEnabled.addMajorComponent(myDDFriction);
myDSEnabled.addMajorComponent(myDSFriction);
addWidget(myRREnabled);
addWidget(myRDEnabled);
addWidget(myDDEnabled);
addWidget(myDSEnabled);
addWidget(new JSeparator());
addWidgetHeader(myRREnabled);
OptionPanel panel = new OptionPanel("Set Cancel", this);
addWidget(panel);
mySetButton = panel.getButton("Set");
pack();
}
use of maspack.widgets.OptionPanel in project artisynth_core by artisynth.
the class NumericProbeRangeSelectorDialog method commonProbeRangeSelectorInit.
private void commonProbeRangeSelectorInit(NumericProbePanel DisplayProbe) {
display = DisplayProbe;
super.setModal(true);
double[] range = display.getDisplayRange();
minYRange = range[0];
maxYRange = range[1];
autoRanging = display.isAutoRanging();
getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
myPanel = new LabeledComponentPanel();
myPanel.setAlignmentX(Component.CENTER_ALIGNMENT);
getContentPane().add(myPanel);
generateWidgets(myPanel);
JSeparator sep = new JSeparator();
sep.setAlignmentX(Component.CENTER_ALIGNMENT);
getContentPane().add(sep);
OptionPanel options = new OptionPanel("OK Cancel", this);
options.setAlignmentX(Component.CENTER_ALIGNMENT);
getContentPane().add(options);
pack();
Point offset = display.getLocationOnScreen();
this.setLocation(offset.x, offset.y);
// this.setSize(new Dimension(350, 125));
// this.setMinimumSize(new Dimension(350, 125));
setVisible(true);
}
Aggregations