use of maspack.widgets.LabeledComponentPanel in project artisynth_core by artisynth.
the class NumericProbeEditor method createSubPanes.
private void createSubPanes() {
mainPane.add(Box.createRigidArea(new Dimension(0, 4)));
middlePane = new JPanel();
middlePane.setLayout(new BoxLayout(middlePane, BoxLayout.X_AXIS));
vectorPane = new JPanel();
vectorPane.setLayout(new BoxLayout(vectorPane, BoxLayout.Y_AXIS));
vectorPane.setMaximumSize(new Dimension(85, Integer.MAX_VALUE));
vectorPane.setPreferredSize(new Dimension(85, 50));
vectorPane.setOpaque(false);
vectorPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
vectorPane.setAlignmentY(Component.TOP_ALIGNMENT);
splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
splitPane.setAlignmentY(TOP_ALIGNMENT);
splitPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
splitPane.setDividerSize(2);
splitPane.setResizeWeight(0.5);
splitPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
propPane = new JPanel();
propPane.setLayout(new BoxLayout(propPane, BoxLayout.Y_AXIS));
propPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
propPane.setOpaque(false);
// propPane.setBorder(new LineBorder(Color.black));
equationPane = new JPanel();
equationPane.setLayout(new BoxLayout(equationPane, BoxLayout.Y_AXIS));
equationPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
equationPane.setOpaque(false);
equationPane.setAlignmentY(Component.TOP_ALIGNMENT);
// equationPane.setBorder(new LineBorder(Color.black));
mainPane.add(middlePane);
// filePane = new JPanel();
// filePane.setLayout(new BoxLayout(filePane, BoxLayout.X_AXIS));
// filePane.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
// filePane.setMaximumSize(new Dimension(Integer.MAX_VALUE, 30));
// mainPane.add(filePane);
optionsPane = new JPanel();
optionsPane.setLayout(new BoxLayout(optionsPane, BoxLayout.X_AXIS));
// optionsPane.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
// mainPane.add(optionsPane);
leftPropertyPanel = new LabeledComponentPanel();
rightPropertyPanel = new LabeledComponentPanel();
leftPropertyPanel.setBorder(BorderFactory.createEtchedBorder());
rightPropertyPanel.setBorder(BorderFactory.createEtchedBorder());
optionsPane.add(leftPropertyPanel);
optionsPane.add(rightPropertyPanel);
// propertyPane.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
mainPane.add(optionsPane);
bottomPane = new JPanel();
bottomPane.setLayout(new BoxLayout(bottomPane, BoxLayout.X_AXIS));
bottomPane.setAlignmentX(CENTER_ALIGNMENT);
bottomPane.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
mainPane.add(bottomPane);
// vectorPane.setBackground(Color.green);
// vectorPane.setBorder(BorderFactory.createLineBorder(Color.BLACK));
// equationPane.setBackground(Color.green);
// equationPane.setBorder(BorderFactory.createLineBorder(Color.BLACK));
}
use of maspack.widgets.LabeledComponentPanel in project artisynth_core by artisynth.
the class RigidBodyAgent method createLocationPanel.
private void createLocationPanel() {
positionField = new VectorField("position", 3);
positionField.setStretchable(true);
positionField.addValueChangeListener(this);
orientationField = new AxisAngleField("orientiation", new AxisAngle());
orientationField.setStretchable(true);
orientationField.addValueChangeListener(this);
LabeledComponentPanel locationPanel = new LabeledComponentPanel();
locationPanel.addWidget(positionField);
locationPanel.addWidget(orientationField);
addWidget(locationPanel);
locationPanel.setBorder(GuiUtils.createTitledPanelBorder("Location"));
}
use of maspack.widgets.LabeledComponentPanel 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