use of artisynth.core.gui.SelectableComponentPanel in project artisynth_core by artisynth.
the class ExcitationTargetAgent method createTargetList.
protected void createTargetList() {
myTargetPanel = new SelectableComponentPanel();
myTargetPanel.setSelectionManager(mySelectionManager);
myTargetPanel.setSpacing(0);
for (int i = 0; i < myExciter.numTargets(); i++) {
DoubleField widget = createTargetWidget(myExciter.getTarget(i), myExciter.getGain(i));
myTargetPanel.addWidget(widget);
myTargetPanel.mapWidgetToComponent(widget, myExciter.getTarget(i));
}
myTargetPanel.addMouseListener(new ListMouseHandler());
JLabel label = new JLabel("Existing targets and gains:");
GuiUtils.setItalicFont(label);
addToContentPane(label);
myListScroller = new JScrollPane(myTargetPanel);
myListScroller.setPreferredSize(new Dimension(280, 150));
myListScroller.setMinimumSize(new Dimension(280, 150));
addToContentPane(myListScroller);
}
use of artisynth.core.gui.SelectableComponentPanel in project artisynth_core by artisynth.
the class MotionTargetComponentAgent method createTargetList.
protected void createTargetList() {
myTargetPanel = new SelectableComponentPanel();
myTargetPanel.setSelectionManager(mySelectionManager);
myTargetPanel.setSpacing(0);
for (int i = 0; i < myController.getMotionSources().size(); i++) {
DoubleField widget = createTargetWidget(myController.getMotionSources().get(i), myController.getMotionTargetWeights().get(i));
myTargetPanel.addWidget(widget);
myTargetPanel.mapWidgetToComponent(widget, myController.getMotionSources().get(i));
}
myTargetPanel.addMouseListener(new ListMouseHandler());
JLabel label = new JLabel("Existing targets and weights:");
GuiUtils.setItalicFont(label);
addToContentPane(label);
myListScroller = new JScrollPane(myTargetPanel);
myListScroller.setPreferredSize(new Dimension(480, 150));
myListScroller.setMinimumSize(new Dimension(480, 150));
addToContentPane(myListScroller);
}
Aggregations