Search in sources :

Example 1 with AwesomeButton

use of automenta.vivisect.swing.AwesomeButton in project opennars by opennars.

the class TabbedPaneTitleMax method initButtons.

protected void initButtons() {
    bn_float = new AwesomeButton('\uf0de');
    bn_float.setToolTipText("Pop Out to Floating Window");
    // bn_minimize = new NARSwing.AwesomeButton('\uf0dd');
    bn_close = new AwesomeButton('\uf00d');
    label_title = new javax.swing.JLabel();
    label_title.setText(content.getTitle());
    label_title.setIcon(content.getIcon());
}
Also used : AwesomeButton(automenta.vivisect.swing.AwesomeButton)

Example 2 with AwesomeButton

use of automenta.vivisect.swing.AwesomeButton 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;
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) GridBagConstraints(java.awt.GridBagConstraints) ActionListener(java.awt.event.ActionListener) GridBagLayout(java.awt.GridBagLayout) NSlider(automenta.vivisect.swing.NSlider) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) NWindow(automenta.vivisect.swing.NWindow) PluginPanel(nars.gui.output.PluginPanel) AwesomeButton(automenta.vivisect.swing.AwesomeButton)

Aggregations

AwesomeButton (automenta.vivisect.swing.AwesomeButton)2 NSlider (automenta.vivisect.swing.NSlider)1 NWindow (automenta.vivisect.swing.NWindow)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 GridLayout (java.awt.GridLayout)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 JButton (javax.swing.JButton)1 JPanel (javax.swing.JPanel)1 PluginPanel (nars.gui.output.PluginPanel)1