Search in sources :

Example 11 with LabeledComponentBase

use of maspack.widgets.LabeledComponentBase in project artisynth_core by artisynth.

the class HydrostatModel method createBundlesPanel.

public void createBundlesPanel(String[] names) {
    bundlesPanel = new ControlPanel("Bundles", "LiveUpdate");
    for (int i = 0; i < names.length; i++) {
        LabeledComponentBase c = bundlesPanel.addWidget(names[i], this, "bundles/" + names[i] + ":excitation", 0.0, 1.0);
        if (c != null)
            c.setLabelFontColor(Color.getHSBColor((float) i / names.length, 1f, 1f));
    }
    bundlesPanel.pack();
    bundlesPanel.setVisible(true);
}
Also used : ControlPanel(artisynth.core.gui.ControlPanel) LabeledComponentBase(maspack.widgets.LabeledComponentBase) Point(artisynth.core.mechmodels.Point)

Example 12 with LabeledComponentBase

use of maspack.widgets.LabeledComponentBase in project artisynth_core by artisynth.

the class HydrostatModel method createExcitersPanel.

public void createExcitersPanel(String[] names) {
    exciterPanel = new ControlPanel("Exciters", "LiveUpdate");
    for (int i = 0; i < names.length; i++) {
        LabeledComponentBase c = exciterPanel.addWidget(names[i], this, "exciters/" + names[i] + ":excitation", 0.0, 1.0);
        if (c != null)
            c.setLabelFontColor(Color.getHSBColor((float) i / names.length, 1f, 1f));
    }
    exciterPanel.pack();
    exciterPanel.setVisible(true);
}
Also used : ControlPanel(artisynth.core.gui.ControlPanel) LabeledComponentBase(maspack.widgets.LabeledComponentBase) Point(artisynth.core.mechmodels.Point)

Aggregations

LabeledComponentBase (maspack.widgets.LabeledComponentBase)12 EditingProperty (maspack.properties.EditingProperty)6 Property (maspack.properties.Property)6 ModelComponent (artisynth.core.modelbase.ModelComponent)5 ControlPanel (artisynth.core.gui.ControlPanel)3 Point (java.awt.Point)3 IOException (java.io.IOException)3 Point (artisynth.core.mechmodels.Point)2 CompositeComponent (artisynth.core.modelbase.CompositeComponent)2 MutableCompositeComponent (artisynth.core.modelbase.MutableCompositeComponent)2 Color (java.awt.Color)2 Component (java.awt.Component)2 JComponent (javax.swing.JComponent)2 JFrame (javax.swing.JFrame)2 JPanel (javax.swing.JPanel)2 PolygonalMesh (maspack.geometry.PolygonalMesh)2 GenericPropertyHandle (maspack.properties.GenericPropertyHandle)2 RenderProps (maspack.render.RenderProps)2 File (java.io.File)1 JSeparator (javax.swing.JSeparator)1