use of nars.gui.output.PluginPanel in project opennars by opennars.
the class NARControls method newParameterPanel.
private JComponent newParameterPanel() {
JPanel p = new JPanel();
JPanel pc = new JPanel();
pc.setLayout(new GridLayout(1, 0));
stopButton = new AwesomeButton(FA_StopCharacter);
stopButton.setBackground(Color.DARK_GRAY);
stopButton.addActionListener(this);
pc.add(stopButton);
walkButton = new AwesomeButton('\uf051');
walkButton.setBackground(Color.DARK_GRAY);
walkButton.setToolTipText("Walk 1 Cycle");
walkButton.addActionListener(this);
pc.add(walkButton);
JButton focusButton = new AwesomeButton(FA_FocusCharacter);
focusButton.setBackground(Color.DARK_GRAY);
focusButton.setToolTipText("Focus");
focusButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setSpeed(1.0f);
volumeSlider.setValue(0.0f);
}
});
pc.add(focusButton);
JButton pluginsButton = new AwesomeButton(FA_ControlCharacter);
pluginsButton.setToolTipText("Plugins");
pluginsButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
new NWindow("Plugins", new PluginPanel(nar)).show(350, 600);
}
});
pc.add(pluginsButton);
p.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.anchor = GridBagConstraints.NORTH;
c.fill = GridBagConstraints.HORIZONTAL;
c.weightx = 1;
c.gridx = 0;
c.ipady = 8;
p.add(pc, c);
NSlider vs = newVolumeSlider();
vs.setFont(vs.getFont().deriveFont(Font.BOLD));
p.add(vs, c);
NSlider ss = newSpeedSlider();
ss.setFont(vs.getFont());
p.add(ss, c);
c.ipady = 4;
p.add(new NSlider(memory.param.decisionThreshold, "Decision Threshold", 0.0f, 1.0f), c);
p.add(new NSlider(Parameters.projectionDecay, "Projection Decay", 0.0f, 1.0f), c);
p.add(new NSlider(memory.param.taskLinkForgetDurations, "Task Duration", 0.0f, 20), c);
p.add(new NSlider(memory.param.termLinkForgetDurations, "Belief Duration", 0.0f, 20), c);
p.add(new NSlider(memory.param.conceptForgetDurations, "Concept Duration", 0.0f, 20), c);
p.add(new NSlider(memory.param.eventForgetDurations, "Event Duration", 0.0f, 20), c);
return p;
}
Aggregations